Skip to content

feat(ui): prepare dormant browser capability screen - #168360

Merged
steipete merged 10 commits into
mainfrom
solid2/p1-15
Oct 10, 2026
Merged

steipete merged 10 commits into
mainfrom
solid2/p1-15

Conversation

@steipete

@steipete steipete commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Prepares the Control UI to explain unsupported browsers at the Solid cutover instead of starting an application whose native overlays cannot work.

User Impact

Dormant until the Solid cutover. VITE_OPENCLAW_REQUIRE_MODERN_BROWSER defaults off, so current browser requirements do not change. When enabled, the screen names macOS/iOS 26.2, Safari 26.2, and recent Chrome/Firefox. The macOS host offers Open in browser through its existing link bridge.

Why This Change Was Made

Early admission detects anchors, popovers, invoker commands, and field sizing. The first three are required; field sizing stays optional for the approved Firefox floor. Entry and bootstrap share admission so bundled module ordering cannot mount the application first.

Rejected admission retires automatic document recovery before downloading the fallback. Slow downloads survive the watchdog deadline. Failed downloads show a self-contained manual-retry panel; successful rendering settles the normal mount watchdog. Genuine mount failures retain their existing automatic recovery. English copy follows the existing i18n catalog flow.

Evidence

Final source: cac4ae0383640aa3608a1ba34703318e244d9f6f. Testbox tbx_01m4jrj03mzxz8fctx2q8ymmtt, run 38047932312, wrapper exit 0.

  • pnpm test ui/src/app/browser-capabilities.test.ts --maxWorkers=1: 7 passed; 1.86 s wall time (approximately 1.9 CI seconds).
  • pnpm test ui/src/app/mount-fallback.test.ts --maxWorkers=1: 14 passed; 2.43 s wall time (approximately 2.4 CI seconds). New cases failed before the corresponding fixes.
  • pnpm test ui/src/e2e/browser-capabilities.e2e.test.ts --maxWorkers=1: 7 passed; 39.55 s wall time (approximately 39.6 CI seconds). Real production bundling proves enabled/dormant admission, a pending fallback beyond the watchdog deadline, failed-asset manual retry, native dispatch, and admission without field sizing.
  • pnpm test ui/src/e2e/mount-recovery.e2e.test.ts --maxWorkers=1: passed; 7.30 s wall time. A genuine failed initial module still recovers to a working application.
  • UI, UI E2E, and UI app test typecheck graphs and focused lint: passed on the final source. Keyless pnpm ui:i18n:baseline: unchanged.
  • Full pnpm check:changed --base 10d3967be440ea06a7e2a8c985edf9dc7664e23b, all selected core/root typecheck partitions, and pnpm ui:build passed on 005001c9c739f; subsequent proof targets the changed watchdog and admission contracts.
  • Raw-import guard: five regression cases and the real Control UI source-boundary test pass. Existing raw local assets are recognized without hiding missing files or executable source backedges. The native action follows the existing cursor-policy marker.
  • Codex autoreview: no actionable findings. No dependencies or budgets changed.

Prior matched-toolchain disabled-gate comparison: startup JS 373,782 → 373,814 bytes gzip (+32 bytes, 0.009%), eight requests unchanged. Chat boot JS decreased 461 bytes and New Session boot JS decreased 454 bytes. The strict absolute ceiling of 373,454 bytes was already exceeded by the base by 328 bytes; the +32-byte delta is below the 64-byte build-variance allowance. No budget was raised or re-baselined. Later document recovery changes add 191 bytes to the source HTML gzip size.

Inherited CI failures: run 38047823112, attempt 2 completed with twelve failures across five UI E2E shards: instant-thread positioning, mobile-shell geometry, collaborator scroll, native conversation geometry, position rail, and guest publication. All twelve reproduce on the exact main baseline 8420f82cbbf8bd0114cacc39fa51299f92851a6f; the relevant test/render/style/fixture/dependency inputs are identical in the tested merge. All other selected checks passed. The first attempt had a cancelled job with a failed test step; the evidence rerun allowed complete terminal results without changing source or weakening assertions. Native landing uses the documented inherited-failure exception with all five roots attributed.

Baseline reproductions: https://github.com/openclaw/openclaw/actions/runs/38048792249, https://github.com/openclaw/openclaw/actions/runs/38051233754, https://github.com/openclaw/openclaw/actions/runs/38051725347.

Screenshots

Synthetic headless-browser fixtures only. Desktop and mobile in light/dark, plus the macOS bridge variant in light/dark. The native bridge is simulated; no native application or live Gateway was modified.

Before: current UI with the gate disabled

Unsupported browser: desktop light

Unsupported browser: desktop dark

Unsupported browser: mobile light

Unsupported browser: mobile dark

macOS bridge variant: light

macOS bridge variant: dark

Failed guidance download: self-contained manual retry

@clawsweeper

clawsweeper Bot commented Oct 10, 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 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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 10, 2026
@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Adds a disabled-by-default browser capability gate with upgrade guidance, manual recovery, and the existing native-browser handoff.

Example: The future cutover build enables VITE_OPENCLAW_REQUIRE_MODERN_BROWSER=true in a browser without popover support.

  • Before: The application attempts to start without explaining its missing overlay capabilities.
  • After: The browser sees upgrade guidance without automatic recovery reloads; current builds leave the gate disabled.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused, directed groundwork with inspected visual proof, meaningful production-entry coverage, and no actionable findings; incomplete CI is not represented as passing.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected browser screenshots show the existing application with admission disabled and the new guidance with admission rejected; production-bundle scenarios cover recovery and simulated native dispatch, without claiming native-device qualification.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: An older browser connecting after the planned renderer cutover needs understandable guidance when required native overlay features are unavailable.
Reason: The recorded migration direction specifically calls for this dormant foundation, which adds a visible recovery path without prematurely raising browser requirements.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR provides useful, maintainer-directed migration groundwork, preserves current browser requirements, and has no actionable correctness findings.

Priority: P2
Reviewed head: cac4ae0383640aa3608a1ba34703318e244d9f6f

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI document loads browser admission before application startup; admission either permits the existing application or displays a terminal guidance screen using the document's recovery owner.

flowchart TD
  A[Control UI document] --> B[Browser admission]
  B --> C[Existing application startup]
  B --> D[Unsupported browser guidance]
  D --> E[Existing native link bridge]
  B --> F[Document recovery owner]
  F --> G[Manual retry panel]
Loading

Technical review

Best possible solution:

Land the dormant foundation through normal review gates and enable the browser floor with the coordinated cutover.

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

This is planned migration groundwork rather than a current-main bug; source confirms the gate is absent on main and disabled by default in the PR.

Is this the best way to solve the issue?

The implementation fits the recorded migration plan, reuses existing recovery and native-link owners, and preserves the optional field-sizing contract.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Document mount recovery keeps the original intent (eadde4a: Recovery remains active until application rendering succeeds; later slow-download work prevents recovery from interrupting healthy downloads.)
  • Application entry and service-worker setup keeps the original intent (65c4b49: Recover stale tabs after missed Gateway updates while preserving reload ownership and application state.)
  • Native external URL parsing changes intended behavior with a stated reason (4fa6901: The prior refactor adopted URL.parse while preserving URL semantics; this PR uses the older constructor contract so unsupported hosts can still invoke the existing handoff.)
  • Source import boundary keeps the original intent (c8eab36: Use the runtime import graph after the compiler migration; the PR distinguishes raw assets while retaining missing-file and executable-backedge checks.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 1b85c97 adds ui/index.html:582 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1b85c97e514e; files: ui/index.html)
  • Val Alexander: Raw commit 42fc84f adds ui/index.html:307 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 42fc84f4b4c6; files: ui/index.html)

PR surface

Source +204, Tests +386. Total +590 across 16 files. Added test files: 3.

View PR surface stats
Area Files Added Removed Net
Source 11 268 64 +204
Tests 5 393 7 +386
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 16 661 71 +590

Review metrics

Metric Value Why it matters
Build-time configuration 1 new build-time environment flag; default off VITE_OPENCLAW_REQUIRE_MODERN_BROWSER prepares cutover admission without changing current browser requirements or persisted preferences.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Useful planned Control UI migration groundwork with no demonstrated urgent current-user regression.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster 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 need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (6 earlier review cycles)
  • reviewed 2026-10-10T09:13:53.734Z sha 21b0033 :: needs changes before merge. :: [P2] Suspend mount recovery before loading the browser fallback | [P2] Keep field sizing optional for the approved browser floor
  • reviewed 2026-10-10T09:34:55.766Z sha 21b0033 :: needs changes before merge. :: [P2] Suspend mount recovery before loading the browser fallback | [P2] Keep field sizing optional for the approved browser floor | [P2] Resolve raw HTML assets in the source-import boundary check
  • reviewed 2026-10-10T10:14:47.896Z sha 005001c :: needs changes before merge. :: [P2] Suspend mount recovery before loading the browser fallback | [P2] Keep field sizing optional for the approved browser floor | [P2] Mark the external-browser button as a new-tab action
  • reviewed 2026-10-10T10:45:12.235Z sha 1582006 :: needs changes before merge. :: [P2] Keep field sizing optional for the approved browser floor | [P2] Restore visible recovery when fallback assets fail
  • reviewed 2026-10-10T11:21:54.700Z sha cac4ae0 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-10T11:43:11.392Z sha cac4ae0 :: needs maintainer review before merge. :: none

Reviewed October 10, 2026, 8:06 AM ET / 12:06 UTC (Revision 7).

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Oct 10, 2026
@clawsweeper clawsweeper Bot added 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. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Oct 10, 2026
@steipete
steipete merged commit 0932a00 into main Oct 10, 2026
234 of 249 checks passed
@steipete
steipete deleted the solid2/p1-15 branch October 10, 2026 12:35
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 11, 2026
* feat(ui): prepare dormant browser capability gate

* test(ui): capture browser capability fallback variants

* test(ui): match capability fixture build identity

* fix(ui): expose fallback HTML import type to TypeScript

* fix(ui): share boot asset types across test graphs

* fix(ui): handle raw fallback assets in source boundary checks

* fix(ui): mark unsupported-browser action as external navigation

* fix(ui): retire mount recovery on unsupported browser admission

* fix(ui): recover failed browser guidance and keep field sizing optional

* test(ui): avoid shadowing the field sizing fixture
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: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: L 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