Repository navigation
feat(ui): prepare dormant browser capability screen - #168360
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. |
|
Codex review: needs maintainer review before merge. What this changesAdds 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.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe 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]
Technical reviewBest 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
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +204, Tests +386. Total +590 across 16 files. Added test files: 3. View PR surface stats
Review metrics
LabelsLabel changes: No label 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 (6 earlier review cycles)
Reviewed October 10, 2026, 8:06 AM ET / 12:06 UTC (Revision 7). |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
* 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
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_BROWSERdefaults 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. Testboxtbx_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.pnpm ui:i18n:baseline: unchanged.pnpm check:changed --base 10d3967be440ea06a7e2a8c985edf9dc7664e23b, all selected core/root typecheck partitions, andpnpm ui:buildpassed on005001c9c739f; subsequent proof targets the changed watchdog and admission contracts.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.