Skip to content

improve(ui): float the phone page header - #190409

Merged
vyctorbrzezowski merged 11 commits into
mainfrom
brzezowski/mobile-floating-header
Nov 2, 2026
Merged

vyctorbrzezowski merged 11 commits into
mainfrom
brzezowski/mobile-floating-header

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

At phone width every page spends its first 58px on a brand row with a hairline, then repeats the page title in the body. The connection state is a dot on the menu button plus a status line, while chat already has its own notice for this. The new session draft sat under that same brand row, so its header changed completely when a session opened.

User Impact

On pages other than chat and the new session draft, the header now floats over the content: menu on the left, the page title centered, and one joined pill with new session and search on the right. Content scrolls under a fade. The body keeps its description and loses the repeated title, which stays available to assistive tech. While the connection is down, chat's notice floats below the header at chat's position, including Retry when offline, and the title stays. As on chat, it can sit over the description line, and taps pass through to the page beneath. Square themes keep square corners.

The new session draft uses chat's header at phone width. Draft, incognito and search share one pill there, and their row below the header is gone, so the page gains that space. An active toggle shows its icon in the accent color. When a session opens the menu button and the pill's right edge stay put, and the pill changes to the session's controls.

Widths above phone and native hosts are unchanged.

Why This Change Was Made

This is the base for the mobile page refinements. Pages add their own buttons to the pill with FloatingHeaderActions, passed through the actions they already give their header. Its fallback renders in place at every other width, so a page declares one set of actions. SettingsPageHeader now resolves actions once, because reading it twice would mount a portal twice.

The floating layout applies at 600px and below, plus landscape phones. Tablets from 601px keep today's top bar. The notice moved out of the chat header into a shared component, with one change: its radius now follows the theme, so it is square in CRT. It looks the same in Absolutely.

The draft renders the real ChatPaneMobileHeader, the one session creation already shows, and the shell passes it the drawer state and connection status the way it does for chat. Its content now starts at the same edges as chat, so the composer lines up with the session it opens. That widens the draft's composer from a 20px to a 16px inset, and control-ui-boot-modules.json is regenerated because the header now loads with the draft.

Above 560px Draft stays in the composer as it does today, so the pill holds incognito and search. Coming from a floating page, the menu button goes from 45px to 40px, which is intended. Chat's header keeps its round controls in CRT, so the draft's do too.

Evidence

Images use the mock data layer at 390px, 320px where noted. The Reconnecting image comes from stopping a real Gateway at 390px, the only image here that doesn't use the mock. Stopping and restarting it put the notice at the same box as chat (x 12, y 62, 28px tall) on Automations and the new session draft, left the title unmoved, and cleared the notice on reconnect.

Floating page Reconnecting below the header, real Gateway stopped
New session, light New session, dark New session, CRT
Incognito on 320px Real Safari

The Safari image is Safari 27.0.1 on macOS, with the page in a 390px frame inside its own window and OS-level clicks. A temporary local proxy, not part of this change, set the theme and added a page script that read state.

Checks

Run locally: tsgo:ui, oxfmt, oxlint and stylelint on touched files, unit tests for the shell and top bar, and the affected browser tests including a new mobile-floating-header.e2e.test.ts. mobile-new-conversation.e2e.test.ts now covers the draft's header, its toggles, the notice, the path into chat with the header's position compared at each step, and native hosts keeping their chrome.

ui:check-performance:base reports only the total CSS budget, which main already exceeds. Boot JS and CSS requests are unchanged from main.

Title at 320px: a 2-button pill leaves 104px for a title centered on the screen, so longer titles sit left of center instead of being cut. Measured offsets at 15px: Privacy & Security -12.6px, Cloud environments -19px, Communications -7.4px, all whole. Short titles stay centered, and at 360px the largest offset is -3.8px. A title with no room left truncates with an ellipsis.

Icons: draft is Lucide message-circle-dashed and incognito is Lucide hat-glasses, both from lucide-static 1.66.0, replacing the pencil and the custom incognito icon. This covers the new session header and composer controls, the composer's draft menu item, the session row's unsent draft and incognito badges, and chat's incognito header on desktop and phone.

Not verified

  • iPhone: not tested on a device or simulator. macOS Safari reports a zero safe-area inset, so the notch was only checked by overriding --safe-area-top in Chromium and a browser test, where the header moves down with the shell.

At phone width every page except chat gets a floating header: menu, centered
page title, and a joined pill with new session and search. Content scrolls under
a fade, the page body drops its repeated title and keeps its description, and
connection state uses the chat page's notice in place of the status dot.

FloatingHeaderActions lets a page place buttons in the pill through its existing
header actions.
@vyctorbrzezowski vyctorbrzezowski self-assigned this Nov 1, 2026
@clawsweeper

clawsweeper Bot commented Nov 1, 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.

The draft shares chat's drawer button, so opening a session must not move it.
@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Nov 1, 2026
Pill geometry no longer reaches rows of a menu opened from the pill, a menu trigger's icon stays centered, and SettingsPageHeader resolves its actions once so a portal cannot mount twice.
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 1, 2026
@clawsweeper

clawsweeper Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR replaces the phone-sized page topbar with a floating title and action pill and shares chat’s connection notice.

Example: Open Sessions in a 390 × 844 browser viewport.

  • Before: A 58px OpenClaw brand row sits above the page’s Sessions heading.
  • After: Sessions appears in the floating header beside menu, new-session, and search controls.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful visual evidence supports the approved direction, but required layout evidence and concrete implementation and validation repairs remain.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 4 actionable review findings remain.

Product

Kind: Preference · Worth it: Yes · Fix scope: Complete
User problem: Phone pages spend space on brand chrome and repeat their title below it.
Reason: The maintainer-authored PR establishes direction, and the inspected images show a coherent reduction in repeated phone chrome without adding configuration.

Merge readiness

⛔ Needs changes before merge - 4 items remain

Keep this maintainer-authored PR open: the visual refinement is useful, but consumer tests, asset budgets, and unused page-action machinery need attention before merge.

Priority: P3
Reviewed head: ea4f2dc353cd2ad8128d2277d7d022b29be1a28f

Before merge

  • Update recovery coverage to select the new phone notice (P2) - At 390px, the floating branch removes .mobile-connection-status, but gateway-module-boundaries.test-support.ts still waits for that element after disconnecting the Gateway on /new. Exact-head CI confirms the timeout in checks-ui-e2e (1/7). Update the phone branch to assert reconnect feedback and recovery through MobileHeaderNotice while retaining the desktop footer scenario.
  • Update the Sessions browser contract for the relocated title (P2) - The new rule makes the Sessions body heading 1×1px at phone width, but session-kinds.e2e.test.ts still requires that heading to have visible dimensions. Exact-head checks-ui-e2e (6/7) fails with visibleTitle false versus true. Assert the visible floating Sessions title and accessible body heading at phone width, preserving the desktop heading and action checks.
  • Reduce the added asset cost to meet the enforced budgets (P2) - The added floating-header styling grows CSS beyond an already-over-budget base, where the performance owner allows only 64 bytes of build variance. Exact-head CI reports both raw and gzip CSS growth violations and a chat-boot JavaScript ceiling failure. Reduce this change’s CSS and boot-path cost until control-ui-performance passes; the base CSS overage does not exempt additional growth, and the body’s claim that chat boot remains within limits is contradicted by this run.
  • Defer the page-action portal until a production page adopts it (P2) - FloatingHeaderActions is imported only by its new test, yet the shell now maintains a reactive slot and registration plumbing on every floating page. The linked Meetings PR explicitly postpones adoption. The delivered menu/title/new-session/search layout needs none of this machinery, and the Solid guidance requires an adapter’s first production caller. Remove the component, slot state, registration plumbing, and companion test here, then introduce them with the first consuming page.

Findings

  • [P2] Update recovery coverage to select the new phone notice — ui/src/components/app-topbar-solid.tsx:49-50
  • [P2] Update the Sessions browser contract for the relocated title — ui/src/styles/layout.mobile.css:395-398
  • [P2] Reduce the added asset cost to meet the enforced budgets — ui/src/styles/layout.mobile.css:267-272

Tests

  • Low-value test ui/src/components/solid/floating-header-actions.test.tsx: This exercises a helper with no production consumer; defer it with the unused portal layer until a page adoption supplies a user-facing contract.
  • Missing end-to-end proof: The supplied evidence does not show the route-entry layout-shift measurements against a real isolated Gateway required by ui/AGENTS.md, or a base/head regression run.
Agent review details

How this fits together

The Control UI shell combines route, viewport, theme, and Gateway connection facts into navigation chrome around the retained page outlet.

flowchart TD
  A[Route and viewport] --> B[Shell view state]
  C[Gateway connection] --> B
  B --> D[Floating topbar]
  B --> E[Page outlet]
  C --> F[Shared connection notice]
  F --> D
Loading

Technical review

Best possible solution:

Keep the shell-owned floating header and shared notice, complete the consumer-test cutover, restore asset-budget compliance, and defer the portal machinery until its first page consumer.

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

The before image and current-main source establish the existing brand-row layout; this PR proposes a presentation change rather than repairing a reported runtime defect.

Is this the best way to solve the issue?

Reusing the shell’s route and viewport decisions and extracting one shared notice is appropriate, but the unused portal layer is unnecessary for the delivered visual change.

Full review comments:

  • [P2] Update recovery coverage to select the new phone notice — ui/src/components/app-topbar-solid.tsx:49-50
    At 390px, the floating branch removes .mobile-connection-status, but gateway-module-boundaries.test-support.ts still waits for that element after disconnecting the Gateway on /new. Exact-head CI confirms the timeout in checks-ui-e2e (1/7). Update the phone branch to assert reconnect feedback and recovery through MobileHeaderNotice while retaining the desktop footer scenario.
    Confidence: 1
  • [P2] Update the Sessions browser contract for the relocated title — ui/src/styles/layout.mobile.css:395-398
    The new rule makes the Sessions body heading 1×1px at phone width, but session-kinds.e2e.test.ts still requires that heading to have visible dimensions. Exact-head checks-ui-e2e (6/7) fails with visibleTitle false versus true. Assert the visible floating Sessions title and accessible body heading at phone width, preserving the desktop heading and action checks.
    Confidence: 1
  • [P2] Reduce the added asset cost to meet the enforced budgets — ui/src/styles/layout.mobile.css:267-272
    The added floating-header styling grows CSS beyond an already-over-budget base, where the performance owner allows only 64 bytes of build variance. Exact-head CI reports both raw and gzip CSS growth violations and a chat-boot JavaScript ceiling failure. Reduce this change’s CSS and boot-path cost until control-ui-performance passes; the base CSS overage does not exempt additional growth, and the body’s claim that chat boot remains within limits is contradicted by this run.
    Confidence: 0.99
  • [P2] Defer the page-action portal until a production page adopts it — ui/src/components/solid/floating-header-actions.tsx:10-14
    FloatingHeaderActions is imported only by its new test, yet the shell now maintains a reactive slot and registration plumbing on every floating page. The linked Meetings PR explicitly postpones adoption. The delivered menu/title/new-session/search layout needs none of this machinery, and the Solid guidance requires an adapter’s first production caller. Remove the component, slot state, registration plumbing, and companion test here, then introduce them with the first consuming page.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.95

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test:ui:e2e ui/src/e2e/boot-module-boundaries.e2e.test.ts ui/src/e2e/session-kinds.e2e.test.ts ui/src/e2e/mobile-floating-header.e2e.test.ts ui/src/e2e/mobile-new-conversation.e2e.test.ts
  • pnpm --dir ui test src/app/app-shell-view.test.ts src/components/shell-chrome.test.tsx
  • pnpm tsgo:ui
  • pnpm check:assertion-safety
  • pnpm check:test-lines-ratchet

What I checked:

PR surface

Source +296, Tests +205. Total +501 across 20 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 12 461 165 +296
Tests 8 213 8 +205
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 20 674 173 +501

Review metrics

Metric Value Why it matters
Production versus test LOC Production +461/-165; tests +213/-8 Presentation styling explains much of the growth; the unused portal and its dedicated test can wait for a production consumer.

Labels

Label changes:

  • add P3: This is an approved mobile presentation improvement with no established urgent runtime outage.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is an approved mobile presentation improvement with no established urgent runtime outage.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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 1, 2026, 9:41 AM ET / 14:41 UTC.

@vyctorbrzezowski
vyctorbrzezowski merged commit 37c4caa into main Nov 2, 2026
83 of 87 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/mobile-floating-header branch November 2, 2026 10:58
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 3, 2026
Give phone pages a shared floating header while preserving draft/chat handoff, page actions, reconnect controls and native/tablet chrome.

Validated with 28 focused unit tests,13 mobile E2Es and independent source review. Cosmetic test assertions were removed; navigation, focus, portal lifetime and content stability remain covered. CI run41429680535/1 remains red for approved CSS/chat-JS budgets and five unrelated isolated component cases. Their test/owner inputs match the tested main baseline and do not construct the changed header paths. All six E2E shards, other UI shards, lint/types/guards and security passed.
bkudiess added a commit to openclaw/openclaw-windows-node that referenced this pull request Nov 25, 2026
Released Gateway 2026.11.10 includes openclaw/openclaw#190409, which hides
the in-page route heading under the phone floating header. Headless Edge's
default 756x488 viewport matches that layout, so the Skills route proof never
saw a visible Skills heading and main timed out deterministically.

Pin the owned CDP page to 1280x900 before navigation, assert it in the native
Edge smoke, and report the viewport in the route probe state.

Co-authored-by: Copilot App <[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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XL 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