Repository navigation
feat(desktop): guide connection activation into exact Scope selection - #2292
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
hireview001
left a comment
There was a problem hiding this comment.
- CI failed: macos (macos-15) (failure).
- CI failed: Desktop validation (failure). Failed steps: macos (macos-15) / Run pnpm test.
hidb4ai
left a comment
There was a problem hiding this comment.
The new draft-discard regression has a reproducible timing failure that also fails the macOS CI job. Please stabilize it before merging; details inline.
| await user.click(screen.getByRole("button", { name: "Scope B" })); | ||
| await answerConfirmation(user, true); | ||
| expect(screen.queryByRole("dialog")).toBeNull(); | ||
| expect((screen.getByLabelText("连接名称") as HTMLInputElement).value).toBe( |
There was a problem hiding this comment.
[P2] Await the connection draft reset before asserting its value
This assertion races the passive effect in Connections that resets the form when discardDraft changes. Closing the Scope dialog does not establish that this subsequent form update has completed. On head b55226e7, repeating this scenario 50 times reproduced 19 failures with Second draft instead of Second; the macOS ARM CI job fails at the same assertion. A probe that only awaited the reset with waitFor passed all 50 repetitions. Await the observable input reset (for example, with waitFor) before checking the remaining navigation behavior, and rerun the affected macOS check. This establishes a test synchronization defect, not evidence of a persistent production draft leak.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
hidb4ai
left a comment
There was a problem hiding this comment.
Re-reviewed e898e71. The earlier draft-reset test race is fixed by awaiting the observable input update, while the navigation and discard assertions remain intact. No blocking findings remain in this PR diff, and it adds no database tables or HTTP/MCP/IPC endpoints relative to the current base. Installed WebView/vault acceptance and the local-setup handoff remain separate qualification work.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Which issue or RFC does this PR close?
Refs #2103 (existing-Server portion of PR 02-B), #2101 and RFC #1455. #2103 remains open for approved local setup/default-Scope handoff with #2117 and installed-platform acceptance.
This PR targets master independently of #2291 and uses the existing native state/IPC contract. #2291 separately supplies deployment identity isolation.
Rationale for this change
Saving, checking and activating a connection need distinct feedback, and successful activation should guide users into an exact authorized Scope. Previously activation left users in the editor without that handoff.
What changes are included in this PR?
Are there any user-facing changes?
Existing Server setup becomes save → check → explicitly activate → choose an exact Scope → Memory. Reopening still loads saved profiles without activating a private session. No public API, persisted-profile, credential or IPC format changes.
Local installation/lifecycle implementation and approved default-Scope handoff remain with #2117 and its producer dependencies. Readiness separation remains follow-up work under #2101/#2105.
How was this change tested?
Windows 10 x64, Python 3.11.15, Rust 1.95.0:
--all-targets -- -D warnings, native probe build and IPC drift: passed.activeunset, followed by explicit activation, exact Scope selection and Memory save/search/exact reads.aedf7beb1ecff2ea1fade6ccdd8e4bf6a298f799; wheel SHA-256:fde108a81a872a6228aad54832f2cd8f899a53bb4a7ff5c321871891fdbc5b68. This used disposable fixture qualification with a dirty Desktop tree; executable/contract identities and limits are recorded indesktop/VALIDATION.md. Production qualification records are unchanged.uv run --no-sync prek run -a: all file hooks passed; default Windows type checking retains existing POSIX-only attribute diagnostics in unchanged Python files.ty check --python-platform linux: passed.AI usage statement
OpenAI Codex (GPT-6) assisted with implementation, local review, testing and documentation. Commands and real-Server harnesses were executed locally; validation limits are recorded above.