Repository navigation
fix(remote-link): name the Windows purge for a Windows Child and show Child commands as chips - #8637
Merged
Merged
Conversation
… Child commands as chips
Contributor
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Contributor
|
✅ Deterministic PR hygiene checks passed. |
…anaged location when the platform is unknown
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
lidge-jun
added a commit
that referenced
this pull request
Nov 13, 2026
No conflicts: dev's change to src/server/management/link-enrollment.ts and structure/remote-link.md merged with this branch's edits on its own.
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #8617 (merged), from its final review. When an apply leaves a Windows Child possibly connected because the planted binary could not be purged, the Remote Link page told the user to run
~/.cache/opencodex/bin/ocx-child detach --purge, a POSIX path that does not exist on Windows. The server wrote that line too.Change.
src/server/management/link-enrollment.ts, newliveResidual) now carries the closed words journalled replies already use:residualKind(plantwhen only the managed binary's purge removes it, elseenrollment), plusremotePlatformwhen the Child's platform is known. Its fixedrecoveryline names both locations a Windows plant uses:"%LOCALAPPDATA%\opencodex\bin\ocx-child.exe" detach --purge(Command Prompt), or"%USERPROFILE%\.cache\opencodex\bin\ocx-child.exe" detach --purgewhereLOCALAPPDATAis not set. The POSIX and enrollment lines are unchanged.readLinkJsonmapsresidualKind: "plant"withremotePlatformto a POSIX or a new Windows purge step (with a second line for the%USERPROFILE%location). A plant whose platform is not known, which is what a journalled--operation-idreply carries, gets a step that lists every managed location. Without those words the page still matches the fixed recovery lines, now including the Windows one. The server's text is never shown.{cmd}chip throughTrans, asgui/AGENTS.mdasks. The full-install step names two commands (ocx disconnectandocx restart), which a singleTranschip cannot hold, so it stays prose. The ocx-child step now names onlyocx-child detach, its primary command, instead of also offeringocx disconnectin prose.link_pin_conflictused one word for both Home and host; it now reads "主机(Home)… SSH 主机密钥" and the like. ko, ja, de, pt, ru and tr mix "Child" with a translated role, so there is no rule to apply and they keep "Child".Before (a Windows Child whose plant rollback failed):
After (Windows with its fallback location, a plant whose platform is not known, and macOS or Linux):
An ocx-child Child without a fresh plant gets one chip,
ocx-child detach(capture).The captures come from a scratch Vite page that mounts the real
LinkErrorNoticein the dashboard theme. They are on thepr-assetsbranch, linked by commit SHA, and are not committed to this branch.Stays inert by default. Nothing changes until an apply fails in a way that may leave the Child connected. The answer only gains fields; older dashboards that read only
recoverykeep working for POSIX and enrollment lines, and show their generic step for the new Windows line.Verification
Tests that failed first, with this change's source files restored to
origin/dev:gui/tests/remote-link.test.tsx: 6 failed. These were the four "names its Child command as a chip" cases (POSIX recovery line,plant+posix,plant+windows, ocx-child), the locale check that every locale has the Windows step and uses{cmd}exactly in the chip steps, and thereadLinkJsonvariant test.tests/server/link-enrollment-ephemeral-child.test.ts: failed to load (liveResidualdid not exist). The POSIX rollback case now also checksresidualKindandremotePlatform.Review round 1 (gpt-6.1-terra) found that the Windows step missed the
%USERPROFILE%location the plant uses withoutLOCALAPPDATA, and that a journalled plant reply, which names no platform, lost its purge step. Both are fixed; against the first head, the Windows-chip, journal-replay, locale andreadLinkJsontests failed (4) and the server test failed.Test changes from the #8617 review:
link_pin_conflictis driven through a stubbedconfirm-hostrefusal, the route the server answers it from, and every apply case goes through the onerefusedAt/applyRefusalhelper instead of repeating the flow.At head 206b015:
cd gui && bun test tests/remote-link.test.tsx tests/locale-parity.test.ts: 74 pass, 0 fail.bun test tests/server/link-enrollment-ephemeral-child.test.ts tests/server/link-enrollment.test.ts: 59 pass, 0 fail.cd gui && bun run lint:i18n: exit 0, no findings.cd gui && bun run build(tsc -band both Vite builds): exit 0; only the existing chunk-size warning.bun run typecheck,bun run privacy:scan,bun run structure:check: exit 0.NOT RUN: the full
bun run testand the full GUI suite; a real Windows Child.Checklist
structure/remote-link.mddescribes the new answer fields).