Skip to content

fix(net): one devices list per Mousse ID account on the desktop - #1650

Merged
bvsr365 merged 2 commits into
masterfrom
mousse-id-one-devices-list
Nov 20, 2026
Merged

bvsr365 merged 2 commits into
masterfrom
mousse-id-one-devices-list

Conversation

@bvsr365

@bvsr365 bvsr365 commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

One Mousse ID account could hold several devices lists, so each computer saw only its own devices. Mousse ID now keeps one list per account. It refuses a second one with account_network (HTTP 409), both at bind and on the connector calls of a computer whose list it folded into the account's list. The desktop has to handle that refusal.

Change

  • Join instead of bind. A computer alone on its network now always takes the join sign-in from fix(net): a computer alone on its own network joins the account's devices at Mousse ID sign-in #1648. That means it hosts and belongs to no Space, no other device holds a pass in its list, and it keeps no bots. It joins the account's list when there is one, and binds its own only when the account has none yet. fix(net): a computer alone on its own network joins the account's devices at Mousse ID sign-in #1648's rule stays: a computer in any Space, joined or hosted, keeps the normal sign-in. This is how "refused at bind, then joins" works in practice: Mousse ID's identity grant cannot make join requests or register a new node, so the decision is made when sign-in begins.
  • Refused at bind. A computer that keeps its network (it is in a Space, joined or hosted, or has other live devices) and is refused at bind stops with: "Your Mousse ID already has a devices list on another computer. This computer has its own devices or Spaces, so it can’t join that list without leaving them. It keeps working on its own." Nothing of the refused sign-in is kept. A computer that could leave but was still holding an earlier sign-in is told "Sign in again to join it.", and its next sign-in joins.
  • Folded list. A computer whose list was folded gets account_network from renewal or any connector call. It then drops its sign-in and the hosted relay as when signed out, and stops renewing. net.status records no error for this. PlusStatus.reason is list_merged, and Settings → Devices shows "Your devices are now on one list. Sign in again to join it." The next sign-in joins the account's list and clears the note.
  • Join sign-in with nothing to join. If a join sign-in finds no owner computer of the account's list signed in, the bind refusal reads as authority_offline ("Open Mousse on it, then sign in again"). The computer keeps its network.
  • Wording and error details. net.plus.login.finish errors now carry their details to the window, which turns account_network into plain words and never says "binding".

Verification

  • MOUSSE_PLUS_ROOT=/home/aeon/.cache/wt-plus-onelist node scripts/verify.mjs tests/net/plus/one-devices-list.test.ts tests/net/plus/hosted-computer-join.test.ts tests/net/plus/removed-computer-rejoin.test.ts tests/net/plus/profile.test.ts tests/net/plus/computer-join.test.ts tests/renderer/devicesPage.test.ts tests/renderer/plus-sign-in.test.ts --typecheck all: PASS, 7 files, 78 tests. tsc --noEmit -p tsconfig.node.json and tsc --noEmit -p tsconfig.web.json had no errors.
  • An earlier run on the first version of this branch also covered tests/net/plus/login.test.ts, tests/net/hosted-absent.test.ts, tests/net/plusLegacySwitch.test.ts, tests/net/transports/service.test.ts and tests/net/protocol/codec.test.ts: PASS, 12 files, 116 tests.
  • tests/net/plus/hosted-computer-join.test.ts with MOUSSE_PLUS_ROOT at Mousse ID master e584d138 (bvsr365/mousse-plus refactor: remove dead and fragile features after gated review #34, account_network and the fold): 6 of 6 passed against Mousse ID's real routes, sign-in service and relay. Two tests are new:
    • A folded computer learns it at renewal, is signed out with reason: 'list_merged', and joins the kept list at its next sign-in.
    • A computer still holding its sign-in is refused at bind, then joins at the next sign-in.
      The fold state is made in the in-memory store the way the service folds at load. The fixture now maps Mousse ID refusals to HTTP codes as apps/api/src/app.ts does; before, they came back as 500.
  • tests/net/plus/one-devices-list.test.ts (new) runs through the real NetService and the local IPC registry against a hand-written stand-in of Mousse ID:
    • An owner with another device is refused at bind: it keeps its network, is not signed in, and gets the account_network_kept details.
    • A join sign-in with no owner computer to join gets authority_offline and keeps the network.
    • A folded computer drops its sign-in and the relay row, and its next sign-in is a join sign-in.
    • A stale sign-in is told to sign in again.
    • A computer that belongs to a Space, and one that hosts a Space, both sign in with their own identity; refused at bind, they keep their network and get the plain message.
  • tests/renderer/devicesPage.test.ts: the account row shows the folded-list note, and a refused sign-in shows the plain message. tests/renderer/plus-sign-in.test.ts: both refusal wordings, with no "binding".
  • Not checked: the real app by hand.

Notes

No issue

🤖 Generated with Claude Code

bvsr365 and others added 2 commits November 20, 2026 11:56
Mousse ID now keeps one devices list per account and refuses a second one
with `account_network`, at bind and on the connector calls of a computer
whose list it folded into the account's list.

- A computer that can leave its network without stranding anything (it hosts
  no Space, no other device holds a pass in its list, it keeps no bots) always
  takes the join sign-in, so it joins the account's list instead of binding a
  second one. A Space it only belongs to no longer keeps it out.
- A computer that keeps its network and is refused at bind stops with a plain
  message and keeps working on its own; nothing of the refused sign-in stays.
- A computer whose list was folded drops its sign-in and the hosted relay as
  when signed out, stops renewing, and Settings shows "Your devices are now on
  one list. Sign in again to join it." Its next sign-in joins that list.
- Sign-in errors say "devices list" in plain words, never "binding".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hy when refused

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bvsr365
bvsr365 merged commit 5f33515 into master Nov 20, 2026
11 checks passed
@bvsr365
bvsr365 deleted the mousse-id-one-devices-list branch November 20, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant