Repository navigation
feat(ui): show the Gateway connection state in the sidebar footer - #174022
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
4234d67 to
1846429
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1846429495
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| role={params.announce === false ? undefined : "status"} | ||
| aria-live={params.announce === false ? undefined : "polite"} | ||
| > | ||
| <span role="status" aria-live="polite"> |
There was a problem hiding this comment.
Keep one live region for connection changes
When the regular desktop sidebar is mounted, every unhealthy connection transition now updates two polite live regions: this unconditional role="status" in the shell chip and the existing screen-reader-only status at ui/src/components/app-sidebar-render.tsx:281-283. Screen readers will therefore announce messages such as “Reconnecting…” or “Suspended” twice. Preserve a single announcement owner while keeping the second status surface visual-only.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Already addressed: Fixed in 5a604e0 by keeping one persistent shell announcement region outside inert drawers and making the visible chip nonannouncing while removing the footer region.
|
Codex review: needs changes before merge. What this changesThis PR replaces layout-dependent connection labels with an avatar dot and a fixed bottom-left status chip while preserving Settings save feedback. Example: The desktop Gateway disconnects with two chat messages queued.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 2 items remain Keep this PR open: it addresses a current visibility defect with approved maintainer direction, but introduces duplicate accessibility announcements and a deterministic browser-test failure. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Control UI shell consumes the Gateway snapshot and outbox summary, derives connection presentation, and renders recovery controls alongside navigation and Settings. flowchart TD
A[Gateway snapshot] --> B[Shared status resolver]
B --> C[Application shell]
D[Outbox summary] --> C
C --> E[Fixed connection chip]
B --> F[Sidebar avatar and announcements]
C --> G[Settings save feedback]
Technical reviewBest possible solution: Retain the shared resolver and shell chip, give connection announcements one owner across layouts, and repair the readiness selector. Do we have a high-confidence way to reproduce the issue? Current-main CSS clips the connection label inside the persistent rail, and the shell suppresses its alternative surface when that sidebar is available; no target code was executed during this review. Is this the best way to solve the issue? A fixed shell-owned chip directly addresses visibility and layout movement without changing connection state ownership, but its accessibility cutover must include the retained sidebar announcement. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 35b769240bb1. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource -1, Tests +174, Docs +5. Total +178 across 24 files. Added test files: 0. View PR surface stats
LabelsLabel 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 Reviewed October 16, 2026, 5:04 AM ET / 09:04 UTC. |
There was a problem hiding this comment.
💡 Codex Review
openclaw/ui/src/app/app-shell-view.tsx
Line 359 in 5a604e0
When an outage moves between two non-null states, such as offline → connecting after Retry or reconnecting → restoring, the default unkeyed <Show> preserves this branch while renderGatewayStatus snapshots params.kind into a constant. The chip therefore keeps the first state's label, icon, CSS class, and retry eligibility until it disappears, even though the separate live-region announcement updates. Pass the status reactively into the renderer or key the branch by status.
AGENTS.md reference: ui/AGENTS.md:L5-L7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 60f842dc24
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| /* Without anchor positioning, clear a typical composer on every page. */ | ||
| bottom: calc(var(--shell-dock-reserve-bottom) + var(--safe-area-bottom, 0px) + 128px); |
There was a problem hiding this comment.
Keep the fallback clear of variable-height composers
When CSS anchor positioning is unavailable, this fixed 128px offset overlaps any composer that grows taller than 128px, such as chat or new-session composers with attachments, queued/context rows, or an expanded textarea. The mobile drawer override in layout.mobile.css:49-54 reduces that clearance further to roughly the sidebar-footer height, so even a normal composer can be covered; the non-anchor fallback needs layout-owned composer clearance rather than a fixed typical height.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changing: Browsers without CSS anchor positioning are rejected by the existing boot capability gate so an additional compatibility path is outside the supported platform contract.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b952033419
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .shell :is(.chat-footer, .creation-composer, .new-session-page__composer, .cron-editor-actions) { | ||
| anchor-name: --shell-composer; |
There was a problem hiding this comment.
Give split-pane composers distinct anchors
When a horizontal split has two visible chat panes and the left composer is taller than the right one, both .chat-footer elements receive the same anchor name. CSS resolves duplicate anchor names to the last element in DOM order (CSSWG §2.1), which is the later/right pane rendered by chat-page-pane-render.tsx; however, this chip is positioned at the left edge over the first pane. It can therefore overlap the taller left composer even in browsers with anchor positioning. Scope the anchor to the pane beneath the chip or calculate clearance across all visible composers.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 401f400: Restricted the status anchor to the visible bottom-left composer on desktop and the active composer on mobile while excluding retained hidden sessions and added a focused layout regression test.
Keep the pixel-positioned pet motion wrapper at its origin instead of stretching an empty box across the composer. This prevents positive travel offsets from increasing mobile composer scroll width while preserving the status chip anchors and sprite placement.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 569aa18418
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const surfaces = identityAnchor | ||
| .closest(".shell") | ||
| ?.querySelectorAll<HTMLElement>( | ||
| "main.content :is(.chat-footer .agent-chat__composer-shell, .new-session-page__composer, .creation-composer, .cron-editor-actions)", | ||
| ); |
There was a problem hiding this comment.
Keep the collapsed flag clear of bottom docks
When navigation is collapsed while a bottom-docked Terminal, browser, link reader, or assistant panel is open, this query checks only writing surfaces under main.content. Those fixed docks start at --shell-nav-width and render at z-index: 60, while the connection flag extends right from the 52px rail inside .shell-nav at z-index: 10; the flag is therefore opened underneath the dock and its Retry action is obscured. Include visible dock bounds in the overlap decision (or position the flag above/away from them).
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b877f62bcf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| (view().settingsTakeover | ||
| ? props.host.settingsSidebar.renderer() === null | ||
| : !isOptionalElementDefined(APP_SIDEBAR_ELEMENT)) && footerStatus() |
There was a problem hiding this comment.
Keep the Settings fallback at full width
When the Settings chunk is still loading or has failed during an outage, LazySettingsSidebar already renders its fallback <aside>, while this condition adds a second <aside class="sidebar"> beside it. Since .shell-nav is a flex row and both asides use flex: 1, the Settings skeleton/error and connection footer each receive roughly half the navigation width, breaking the drawer and desktop Settings layout. Put the connection footer inside the existing lazy fallback instead of mounting a sibling sidebar.
Useful? React with 👍 / 👎.
| const connectionAnnouncement = createMemo(() => { | ||
| const kind = shellConnectionStatus(); | ||
| return kind | ||
| ? gatewayStatusLabel(kind, view().sidebarProperties.storedOutboxes?.total) |
There was a problem hiding this comment.
Announce only connection transitions
When a user queues another message while offline, the outbox subscription invalidates the shell and this memo changes from, for example, “Disconnected · 1 queued” to “Disconnected · 2 queued.” Because the text is inside the persistent role="status" region, assistive technology re-announces the connection state for every queue-count change even though no connection transition occurred. Keep the visual queued count, but exclude it from this live-region value or update the announcement only when the status kind changes.
Useful? React with 👍 / 👎.
Keep the desktop breadcrumb trail horizontal and preserve build or native gateway identity outside outage and recovery states. Check the compact session menu after its parked presentation opens, and settle the lazy group operations import before asserting its mutation receipt.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 083dbd9e9e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <Show when={status()} fallback={<ProjectCrumb {...props} />}> | ||
| <div class="mobile-connection-status"> | ||
| <GatewayStatus {...props.gatewayStatus!} /> | ||
| </div> |
There was a problem hiding this comment.
Expose mobile recovery controls in roster headers
When a plain-browser mobile chat uses sidebarAgentsMode: "roster", the pane owner supplies props.agent, so the visible header skips IdentityCrumbs and this status is mounted only inside the lazy agent popover. Because merged-chat mode also hides the normal topbar, an outage leaves only the small aria-hidden menu-button dot until the user opens the agent popover or navigation drawer; the documented labeled status and direct Retry action are absent from the header. Render the mobile connection status outside the identity-versus-agent branch.
Useful? React with 👍 / 👎.
| <Show when={props.gatewayStatus?.kind && props.gatewayStatus.kind !== "connected"}> | ||
| <div class="mobile-connection-status"> | ||
| <GatewayStatus {...props.gatewayStatus!} /> | ||
| </div> |
There was a problem hiding this comment.
Keep the mobile outage status inside the topbar row
On non-chat phone routes during an outage, this status is inserted before the still-unconditional .topbar-brand. Since .topnav-shell__content no longer has a horizontal layout, the 18px status and 24px brand stack; at the ≤768px rule, their combined height plus the topbar's 20px vertical padding exceeds the fixed 58px shell row and spills into the content below. Make the status and brand mutually exclusive or lay them out within one row.
Useful? React with 👍 / 👎.
Prepare Settings search, route, and save-state props inside the existing lazy sidebar renderer. Keep loading and error navigation plus offline connection feedback eager, and preserve shell-revision updates after loading. Validation: 44 focused unit tests, oxfmt, git diff --check, and the Control UI performance comparison against 1108a99.
|
Merged via squash.
|
…enclaw#174022) * feat(ui): show connection state at bottom left in every layout * test(ui): move footer status cases to the dot and chip contract * test(ui): follow connection status into the bottom-left chip * test(ui): scope readiness reconnect wait to the status chip * fix(ui): announce each connection transition once * fix(ui): keep connection announcements in the shell * fix(ui): position the connection chip without anchor support * fix(ui): keep the connection chip above sticky save bars * fix(ui): prevent pet motion from overflowing composers Keep the pixel-positioned pet motion wrapper at its origin instead of stretching an empty box across the composer. This prevents positive travel offsets from increasing mobile composer scroll width while preserving the status chip anchors and sprite placement. * test(ui): await guest model switch settlement Hold the model patch response to prove the pending state, then wait for the effort trigger to become enabled before opening it. Preserve the first-turn, guest permissions, picker, and offline abort assertions. * fix(ui): anchor status chip to the bottom-left chat pane Use the visible session in the last visible cell of the first visible column as the connection anchor. This keeps the chip clear of taller left composers and ignores opacity-hidden cached sessions while following the active pane on mobile. * refactor(ui): drop unreachable anchor fallback for the status chip * feat(ui): move connection state into the sidebar footer * fix(ui): keep the collapsed connection flag reachable * fix(ui): keep connection flags clear of writing surfaces Measure composer clearance on transition, hover, and focus requests instead of using shell width. Keep the avatar tooltip only while the flag is hidden, with the accessible name unchanged. Keep checks event-driven without geometry observers. An active flag obstructed during its brief pulse can require avatar re-entry for the fallback tooltip; the dot and shell announcement remain available. * fix(ui): retain connection footer when settings cannot load * fix(ui): restore header and footer presentation after merge Keep the desktop breadcrumb trail horizontal and preserve build or native gateway identity outside outage and recovery states. Check the compact session menu after its parked presentation opens, and settle the lazy group operations import before asserting its mutation receipt. * fix(ui): defer settings sidebar state preparation Prepare Settings search, route, and save-state props inside the existing lazy sidebar renderer. Keep loading and error navigation plus offline connection feedback eager, and preserve shell-revision updates after loading. Validation: 44 focused unit tests, oxfmt, git diff --check, and the Control UI performance comparison against 9ce2b7c. * fix(ui): derive lazy settings sidebar props from its renderer
What Problem This Solves
Fixes: connection state is effectively invisible on desktop and jumps the layout on mobile when the Control UI loses its Gateway.
On desktop the identity card lives in the 52px persistent rail, which clipped the status text to 1×1 px, so the only visible signal of "Reconnecting…" or "Disconnected" was a 1 px amber outline around the avatar. When the navigation surface was hidden, a status row was inserted into the shell grid on every blip (layout shift), and on mobile it appeared under the top bar. Settings replaced its save indicator with the connection label, hiding pending/failed save feedback exactly while reconnecting.
User Impact
User impact: the connection state is readable at the bottom left again, next to your avatar, and nothing in the page moves when the link drops.
Reconnecting… · 2 queuedwith Retry and the redacted last error on hover. After recovery it shows "Connected" for about 2 seconds, then disappears. Community moves up inside the sidebar; the content area never moves.Why This Change Was Made
resolveGatewayStatusstays the single status resolver and the existing outbox total supplies the queued count. The footer row, the collapsed flag and the mobile line are presentations of one shell projection. Exactly one always-mounted polite live region at the shell level (outside the inert mobile drawer) announces each transition once; none of the visible surfaces are live regions.An earlier iteration of this PR used a floating chip anchored above the composer; it was replaced with this sidebar-footer design after review because it had to dodge every composer and sticky bar. Also fixes a timing-dependent mobile overflow found by the theme E2E: the lobster pet's invisible motion wrapper spanned the composer and was translated while walking.
First PR of the offline-first series (retained presentation through blips, offline boot/asset recovery, draft/data retention, opportunistic sends).
Evidence
Unit/browser and E2E coverage for the footer row, collapsed flag (transition timing, hover/keyboard reopen, clearance against writing surfaces, no tooltip duplication), mobile header line and menu dot, content-frame stability, queued count, Settings save indicator, native-embed exclusion, recovery flash and error redaction.
Before (main, isolated Gateway behind a fault proxy, connection cut): only a thin outline at the avatar.
After (synthetic E2E captures):
Landing conflict repair
Merged main at
64a52842a1ainto the branch as0e6933b9c4c. The repair preserves main's shared chat-pane input registration and registersgatewayStatusthere, keeping the footer, collapsed rail, mobile header, live region, Settings save indicator, lazy Settings preparation, and lobster motion origin unchanged. The English catalog retains the queued-count label and main's removal of obsolete reconnect copy.The five repair files pass formatting, targeted lint, and whitespace checks. Focused local proof passed 83 tests across the chat-pane header, native bridge, and pane suites with one worker. Fresh independent Codex P2 autoreview was scoped-clean. The already-inspected screenshots remain above; this conflict repair does not change their visual contract.
Prior preparation also passed 14 E2E and 75 unit tests after the header/footer repair. The subsequent lazy Settings preparation measured startup JavaScript at 339,044 bytes against the 339,379-byte limit, with Chat boot below main. Those E2E and performance results are prior-head evidence, not a fresh run on this merge commit. Current-head required checks remain enforced by GitHub auto-merge.
Full CI on
0e6933b9c4cfound a Settings lazy-wrapper type-import cycle and a redundantBoolean(canAdmin)conversion. Commit2f80ed3742dfixes both by deriving wrapper props from the existing lazy renderer contract and passing the already-boolean value directly. The exact failing Madge check now reports zero cycles, targeted lint with the failing core config passes, formatting/whitespace pass, and fresh independent Codex P2 autoreview is scoped-clean. No runtime import, budget, assertion, timeout, or suppression was added. Required CI must pass on this new head.The final merge repair,
476867091d7, incorporates main104dc5af562and retains its newer speech-bubble and sidebar fixture helpers. The compact-menu assertion still follows opening the parked menu, and footer tests retain the branch's avatar-dot, accessible-name, recovery, and shell-announcement contracts. Formatting, whitespace, targeted lint, and fresh independent P2 autoreview pass. The sidebar suite passed 75/75 tests (268.42 seconds; 296.05 seconds including runner overhead), and the two focused production-bundle E2E files passed 4/4 tests (423.98 seconds including setup).CI on the preceding head had one GitHub-panel heading timeout among 462 E2E cases. The exact test passed on scheduled main run
39075221970(job117521062834, 1.6 seconds) and in the single local replay (8.78 seconds), without changing its source, assertions, or timeout. This is intermittent-failure evidence, not a claimed code repair. No hosted CI rerun was requested; the final pushed head must satisfy its own required checks.