Repository navigation
feat(ui): unify Control UI offline state into one indicator and a queueing composer hint - #112600
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
July 22, 2026 08:01
…ueing composer hint
The Control UI showed three competing offline surfaces (top connection
banner, agent-card presence dot, sidebar footer label), each deriving its
own view of the same gateway snapshot with inconsistent debounce.
- Centralize the 2s offline debounce as `offlineStable` in the gateway
store; delete the sidebar-local timer.
- Delete the connection banner and the agent-card presence dot; the
gateway link is client state, not agent presence.
- The sidebar footer indicator is now canonical: a single offline button
with reconnect detail, redacted last-error tooltip, and click-to-retry
(absorbs the banner's "Retry now"). Connected state renders nothing.
- Settings sidebar footer follows the same offline-only rule (no green
connected dot).
- The composer shows an offline hint strip ("messages will be queued and
sent when the connection returns") while staying fully usable; the
existing durable outbox already replays queued sends on reconnect.
steipete
force-pushed
the
claude/offline-state-unification-970ae1
branch
from
July 22, 2026 10:22
148ec90 to
1aef0d3
Compare
Contributor
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: feat(ui): unify Control UI offline state into one indicator and a queueing composer hint This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Contributor
Author
|
Merged via squash.
|
This was referenced Jul 22, 2026
Merged
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 23, 2026
…ueing composer hint (openclaw#112600) * feat(ui): unify Control UI offline state into one indicator and a queueing composer hint The Control UI showed three competing offline surfaces (top connection banner, agent-card presence dot, sidebar footer label), each deriving its own view of the same gateway snapshot with inconsistent debounce. - Centralize the 2s offline debounce as `offlineStable` in the gateway store; delete the sidebar-local timer. - Delete the connection banner and the agent-card presence dot; the gateway link is client state, not agent presence. - The sidebar footer indicator is now canonical: a single offline button with reconnect detail, redacted last-error tooltip, and click-to-retry (absorbs the banner's "Retry now"). Connected state renders nothing. - Settings sidebar footer follows the same offline-only rule (no green connected dot). - The composer shows an offline hint strip ("messages will be queued and sent when the connection returns") while staying fully usable; the existing durable outbox already replays queued sends on reconnect. * fix(ui): keep offline debounce constant module-local for knip production scan
steipete
added a commit
that referenced
this pull request
Aug 26, 2026
… in the sidebar footer The sidebar footer has been the canonical offline indicator since #112600 (which deleted the top connection banner in its favor), but #125070's footer compaction made it sr-only + aria-hidden - invisible to everyone. Restore the visible red offline pill (click-to-retry, queued count, redacted error tooltip) and add a restart-aware amber state: the gateway already broadcasts shutdown { restartExpectedMs } before restarting and refuses drain-phase work with reason "gateway-restarting", so the Control UI now shows "Restarting..." immediately - before the socket drops - and degrades to the offline pill when a restart overruns max(3x restartExpectedMs, 15s). One shared renderSidebarConnectionStatus serves the main and settings sidebars; the dead sr-only spans and clipped live region are deleted. The drain reason strings become shared gateway-protocol constants. The e2e mock now passes Vite's vite-hmr client socket through to the native WebSocket so going offline in source-served suites no longer triggers a dev-client page reload mid-test.
steipete
added a commit
that referenced
this pull request
Aug 26, 2026
…ounce restarts (#130025) * fix(ui): restore visible gateway offline status and announce restarts in the sidebar footer The sidebar footer has been the canonical offline indicator since #112600 (which deleted the top connection banner in its favor), but #125070's footer compaction made it sr-only + aria-hidden - invisible to everyone. Restore the visible red offline pill (click-to-retry, queued count, redacted error tooltip) and add a restart-aware amber state: the gateway already broadcasts shutdown { restartExpectedMs } before restarting and refuses drain-phase work with reason "gateway-restarting", so the Control UI now shows "Restarting..." immediately - before the socket drops - and degrades to the offline pill when a restart overruns max(3x restartExpectedMs, 15s). One shared renderSidebarConnectionStatus serves the main and settings sidebars; the dead sr-only spans and clipped live region are deleted. The drain reason strings become shared gateway-protocol constants. The e2e mock now passes Vite's vite-hmr client socket through to the native WebSocket so going offline in source-served suites no longer triggers a dev-client page reload mid-test. * refactor(ui): delete dead sr-only footer subtitle spans and fit the startup budget The connected-state identity subtitle spans (gateway health dot, name, build subtitle) were the same sr-only + aria-hidden dead-markup class the previous commit fixed for offline: invisible to sighted users and screen readers, with the identity button's aria-label already carrying the same information. Delete them plus their orphaned CSS; tests now assert the aria-label contract. The e2e mock's Vite dev-client socket passthrough keys on the vite-hmr subprotocol. The gateway store drops validation the shared timer clamp already owns and re-arms the restart deadline on every fresh drain rejection (server still says restarting, so amber stays honest). The startup-budget baseline refresh (340901 -> 341446, jitter-safe max of three builds) records the ~530 B this feature legitimately adds over the 512 B per-change tolerance; reason stored in the baseline file. * fix(ui): keep ordinary gateway stops on the offline pill path ClawSweeper finding: every shutdown broadcast armed the amber Restarting state, so a deliberate stop hid the Offline/Retry action for the 15s deadline floor. The amber state now arms only when the broadcast carries a numeric restartExpectedMs; ordinary stops flow through the normal offline pill. The server omits restartExpectedMs on non-restart shutdowns instead of broadcasting null, aligning the wire with ShutdownEventSchema's optional integer. Also rewires build-info-unicode.e2e to the identity aria-label (the visible subtitle span it asserted was deleted as dead markup) and splits the restart-state store tests into gateway-store.restart.test.ts with a shared test-support harness to respect the max-lines cap. * chore(ui): tighten startup gzip baseline after composer-queue rebase The combined tree measures 340754-340770 B across builds, below the 341489 B baseline main recorded for the composer stack; pin 340810 B (max observed + jitter headroom) so the ratchet reflects reality. * fix(ui): unexport the test-support fake gateway client (knip dead export)
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 27, 2026
…ounce restarts (openclaw#130025) * fix(ui): restore visible gateway offline status and announce restarts in the sidebar footer The sidebar footer has been the canonical offline indicator since openclaw#112600 (which deleted the top connection banner in its favor), but openclaw#125070's footer compaction made it sr-only + aria-hidden - invisible to everyone. Restore the visible red offline pill (click-to-retry, queued count, redacted error tooltip) and add a restart-aware amber state: the gateway already broadcasts shutdown { restartExpectedMs } before restarting and refuses drain-phase work with reason "gateway-restarting", so the Control UI now shows "Restarting..." immediately - before the socket drops - and degrades to the offline pill when a restart overruns max(3x restartExpectedMs, 15s). One shared renderSidebarConnectionStatus serves the main and settings sidebars; the dead sr-only spans and clipped live region are deleted. The drain reason strings become shared gateway-protocol constants. The e2e mock now passes Vite's vite-hmr client socket through to the native WebSocket so going offline in source-served suites no longer triggers a dev-client page reload mid-test. * refactor(ui): delete dead sr-only footer subtitle spans and fit the startup budget The connected-state identity subtitle spans (gateway health dot, name, build subtitle) were the same sr-only + aria-hidden dead-markup class the previous commit fixed for offline: invisible to sighted users and screen readers, with the identity button's aria-label already carrying the same information. Delete them plus their orphaned CSS; tests now assert the aria-label contract. The e2e mock's Vite dev-client socket passthrough keys on the vite-hmr subprotocol. The gateway store drops validation the shared timer clamp already owns and re-arms the restart deadline on every fresh drain rejection (server still says restarting, so amber stays honest). The startup-budget baseline refresh (340901 -> 341446, jitter-safe max of three builds) records the ~530 B this feature legitimately adds over the 512 B per-change tolerance; reason stored in the baseline file. * fix(ui): keep ordinary gateway stops on the offline pill path ClawSweeper finding: every shutdown broadcast armed the amber Restarting state, so a deliberate stop hid the Offline/Retry action for the 15s deadline floor. The amber state now arms only when the broadcast carries a numeric restartExpectedMs; ordinary stops flow through the normal offline pill. The server omits restartExpectedMs on non-restart shutdowns instead of broadcasting null, aligning the wire with ShutdownEventSchema's optional integer. Also rewires build-info-unicode.e2e to the identity aria-label (the visible subtitle span it asserted was deleted as dead markup) and splits the restart-state store tests into gateway-store.restart.test.ts with a shared test-support harness to respect the max-lines cap. * chore(ui): tighten startup gzip baseline after composer-queue rebase The combined tree measures 340754-340770 B across builds, below the 341489 B baseline main recorded for the composer stack; pin 340810 B (max observed + jitter headroom) so the ratchet reflects reality. * fix(ui): unexport the test-support fake gateway client (knip dead export)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
The Control UI showed three competing offline indicators for the same gateway connection state: a top-center "Gateway connection lost / Retry now" banner, a red presence dot + "Offline" label on the sidebar agent card, and an "Offline" label in the sidebar footer. The banner used the raw connection flag (flickering on brief blips) while the two sidebar surfaces shared a 2s debounce implemented locally in the sidebar component. The agent-card dot was also semantically wrong: the gateway link is client-session state, not agent presence. Meanwhile the composer gave no visible cue that sends made while offline are safely queued by the existing durable outbox.
Why This Change Was Made
One canonical presentation model: silence when connected, one calm indicator when offline, and the composer explaining that messages queue.
offlineStable(2s debounce) now lives in the gateway store; the sidebar-local timer is deleted. The online transition is never debounced.lastErrortooltip, and click-to-retry (absorbing the banner's "Retry now"). Connected state renders nothing — no green anywhere (settings sidebar footer included).User Impact
Offline is now one glanceable state instead of three: the bottom-left indicator (click to retry) plus an amber composer hint that makes the queue-and-flush behavior explicit. Brief transport blips no longer flash a full-width banner.
Artifact manifest: https://artifacts.openclaw.ai/pr-offline-state-unification-20260722/artifact-manifest.json
Evidence
origin/main).stop(), no offline beforestart().chat.sendwhile offline, exactly one idempotent delivery after reconnect, queue cleanup verified.pnpm ui:i18n:verifyclean (en.ts-only string changes; keysconnection.lostTitle,connection.offlineHint,chat.gatewayStatusremoved with usages verified gone;chat.composer.offlineHintadded).node scripts/check-max-lines-ratchet.mjsOK post-rebase.gpt-5.6-sol): clean, no accepted findings.Screenshots via the mock-gateway e2e harness (
installMockGateway+setOnline(false)), no real gateway involved.