Repository navigation
feat: make provider sign-in easy to find in plugin settings - #203379
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
✅ Maintainer security changes approvedA maintainer approved this revision with an explicit security approval comment.
A later push requires a fresh approval comment for an external contributor's PR. |
|
Codex review: blocked before merge. What this changesAdds provider sign-in to plugin settings, uses declared action labels, and offers a model chooser after sign-in. Example: Open an enabled GitHub Copilot plugin’s Settings.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this maintainer-authored PR delivers the requested Settings entry point and model choice, with convincing behavior proof and no actionable defects found. Priority: P2 Before merge
FindingsNone. Agent review detailsHow this fits togetherPlugin metadata supplies eligible sign-in methods to Gateway inspection and Models; Control UI delegates authentication and new-chat creation to their existing owners. flowchart LR
A[Plugin manifest] --> B[Gateway inspection]
B --> C[Plugin settings]
C --> D[Models sign-in dialog]
D --> E[Existing auth owner]
E --> F[Available model chooser]
F --> G[Existing session creation]
Technical reviewBest possible solution: Keep the shared Models authentication and session-creation paths, with plugin-scoped discovery and chat-only model selection. Do we have a high-confidence way to reproduce the issue? Current-main source confirms the missing Settings action, and the supplied built-Gateway comparison reports failure at that action before the change. Is this the best way to solve the issue? The implementation fits existing ownership: manifest metadata controls eligibility, Models owns authentication, and session creation applies the chosen model without changing the default. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8ab246473799. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +321, Tests +222, Docs +9. Total +552 across 35 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (7 earlier review cycles)
Reviewed November 22, 2026, 2:20 PM ET / 19:20 UTC (Revision 8). |
|
I ran the same browser regression against a real isolated Gateway and its built Control UI on macOS, with a loopback-only test provider.
The focused test-type check and type-aware lint passed. The 30 Bun UI tests and 22 plugin inspection tests passed. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
/allow-security-sensitive-change |
…#203379) * feat(ui): make provider sign-in accessible from plugin settings * fix(ui): stabilize provider sign-in validation * fix(ui): default guided actions to the choice label * test(ui): expect the declared label after OAuth * chore(ci): retry interrupted ratchet check * fix(ui): avoid shadowing the recovered sign-in choice
…icit nil (#204023) Two scheduled-`main` reds are fixed: `test/scripts/sqlite-schema-assets.test.ts` and the `macos-swift (tests)` SwiftLint step. Part of #204008. ## Problem 1. `sqlite-schema-assets.test.ts` (both cases) fails on `main` since the 06:45 UTC scheduled run: `TypeError: The "path" argument must be of type string. Received undefined` in `retainUpdateRuntimeImports`. #203901 changed that function's second argument from a list of paths to `{ sourcePath, identityPath }` records and updated its production caller. The test still passed bare paths. 2. `macos-swift (tests)` fails SwiftLint `implicit_optional_initialization` at `apps/macos/Sources/OpenClaw/OnboardingAISetupSupport.swift:295` (`var actionLabel: String? = nil`), added by #203379. Ordinary PRs do not run this lane, so only scheduled `main` CI saw it. ## Solution - The test now builds `{ sourcePath, identityPath }` records (the same path for both, because the test does not relocate identity). - Drop `= nil`. An optional `var` already defaults to `nil` in the memberwise initializer, and `Decodable` decoding is unchanged. ## Evidence - `sqlite-schema-assets.test.ts`: the `main` copy fails both cases locally with the same `TypeError`; this branch passes both. - SwiftLint 0.65.1 (the version `scripts/install-swift-tools.sh` pins) with `config/swiftlint.yml --strict`: `main` file 1 error (`implicit_optional_initialization` at 295:13), this branch 0 errors. Run with SourceKit disabled, because this host has no Xcode; this rule is syntax-only. Co-authored-by: Ayaan Zaidi <[email protected]>
…04173) `provider-browser-login-first-model.real-gateway.e2e.test.ts` passes again. It follows the sign-in dialog that #203379 introduced: choose a model, then start the chat. Part of #204008. ## Problem Since #203379 ("make provider sign-in easy to find in plugin settings"), a completed provider sign-in shows **Choose a model** first. "Start a new chat with …" appears after the user chooses. #203379's own test pins this for a verified sign-in (`model-providers-page.login-start-chat.test.ts`, case `verified: true`). The first-model e2e still expected the model name and the starter in the first render, so it has failed on every scheduled run since 20:25Z on 2026-11-22 (first red a63a429; the window from 8ab2464 contains #203379). Measured locally from the page: the completion carried `modelActivation.modelRef = browser-login-fixture/ready`, and the refreshed catalog listed that model. The dialog showed "Fixture browser sign-in is ready" and "Choose a model". ## Solution Test-only. The e2e clicks **Choose a model** and then uses the starter. The other assertions are unchanged: the agent primary is the account that signed in (`browser-login-fixture/ready@browser-login-fixture:default`), and the starter chat answers through the fixture provider. The test title now says what it proves. ## Evidence - `provider-browser-login-first-model.real-gateway.e2e.test.ts`: fails on `main` (no "… is ready for your agent." text); passes on this branch against a fresh `pnpm ui:build`. Co-authored-by: Ayaan Zaidi <[email protected]>
…icit nil (openclaw#204023) Two scheduled-`main` reds are fixed: `test/scripts/sqlite-schema-assets.test.ts` and the `macos-swift (tests)` SwiftLint step. Part of openclaw#204008. ## Problem 1. `sqlite-schema-assets.test.ts` (both cases) fails on `main` since the 06:45 UTC scheduled run: `TypeError: The "path" argument must be of type string. Received undefined` in `retainUpdateRuntimeImports`. openclaw#203901 changed that function's second argument from a list of paths to `{ sourcePath, identityPath }` records and updated its production caller. The test still passed bare paths. 2. `macos-swift (tests)` fails SwiftLint `implicit_optional_initialization` at `apps/macos/Sources/OpenClaw/OnboardingAISetupSupport.swift:295` (`var actionLabel: String? = nil`), added by openclaw#203379. Ordinary PRs do not run this lane, so only scheduled `main` CI saw it. ## Solution - The test now builds `{ sourcePath, identityPath }` records (the same path for both, because the test does not relocate identity). - Drop `= nil`. An optional `var` already defaults to `nil` in the memberwise initializer, and `Decodable` decoding is unchanged. ## Evidence - `sqlite-schema-assets.test.ts`: the `main` copy fails both cases locally with the same `TypeError`; this branch passes both. - SwiftLint 0.65.1 (the version `scripts/install-swift-tools.sh` pins) with `config/swiftlint.yml --strict`: `main` file 1 error (`implicit_optional_initialization` at 295:13), this branch 0 errors. Run with SourceKit disabled, because this host has no Xcode; this rule is syntax-only. Co-authored-by: Ayaan Zaidi <[email protected]>
…enclaw#204173) `provider-browser-login-first-model.real-gateway.e2e.test.ts` passes again. It follows the sign-in dialog that openclaw#203379 introduced: choose a model, then start the chat. Part of openclaw#204008. ## Problem Since openclaw#203379 ("make provider sign-in easy to find in plugin settings"), a completed provider sign-in shows **Choose a model** first. "Start a new chat with …" appears after the user chooses. openclaw#203379's own test pins this for a verified sign-in (`model-providers-page.login-start-chat.test.ts`, case `verified: true`). The first-model e2e still expected the model name and the starter in the first render, so it has failed on every scheduled run since 20:25Z on 2026-11-22 (first red 95d8741; the window from 7468e30 contains openclaw#203379). Measured locally from the page: the completion carried `modelActivation.modelRef = browser-login-fixture/ready`, and the refreshed catalog listed that model. The dialog showed "Fixture browser sign-in is ready" and "Choose a model". ## Solution Test-only. The e2e clicks **Choose a model** and then uses the starter. The other assertions are unchanged: the agent primary is the account that signed in (`browser-login-fixture/ready@browser-login-fixture:default`), and the starter chat answers through the fixture provider. The test title now says what it proves. ## Evidence - `provider-browser-login-first-model.real-gateway.e2e.test.ts`: fails on `main` (no "… is ready for your agent." text); passes on this branch against a fresh `pnpm ui:build`. Co-authored-by: Ayaan Zaidi <[email protected]>
Closes #203371
What Problem This Solves
If I start on an installed provider plugin’s page, I have to go to Models separately to find its sign-in.
User Impact
An enabled provider plugin with a guided sign-in has Sign in under Settings → Accounts → Models. It opens the existing Models dialog with that plugin’s methods.
The provider picker uses the plugin’s labels. The declared method label also supplies the default guided action text, and explicit action-label overrides keep their existing presentation. After guided sign-in, Choose a model lets me start a new chat with an available model and keep my current default.
Why This Change Was Made
The plugin already declares its sign-in methods. OpenClaw can use that metadata for the entry point and the visible action text. Plugins without guided sign-in keep their existing Settings controls.
Evidence