Skip to content

fix(ui): complete provider sign-in from the waiting dialog - #148300

Merged
obviyus merged 4 commits into
mainfrom
codex/provider-signin-ux
Sep 14, 2026
Merged

obviyus merged 4 commits into
mainfrom
codex/provider-signin-ux

Conversation

@obviyus

@obviyus obviyus commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Provider sign-in can require extra confirmation screens, duplicate pairing details, and retain an input dialog after credentials are saved.

Fix

Shared controls start binary choices directly and show one sign-in panel with Open sign-in, Copy code or link, waiting status, and Cancel. Device polling starts automatically. Browser login observes completion while manual entry stays available under a disclosure. Completion and cancellation close the dialog. Recovery instructions remain visible when a connection fails.

ChatGPT offers device pairing and browser login.

Consumers

The existing wizard owns authentication state. Shared controls serve Models, setup, and Custodian. Command-line clients retain the sign-in destination, code, and provider instructions through progress updates. The public SDK keeps its login function and options contract.

Validation

Real Gateway browser and device approval saved credentials and closed the dialog. Saved profiles survived a reload. Cancellation stopped the provider wait without saving credentials. Manual entry retained typed text during background observation. A failed connection displayed recovery guidance.

The documented personal-account CLI completed sign-in and cancellation with a delayed status read, retaining the complete device instructions.

Telegram Test Server checks passed for OpenAI device sign-in, saved credentials, sign-in status refresh, an existing attempt, and cancellation.

Passed registered UI tests, auth/provider and command-line suites, browser scenarios, static checks, and bundle budgets. Source reproduction. Sign-in screenshots. Recovery screenshots.

@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@obviyus

obviyus commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator Author

Screenshot evidence from synthetic browser fixtures.

Sign-in choices

Sign-in choices

Browser sign-in

Browser sign-in

Device pairing

Device pairing

Light layout · Narrow layout

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 14, 2026, 11:30 AM ET / 15:30 UTC.

ClawSweeper review

What this changes

The PR streamlines provider sign-in dialogs, starts device polling automatically, handles background completion, and makes ChatGPT device pairing the featured sign-in choice.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 4 items remain

The central fix remains useful and is not superseded on current main. Keep this protected PR open; review identified one actionable regression in provider recovery guidance.

Priority: P2
Reviewed head: 53f5fde0aae222a7bedcaa4144f2f6f0329328bc

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch has useful lifecycle coverage and clear visual evidence, but broad note suppression needs correction before merge.
Proof confidence 🌊 off-meta tidepool Not applicable: The trusted-author exemption applies to ordinary contributor runtime proof. Inspected synthetic screenshots show the changed controls, and boundary tests cover completion, but neither establishes live provider completion; the separate required before/after screenshot delivery remains unresolved.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The trusted-author exemption applies to ordinary contributor runtime proof. Inspected synthetic screenshots show the changed controls, and boundary tests cover completion, but neither establishes live provider completion; the separate required before/after screenshot delivery remains unresolved.
Evidence reviewed 10 items Introduced note suppression: The introduced OAuth/device-code branch acknowledges every note without passing it to the renderer; it does not distinguish redundant instructions from prerequisite failures or recovery guidance.
Concrete affected recovery path: A TLS-certificate prerequisite failure emits detailed repair instructions through prompter.note, then throws a shorter error containing only the prerequisite failure message. The new browser branch discards the detailed instructions.
Current-main necessity: Current main retains blocking device-code notes and lacks the introduced browser completion polling. The inspected main-to-head differences on these central owners match the introduced changes.
Findings 1 actionable finding [P2] Preserve prerequisite and recovery notes during sign-in
Security None None.

How this fits together

Provider plugins supply sign-in instructions, browser destinations, and device codes to a Gateway-owned wizard session. The Control UI presents those steps and reconciles completion with the Models and model-setup pages.

flowchart LR
  A[User selects provider] --> B[Provider authentication]
  B --> C[Gateway wizard session]
  C --> D[Browser dialog and polling]
  D --> E[Provider sign-in page]
  E --> B
  C --> F[Saved credential result]
  F --> G[Models page refresh]
Loading

Before merge

  • Preserve prerequisite and recovery notes during sign-in (P2) - This branch acknowledges every OAuth/device-code note without rendering it. For example, loginOpenAICodexOAuth emits the Homebrew certificate repair instructions through prompter.note when TLS preflight fails, then throws a shorter error that omits those instructions. Users now lose the actionable recovery guidance; Chutes' OAuth troubleshooting notes are suppressed too. Preserve generic provider notices instead of treating the authentication kind as proof that every note is redundant.
  • Resolve merge risk (P1) - Auth-kind-based note suppression changes how existing provider plugins communicate prerequisites and recovery instructions.
  • Resolve merge risk (P1) - The captured evidence does not establish the required before/after screenshot delivery in the originating chat and a body-linked PR location.
  • Complete next step (P2) - Preserve provider recovery notes, add focused regression coverage, and complete sanitized before/after UI screenshot delivery plus Telegram evidence for the changed device-code messages.

Findings

  • [P2] Preserve prerequisite and recovery notes during sign-in — ui/src/pages/model-setup/wizard-runner.ts:415-423
Agent review details

Security

None.

PR surface

Source +171, Tests +284. Total +455 across 25 files.

View PR surface stats
Area Files Added Removed Net
Source 17 328 157 +171
Tests 8 350 66 +284
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 25 678 223 +455

Review metrics

Metric Value Why it matters
Implementation growth production +171 net lines; tests +284 net lines The stated growth supports shared browser-window and completion lifecycle handling, with more regression coverage than production growth.
Featured sign-in 1 featured method switched; 0 auth methods removed ChatGPT device pairing replaces browser OAuth as the featured choice while both methods remain available.

Merge-risk options

Maintainer options:

  1. Preserve generic provider notices (recommended)
    Keep prerequisite and recovery notes visible, limiting automatic advancement to steps whose existing contract requires no user-facing notice.

Technical review

Best possible solution:

Keep Gateway-owned authentication and automatic completion, while preserving provider diagnostics as visible information and retaining existing credential and model settings.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: a ChatGPT browser login with a TLS prerequisite failure emits repair guidance as a note that the new runner discards before displaying the shorter error. This path was not executed.

Is this the best way to solve the issue?

Partly: reusing the wizard owner and shared browser runner is appropriate, but skipping every authentication note is broader than the redundant-screen problem.

Full review comments:

  • [P2] Preserve prerequisite and recovery notes during sign-in — ui/src/pages/model-setup/wizard-runner.ts:415-423
    This branch acknowledges every OAuth/device-code note without rendering it. For example, loginOpenAICodexOAuth emits the Homebrew certificate repair instructions through prompter.note when TLS preflight fails, then throws a shorter error that omits those instructions. Users now lose the actionable recovery guidance; Chutes' OAuth troubleshooting notes are suppressed too. Preserve generic provider notices instead of treating the authentication kind as proof that every note is redundant.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against a5fb8446c0e1.

Labels

Label changes:

  • add P2: This is a bounded provider sign-in improvement with a concrete recovery-guidance regression.
  • add merge-risk: 🚨 compatibility: Existing provider plugins' note messages can disappear from OAuth and device-code dialogs after merge.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The trusted-author exemption applies to ordinary contributor runtime proof. Inspected synthetic screenshots show the changed controls, and boundary tests cover completion, but neither establishes live provider completion; the separate required before/after screenshot delivery remains unresolved.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The trusted-author exemption applies to ordinary contributor runtime proof. Inspected synthetic screenshots show the changed controls, and boundary tests cover completion, but neither establishes live provider completion; the separate required before/after screenshot delivery remains unresolved.
  • add proof: telegram-e2e: This PR needs Telegram Test Server proof with the repository E2E skill. Shared provider changes alter Telegram /login text and make Copilot use the structured tap-to-copy device-code message.

Label justifications:

  • P2: This is a bounded provider sign-in improvement with a concrete recovery-guidance regression.
  • merge-risk: 🚨 compatibility: Existing provider plugins' note messages can disappear from OAuth and device-code dialogs after merge.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The trusted-author exemption applies to ordinary contributor runtime proof. Inspected synthetic screenshots show the changed controls, and boundary tests cover completion, but neither establishes live provider completion; the separate required before/after screenshot delivery remains unresolved.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The trusted-author exemption applies to ordinary contributor runtime proof. Inspected synthetic screenshots show the changed controls, and boundary tests cover completion, but neither establishes live provider completion; the separate required before/after screenshot delivery remains unresolved.
  • proof: telegram-e2e: This PR needs Telegram Test Server proof with the repository E2E skill. Shared provider changes alter Telegram /login text and make Copilot use the structured tap-to-copy device-code message.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs run src/wizard/session.test.ts.
  • [P1] pnpm --dir ui test -- src/pages/model-providers/model-providers-page.login.test.ts src/pages/model-setup/wizard-runner.test.ts src/pages/model-setup/view.test.ts.
  • [P1] git diff --check.

What I checked:

  • Introduced note suppression: The introduced OAuth/device-code branch acknowledges every note without passing it to the renderer; it does not distinguish redundant instructions from prerequisite failures or recovery guidance. (ui/src/pages/model-setup/wizard-runner.ts:415, 53f5fde0aae2)
  • Concrete affected recovery path: A TLS-certificate prerequisite failure emits detailed repair instructions through prompter.note, then throws a shorter error containing only the prerequisite failure message. The new browser branch discards the detailed instructions. (extensions/openai/openai-chatgpt-oauth.runtime.ts:166, 53f5fde0aae2)
  • Current-main necessity: Current main retains blocking device-code notes and lacks the introduced browser completion polling. The inspected main-to-head differences on these central owners match the introduced changes. (src/wizard/session.ts:137, a5fb8446c0e1)
  • Latest-release inspection: The v2026.9.4 wizard source also retains the earlier device-code prompt implementation. No released implementation of this PR's central change was established. (src/wizard/session.ts:120, 3a9d69db306c)
  • Inspected visual evidence: Inspected all four prepared screenshots from fix(ui): complete provider sign-in from the waiting dialog #148300 (comment): choices, browser waiting, and dark/light device pairing. They directly show the new controls and warning, but are synthetic after-state fixtures, without callback diagnostics or a before-state comparison. The captured PR body does not link this evidence comment. (53f5fde0aae2)
  • Boundary tests: The added registered Models-page tests use WizardSession and simulated requests to cover completion, delayed terminal delivery racing Submit, cancellation, refresh warnings, and stopped polling. Browser scenarios use a mocked Gateway and verify detached navigation and completion rendering. These were inspected, not executed during this read-only review. (ui/src/pages/model-providers/model-providers-page.login.test.ts:135, 53f5fde0aae2)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Preserve provider prerequisite and recovery notes and cover a failing prerequisite through the registered UI.
  • Attach sanitized before/after screenshots in the originating chat and a PR-body-linked evidence location.
  • Provide Telegram Test Server evidence for the changed provider device-code messages.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@obviyus

obviyus commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator Author

Browser sign-in and recovery, using synthetic test data.

Waiting for sign-in

Waiting for sign-in

Manual entry

Manual sign-in entry

Connection recovery guidance

Connection recovery guidance

@obviyus

obviyus commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator Author

Source reproduction with a dummy provider.

Source reproduction with a dummy provider

@obviyus

obviyus commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator Author

landpr-approve-unrelated-red
pr: 148300
head: 8f49541
run: 34871738078 attempt: 1
failed: preflight job=104069032607 conclusion=failure
check: openclaw/ci-gate

@obviyus
obviyus merged commit ae1205d into main Sep 14, 2026
89 of 92 checks passed
@obviyus
obviyus deleted the codex/provider-signin-ux branch September 14, 2026 17:25
@obviyus

obviyus commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator Author
  • Bug: Provider sign-in could retain a waiting dialog or omit actionable instructions from text clients.
  • Fix: Shared controls observe completion and cancellation, preserve recovery guidance, and retain complete device instructions through progress updates.
  • Validation: Real Gateway browser/device approval and persistence, documented personal-account CLI sign-in/cancellation, and Telegram Test Server OpenAI sign-in/status refresh passed. Targeted suites, static checks, and UI budgets passed.

steipete added a commit that referenced this pull request Sep 14, 2026
Choose Twitch through the current two-option button instead of the retired
radio and Continue controls. Preserve the typed answer, single session
rotation, and no-replay assertions after the UI change in #148300.
steipete added a commit that referenced this pull request Sep 14, 2026
* refactor(update): consolidate status check state

Keep connection and read-error facts in the progress snapshot, represent status checks with one request state, and reuse the recovery predicate. Remove redundant test waits and the warning assertion covered before registry lookup. Preserve the behavior introduced in #147883.

* test(ui): reuse shared server for accent selection

Keep the existing accent and persistence assertions while replacing the private mock-dev subprocess with the suite-owned server and a signed-in mock Gateway.

* test(ui): keep cloud recovery history consistent

Use the same durable assistant reply and producer run identity in history and live events. Preserve cloud recovery assertions and deadlines when terminal delivery precedes the persisted reply.

* test(wizard): run recovery integration in the broker host

Route the real shared-state consumer through the existing isolated infra forks and exclude it from the wizard thread pool. Preserve recovery assertions and broker admission guards after the metadata-worker migration.

* chore(test): drop routing changes already landed on main

Main now routes wizard recovery through the database forks and excludes it
from the wizard thread pool (#148337). Remove this PR's duplicate changes
so the final merged list contains the test exactly once.

* fix(test): remove duplicate wizard recovery registration

The independent routing additions in #148337 and #147684 registered the
same test twice and stopped CI shard planning. Retain the canonical entry
after setup.test.ts and remove the duplicate before it.

* test(custodian): follow immediate wizard choices

Choose Twitch through the current two-option button instead of the retired
radio and Continue controls. Preserve the typed answer, single session
rotation, and no-replay assertions after the UI change in #148300.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 15, 2026
…148300)

## Problem

Provider sign-in can require extra confirmation screens, duplicate pairing details, and retain an input dialog after credentials are saved.

## Fix

Shared controls start binary choices directly and show one sign-in panel with Open sign-in, Copy code or link, waiting status, and Cancel. Device polling starts automatically. Browser login observes completion while manual entry stays available under a disclosure. Completion and cancellation close the dialog. Recovery instructions remain visible when a connection fails.

ChatGPT offers device pairing and browser login.

## Consumers

The existing wizard owns authentication state. Shared controls serve Models, setup, and Custodian. Command-line clients retain the sign-in destination, code, and provider instructions through progress updates. The public SDK keeps its login function and options contract.

## Validation

Real Gateway browser and device approval saved credentials and closed the dialog. Saved profiles survived a reload. Cancellation stopped the provider wait without saving credentials. Manual entry retained typed text during background observation. A failed connection displayed recovery guidance.

The documented personal-account CLI completed sign-in and cancellation with a delayed status read, retaining the complete device instructions.

Telegram Test Server checks passed for OpenAI device sign-in, saved credentials, sign-in status refresh, an existing attempt, and cancellation.

Passed registered UI tests, auth/provider and command-line suites, browser scenarios, static checks, and bundle budgets. [Source reproduction](openclaw#148300 (comment)). [Sign-in screenshots](openclaw#148300 (comment)). [Recovery screenshots](openclaw#148300 (comment)).

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 15, 2026
* refactor(update): consolidate status check state

Keep connection and read-error facts in the progress snapshot, represent status checks with one request state, and reuse the recovery predicate. Remove redundant test waits and the warning assertion covered before registry lookup. Preserve the behavior introduced in openclaw#147883.

* test(ui): reuse shared server for accent selection

Keep the existing accent and persistence assertions while replacing the private mock-dev subprocess with the suite-owned server and a signed-in mock Gateway.

* test(ui): keep cloud recovery history consistent

Use the same durable assistant reply and producer run identity in history and live events. Preserve cloud recovery assertions and deadlines when terminal delivery precedes the persisted reply.

* test(wizard): run recovery integration in the broker host

Route the real shared-state consumer through the existing isolated infra forks and exclude it from the wizard thread pool. Preserve recovery assertions and broker admission guards after the metadata-worker migration.

* chore(test): drop routing changes already landed on main

Main now routes wizard recovery through the database forks and excludes it
from the wizard thread pool (openclaw#148337). Remove this PR's duplicate changes
so the final merged list contains the test exactly once.

* fix(test): remove duplicate wizard recovery registration

The independent routing additions in openclaw#148337 and openclaw#147684 registered the
same test twice and stopped CI shard planning. Retain the canonical entry
after setup.test.ts and remove the duplicate before it.

* test(custodian): follow immediate wizard choices

Choose Twitch through the current two-option button instead of the retired
radio and Continue controls. Preserve the typed answer, single session
rotation, and no-replay assertions after the UI change in openclaw#148300.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui commands Command implementations extensions: github-copilot extensions: minimax extensions: openai extensions: radius extensions: xai gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant