Skip to content

fix: show the sign-in explanation when a proxy sign-in expires - #201584

Merged
jalehman merged 2 commits into
mainfrom
openclaw/rapid-krill
Nov 19, 2026
Merged

jalehman merged 2 commits into
mainfrom
openclaw/rapid-krill

Conversation

@jalehman

Copy link
Copy Markdown
Contributor

What Problem This Solves

When the Control UI sits behind a sign-in proxy such as Cloudflare Access and that sign-in expires, the "Sign in to continue loading content" dialog appeared with only "Couldn't load this panel." and a Retry button. Retry could never succeed. The dialog's own code was downloaded on demand, and once the proxy sign-in has expired, every new download is redirected to the sign-in page. So the dialog could not load in exactly the situation it exists for. OCE Fleet users reported this.

User Impact

User impact: when a proxy sign-in expires, people now see the intended explanation ("Your website sign-in has expired. Images and files cannot load until you sign in again…") with Not now and Sign in, instead of a panel-load error. Sign-in, Check again, the native Mac app reconnect, and the access probe work as before.

Why This Change Was Made

  • The recovery dialog is now imported statically, so it ships in the boot bundle the page has already loaded. The unreachable lazy-load error fallback, with its Retry button, and its unit test are removed.
  • The dialog renders inside the shared openclaw-modal-dialog element. That element is downloaded on demand from the New Session boot group, so on Chat it is not always loaded already. Recovery now preloads it at idle time when it starts, while access is still valid. If the preload fails, opening the dialog tries the download again, as it did before.
  • Statically importing the modal element was rejected: it added about 11.5 KB gzip and one request to Chat boot, which goes over the Chat boot budgets.
  • Accepted edge case: if the proxy sign-in expires before the idle preload finishes, for example a tab opened in the background and never shown, the modal element can still fail to load. That gap already exists on main.

Bundle cost, from scripts/check-control-ui-performance.mts against the main build: Chat boot JS +437 B gzip (1,331,339 B, under the 1,332,290 B limit), New Session boot JS +685 B, startup JS +1 B, and request counts unchanged. The local build of main already fails the CSS and Chat-boot-request checks by the same amounts as this branch, so those failures come from main.

Evidence

The browser E2E now redirects every /assets/** request to the sign-in page once access expires, the same way a real proxy behaves. It then checks that the dialog shows the sign-in explanation and never shows "Couldn't load this panel."

  • Main (053fb62), before the preload wait was added to the test: the service-worker-allowed interactive case shows the reported symptom, and the copy assertion fails. The service-worker-blocked case never opens the modal, because the modal element cannot be downloaded either. With the committed preload wait, main fails all 4 cases at that wait.
  • This branch: ui/src/e2e/browser-auth-recovery.e2e.test.ts passes 4/4, and ui/src/app/browser-auth-recovery.test.ts passes 13/13. pnpm tsgo:ui, pnpm tsgo:test:ui, oxlint, oxfmt and pnpm check:control-ui-controllers pass. ui/src/e2e/boot-module-boundaries.e2e.test.ts passes 18/18.
  • An independent review of the diff found no P0–P2 issues.

Clean comparison

Interactive renewal with the service worker allowed, 1280×900, synthetic conversation fixture. Before: main 053fb62. After: this branch.

Before After
Before: the sign-in dialog shows only "Couldn't load this panel." with Retry After: the sign-in dialog explains that the website sign-in expired

Annotated comparison

Before After
Panel load error highlighted instead of sign-in copy Sign-in explanation highlighted

🦞 Made with OpenClaw

@clawsweeper

clawsweeper Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 19, 2026
@clawsweeper

clawsweeper Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR loads the sign-in explanation eagerly and preloads its modal host before proxy access expires.

Example: Cloudflare Access expires while a Control UI conversation remains open.

  • Before: The recovery dialog shows “Couldn’t load this panel.” and Retry because its code download redirects to sign-in.
  • After: The dialog explains that website sign-in expired and offers Not now and Sign in.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, focused repair with inspected browser evidence, passing reviewed-head checks, and no actionable findings.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after browser captures show the recovery owner presenting the intended explanation after simulated proxy expiry; the supplied browser scenario exercises redirected assets and retains the existing sign-in and attachment-recovery checks.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Expired website access replaces the intended sign-in explanation with an unrelated panel-load error.
Reason: Restores documented recovery behavior with a small change; maintainer authorship establishes direction, including the recorded preload tradeoff.

Regression provenance

Regression provenance — suspected predecessor, not a causality claim: source commit e074991f0344 by Peter Steinberger; no PR verified.

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

Merge readiness

✅ Ready for maintainer review

Keep open: this PR fixes a verified recovery-dialog failure still present on current main. The focused change, inspected browser screenshots, and passing head CI support merging; no actionable defect was found.

Priority: P2
Reviewed head: 710170cc7e613e4e9845d619fb3163db8bcd4b36

Before merge

None.

Findings

None.

Agent review details

How this fits together

The document-level browser recovery owner receives failed HTTP-resource notifications, verifies website access, and presents sign-in recovery while retaining the conversation and draft.

flowchart TD
  A[Attachment request fails] --> B[Document recovery owner]
  B --> C[Website access probe]
  C --> D[Automatic renewal]
  D --> E[Recovery dialog]
  F[Idle modal preload] --> E
  E --> G[Sign in and verify access]
  G --> H[Retry failed attachments]
Loading

Technical review

Best possible solution:

Merge the focused recovery-loading change while retaining the existing document owner, shared modal loader, and explicitly accepted early-expiry limitation.

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

Current main downloads the recovery renderer only after expiry, when a sign-in proxy can redirect that download; the supplied before screenshot confirms the resulting fallback. No target code was executed during this read-only review.

Is this the best way to solve the issue?

The change fixes the unavailable-code dependency at its existing owner, reuses shared preload and registration mechanisms, and removes the obsolete fallback and its test without adding competing state.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Recovery renderer loading changes intended behavior with a stated reason (e168567: Keep the rarely used dialog out of startup while retaining the eager document-level recovery owner.)
  • Lazy-load fallback and removed loading test changes intended behavior with a stated reason (18596ee: Retain sign-in, retry, and dismissal controls when downloading the lazy recovery renderer fails.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source -16, Tests -51. Total -67 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 23 39 -16
Tests 2 8 59 -51
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 31 98 -67

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: Repairs misleading sign-in recovery for proxy-protected Control UI sessions; the existing fallback already retains a Sign in action.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Repairs misleading sign-in recovery for proxy-protected Control UI sessions; the existing fallback already retains a Sign in action.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 18, 2026, 10:02 PM ET / November 19, 2026, 03:02 UTC.

@jalehman
jalehman merged commit ff4a6c7 into main Nov 19, 2026
100 of 101 checks passed
@jalehman
jalehman deleted the openclaw/rapid-krill branch November 19, 2026 05:07
@jalehman

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 20, 2026
…law#201584)

* fix(ui): keep sign-in recovery dialog loadable after proxy expiry

* fix: show the sign-in explanation when a proxy sign-in expires

OpenClaw-Publication: 0494a4e8-0b01-894a-8db5-4e8a675e3501
github-actions Bot pushed a commit to clawhaven/openclaw that referenced this pull request Nov 23, 2026
…law#201584)

* fix(ui): keep sign-in recovery dialog loadable after proxy expiry

* fix: show the sign-in explanation when a proxy sign-in expires

OpenClaw-Publication: 0494a4e8-0b01-894a-8db5-4e8a675e3501

(cherry picked from commit ff4a6c7)

Release adaptation: Apply source eager dialog and idle modal preload exactly; adapt prior loading regression to post-entry proxy expiry rather than delete it, with isolated mock registry. Browser proof awaits native Chromium dependencies.

Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 24, 2026
* fix(ui): keep sign-in recovery dialog loadable after proxy expiry

* fix: show the sign-in explanation when a proxy sign-in expires

OpenClaw-Publication: 0494a4e8-0b01-894a-8db5-4e8a675e3501
(cherry picked from commit ff4a6c7)

Operator-requested 2026.11.10 stable backport (Dallin, 2026-11-24 04:15). Clean apply. Later main mentions: none.

Co-authored-by: RomneyDa <[email protected]>
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 P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant