Skip to content

docs(remote): document the desktop client role, and clear what it left behind - #982

Merged
huichen merged 1 commit into
mainfrom
docs/remote-client-role-docs
Oct 10, 2026
Merged

huichen merged 1 commit into
mainfrom
docs/remote-client-role-docs

Conversation

@huichen

@huichen huichen commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator

What

The client role landed over eighteen PRs and left no trace in docs/. Neither CONNECTION.md nor PRODUCT.md mentioned that a Desktop can connect out, and both still framed the domain as phone-only. CONNECTION calls itself the single maintenance location for this domain (本文件是该领域设计与契约的唯一维护位置), so a reader following the repo's own convention would have concluded the desktop client could not exist.

Added: §2.2.2 in both languages

Two roles in one process; the handshake's identity fields and why identity is not a capability; remote_peers.json being separate from the host's book and why; the merged conversation list and the lastMessageAt key it needed; what is hidden rather than shown as a dead button; the capability alignment with mobile; and the three known limitations stated as limitations (host-side single slot, mobile's read-only catalogue observers, device identification needing a newer host).

Corrected two claims that had stopped being true: the rail entry is always shown (connecting out needs no account), and the feature is no longer phone-only. PRODUCT's §5.3 now says what the two directions are for.

Four things the audit turned up, all mine

1. hiddenCount (#955) was never called. The filter selects rows; nothing reports how many it withheld. Deleted, with its assertions replaced by the filter behaviour itself.

2. forgetRemoteToolTargets (#974) was never called either — so the fetched tool-argument cache was never dropped, and grew for the life of the window. Now wired into leaving a conversation, which is where its own doc said it went. The test asserts a re-read, because dropping a cache is only correct if something refetches.

3. RemoteConversationSettings computed a refusal message and never rendered it. Its own comment said the user "gets a value that snapped back and a reason why" — the hook's tests asserted on the state, not on the screen, so the reason reached nobody: the user watched a setting revert for no stated cause. Now an alert beside the pickers, mutation-checked (hiding it fails the test). This is the same class of defect as the dead exports — a value computed and never consumed — and it was in the one place a user would notice.

4. Five translation keys superseded and left behind: toolRunning (became toolRan), loadOlderFailed (the timeline's error surface replaced it), providersHint (the providers panel has its own), newConversationHint, and pairedDevices — which I wrote in #965 and never used at all.

Also verified rather than assumed: thinkingLevel.*'s six keys are built dynamically (t(\thinkingLevel.${level}`)) and are **not** orphans; and the four orphans in remote.json (connectedAs, reconnectingAs, connectionHint, agentUnavailable`) predate this work (#123, #242, #554) and are left alone.

Verification

3671 desktop tests, tsc, eslint, stylelint clean, 0 uncovered lines added. make check-docs reports the same failures before and after (whitelisting of agent/src/prompt/*.md, and docs/architecture/tasks.md whose Chinese pair another in-flight branch has not written); none of them comes from these four docs files — verified by running the gate against untouched origin/main.

One process note

I first created this branch in the main checkout — against the repo's rule that all development happens in a worktree — and the retry left a failed cherry-pick behind. Recovered properly: the commit was cherry-picked into .worktrees/remote-docs, the stray branch deleted, and main left clean at origin/main. No commit was lost and nothing was pushed from the main checkout.

…t behind

The client role landed over eighteen PRs and left no trace in `docs/`: neither
`CONNECTION.md` nor `PRODUCT.md` mentioned that a Desktop can connect *out*, and
both still framed the domain as phone-only. `CONNECTION` calls itself the single
maintenance location for this domain, so a reader following the repo's own
convention would have concluded the desktop client could not exist.

Added §2.2.2 (both languages): the two roles in one process, the handshake's
identity fields and why identity is not a capability, `remote_peers.json` being
separate from the host's book and why, the merged list and the `lastMessageAt`
key it needed, what is hidden rather than shown as a dead button, the capability
alignment with mobile, and the three known limitations stated as limitations
(host-side single slot, mobile's read-only catalogue observers, device
identification needing a newer host).

Corrected two claims that had stopped being true: the rail entry is always shown
(connecting out needs no account), and the feature is no longer phone-only.
`PRODUCT`'s §5.3 now says what the two directions are for.

Four things the audit turned up, all mine:

* `hiddenCount` (#955) was never called — the filter selects rows, nothing
  reports how many it withheld. Deleted, with its assertions replaced by the
  filter behaviour itself.
* `forgetRemoteToolTargets` (#974) was never called either, so the fetched
  tool-argument cache was never dropped and grew for the life of the window. Now
  wired into leaving a conversation, which is where the doc always said it went —
  and the test asserts a *re-read*, because dropping the cache would be wrong if
  nothing refetched.
* `RemoteConversationSettings` computed a refusal message, and commented that the
  user "gets a value that snapped back **and a reason why**" — but never rendered
  it. The hook's tests asserted on the state, not on the screen, so the reason
  reached nobody: the user watched a setting revert with no stated cause. Now
  rendered as an alert beside the pickers (mutation-checked: hiding it fails the
  test).
* Four translation keys (`toolRunning`, `loadOlderFailed`, `providersHint`,
  `newConversationHint`) were superseded by later changes and left behind, plus
  `pairedDevices`, which I wrote in #965 and never used. Removed.

Also verified: `thinkingLevel.*`'s six keys are built dynamically
(`t(\`thinkingLevel.${level}\`)`) and are not orphans, and the four orphan keys in
`remote.json` (`connectedAs`, `reconnectingAs`, `connectionHint`,
`agentUnavailable`) predate this work (#123, #242, #554) — left alone.

`make check-docs` reports the same failures before and after this change
(whitelisting of `agent/src/prompt/*.md`, and `docs/architecture/tasks.md` whose
Chinese pair another in-flight branch has not written yet); none of them comes
from these four files.
@huichen
huichen enabled auto-merge (squash) October 10, 2026 14:16
@huichen
huichen merged commit 0d3bb9a into main Oct 10, 2026
12 checks passed
@huichen
huichen deleted the docs/remote-client-role-docs branch October 10, 2026 14:20
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