You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(platform): correlate device setup with its join command - #4257
Return the join grant's non-secret ID with the one-time command.
Add GET /api/app/sandbox-devices/join-tokens/:tokenId, guarded by the
existing admin ability and scoped in SQL to the authenticated organization and the administrator who minted the grant. It returns only deviceId
(null until used), with Cache-Control: no-store; inaccessible grants return
the same 404 as missing grants. No plaintext token or hash is read back.
Poll that grant while Add device is open. Only its enrolled device, present
in the current list and no longer offline, can complete this dialog. Separate
commands from the same administrator also stay separate. Remount on org changes.
Preserve inline generation retry and a fresh command per opening. Add focused
component/service/route/adapter regressions and manual box SET-B31.
Verification
Reproduced on origin/main at d29a3c8fe: the new component regression fails
because A confirms “Other administrator laptop is connected.” (12 controls pass).
Focused Vitest runs with the installed Node runner and --maxWorkers=1:
device section and Sandboxes settings components: 34 passed;
device service/routes and settings/backend adapters: 80 passed;
adjacent device settings/ticket and command tests: 7 passed;
backend query hook tests: 19 passed;
failure-message and single-toast guards: 75 passed.
Changed-file oxlint (including type-aware), oxfmt and git diff --check: passed.
Scoped TypeScript check (changed TS/TSX files plus required declarations and
their imports, bounded 2.8 GiB heap): passed; no whole-workspace tsc.
Opengrep over changed files: 0 findings. Manual layout gate and settings
guide-reference checker: passed.
Accessibility and EN/DE/FR sweep: no markup, accessible names or strings change;
the existing status announcement and inline retry remain. Existing device docs
describe the intended behavior now restored; no docs or migration needed.
Limits
No browser, E2E, full stack or full suite was run locally. The issue's frozen
macOS/PostgreSQL proof is not available in this sandbox and was not claimed as
rerun; backend unit tests capture the parameterized, creator/org-scoped SQL.
The new manual box is authored, not marked executed. Independent review and
exact-head CI remain required before merge. No CI rerun or cancellation.
Independent review record for exact head fc6cef96c848c908cdf1a9f678917b7a57a06c51: accept; no blocking findings.
Evidence reviewed:
AddDeviceBody polls the exact minted token and only completes when that token's device is present and non-offline; another administrator's enrollment, already-present devices, and new offline devices remain waiting.
Mint failure renders an inline retry.
The new read is admin-only, no-store, organization-scoped, creator-scoped, and returns the same 404 for missing/inaccessible grants.
Component, adapter, route, and service tests cover these controls.
Unrun proof: I did not rerun the frozen main regression, browser/full-stack proof, PostgreSQL proof, full platform suite, CI, or CI watch. The selected local run passed settings-sandbox.test.ts (12 tests); the other selected suites were blocked by this environment's dependency/config resolution (z.number undefined and Storybook file: preset resolution). No merge or push performed.
GitHub's native approval endpoint rejected this review because the repository token shares the PR author's GitHub principal (Review Can not approve your own pull request); this comment is the acceptance record requested by the independent-review task.
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
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.
What changed
GET /api/app/sandbox-devices/join-tokens/:tokenId, guarded by theexisting admin ability and scoped in SQL to the authenticated organization
and the administrator who minted the grant. It returns only
deviceId(null until used), with
Cache-Control: no-store; inaccessible grants returnthe same 404 as missing grants. No plaintext token or hash is read back.
in the current list and no longer offline, can complete this dialog. Separate
commands from the same administrator also stay separate. Remount on org changes.
component/service/route/adapter regressions and manual box
SET-B31.Verification
origin/mainatd29a3c8fe: the new component regression failsbecause A confirms “Other administrator laptop is connected.” (12 controls pass).
--maxWorkers=1:git diff --check: passed.their imports, bounded 2.8 GiB heap): passed; no whole-workspace tsc.
guide-reference checker: passed.
the existing status announcement and inline retry remain. Existing device docs
describe the intended behavior now restored; no docs or migration needed.
Limits
No browser, E2E, full stack or full suite was run locally. The issue's frozen
macOS/PostgreSQL proof is not available in this sandbox and was not claimed as
rerun; backend unit tests capture the parameterized, creator/org-scoped SQL.
The new manual box is authored, not marked executed. Independent review and
exact-head CI remain required before merge. No CI rerun or cancellation.
Closes #3681