Repository navigation
fix(gui): name the leftover link key and trust-file refusals on the Remote Link page - #8617
Merged
Merged
Conversation
…emote Link page The Home answers five enrollment codes that the dashboard did not know, so it showed "Remote link request could not be completed." for each: link_pin_conflict, host_key_changed, trust_file_unexpected, key_cleanup_failed and link_cleanup_uncertain. They are now in LINK_ERROR_CODES with strings in every locale; the two cleanup codes tell the person to revoke the leftover link key under API keys, as ocx link add already does.
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. |
…nrollment Review round 1 on #8617: the cleanup messages claimed the Child was not connected, but the server sends key_cleanup_failed and link_cleanup_uncertain with residual: true when the Child may still be connected. The dashboard now keeps that flag as a fixed variant (the server's recovery line is matched against the lines it writes, never shown) and adds a translated Child step: detach --purge, ocx-child detach, ocx disconnect and restart, or a generic check. The cleanup messages now say enrollment did not complete, as the CLI does.
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. |
Merged
3 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
The Remote Link page showed "Remote link request could not be completed." for five refusals the Home already returns while adding a Child. Two of them leave a link key behind that the person must revoke, and the CLI says so; the dashboard did not. The dashboard also ignored the server's
residual: trueflag, which means the Child may still be connected.link_pin_conflictPOST /api/link/confirm-hosthost_key_changedPOST /api/link/applytrust_file_unexpectedPOST /api/link/applykey_cleanup_failedPOST /api/link/applyrollbacklink_cleanup_uncertainPOST /api/link/applyrollbackThe five codes. They are added to
LINK_ERROR_CODESingui/src/remote-link-api.tsand to theERROR_TKEYmap behinderrorKeyingui/src/pages/RemoteLink.tsx. Each of the 11 locale catalogs gets its own translation, none copied from English. The two cleanup messages match the CLI'sHOME_CLEANUPwording insrc/cli/link-enrollment.ts.When the Child may still be connected. For any refusal,
readLinkJsonnow readsresidual: trueintoLinkApiError.residual. That value is one of four fixed variants:purge,ephemeralorfull, which match the three recovery lines insrc/server/management/link-enrollment.ts, orunknownfor any other line. The server's recovery text is never shown as such. The error notice then adds a translated step that starts with "The Child may still be connected." and names the command, asocx link addalready does.Before (
key_cleanup_failedfrom apply):After, without the residual flag. This capture predates the wording change and still reads "The Child was not connected"; the current text reads "Enrollment did not complete", as the next capture shows:
After, with
residual: trueand the ephemeral recovery line, at the current head:The captures come from a local Vite page that mounts the real
RemoteLinkcomponent with a stubbed fetch. They live on thepr-assetsbranch and are linked by commit SHA, so no image is committed to this branch.Stays the same. No server code or wire format changes. Every other code keeps its current text, and unknown codes still fall back to the generic message. The extra Child step appears only when the server sent
residual: true.Verification
Tests that failed first in
gui/tests/remote-link.test.tsx:readLinkJsonkeeping the residual variant.At head 3ded712:
cd gui && bun test tests/remote-link.test.tsx tests/locale-parity.test.ts tests/i18n-locales.test.ts: 86 pass, 0 fail. This includes the existing guard that everyLINK_ERROR_CODESentry is still sent by a Home route.cd gui && bunx tsc -b: exit 0.bun run lint:gui: exit 0.bun run privacy:scan: exit 0.NOT RUN: the full
bun run testand the full GUI suite. The change touches only the GUI error copy, the error map andreadLinkJson, so CI covers the rest.Checklist