Skip to content

feat(ui): redesign gateway connection-lost banner as floating pill#101812

Merged
steipete merged 1 commit into
mainfrom
claude/goofy-shaw-083a76
Jul 7, 2026
Merged

feat(ui): redesign gateway connection-lost banner as floating pill#101812
steipete merged 1 commit into
mainfrom
claude/goofy-shaw-083a76

Conversation

@steipete

@steipete steipete commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The gateway connection-lost banner predates the tiny-top-bar dashboard chrome (#101497). It renders as a full-width amber gradient strip that pushes the whole page down when the connection drops and yanks it back up on reconnect, so every connection flap causes a layout jump. Visually it shouts across the entire content column for a transient, self-healing state.

Why This Change Was Made

The banner is redesigned as a compact floating pill centered under the top bar: warn-tinted translucent background with backdrop blur, spinner, bold title, muted "Reconnecting…" state, and a pill-shaped Retry button. It is a fixed overlay, so content no longer reflows when the connection drops or returns. The long "Live updates and actions are paused…" sentence moves out of the visible pill into the pill tooltip (merged with the redacted last-error detail) and stays available to screen readers via a visually hidden span inside the existing role="status" live region. On narrow viewports the "Reconnecting…" label is dropped so the pill fits phone widths; the pill sits below the mobile nav drawer in stacking order. No i18n strings, banner mount conditions, or retry wiring changed.

User Impact

Losing the gateway connection no longer shoves the page content down: a small reconnect pill floats over the page, matching the redesigned dashboard chrome, and disappears when the connection returns. Retry now works as before; the pause explanation is available on hover and to screen readers.

Evidence

Before/after captures from the local dev UI connected to a real gateway (simulated post-session drop on the Settings page):

State Light Dark
Before before light before dark
After after light after dark

Mobile (375 px, "Reconnecting…" label dropped): https://artifacts.openclaw.ai/pr-connection-pill-20260707/after-light-375.png
Artifact manifest: https://artifacts.openclaw.ai/pr-connection-pill-20260707/artifact-manifest.json

  • Retry button wiring verified in the running UI (handler invoked through the new markup; pill tooltip carries hint + redacted error detail).
  • No console errors in the dev UI with the pill shown.
  • Codex autoreview (gpt-5.5): clean, no actionable findings.
  • Testbox pnpm check:changed: run id in PR checks/comment thread.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Jul 7, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eee8a97f2f

ℹ️ 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".

top: 0;
z-index: 11;
position: fixed;
top: calc(var(--shell-topbar-height, 44px) + 10px);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include the safe-area inset in the fixed banner offset

In installed PWA/viewport-fit-cover contexts, the standalone body rule already adds --safe-area-top padding, but this new position: fixed banner is positioned against the viewport instead of the padded shell. With the 34px inset covered by the existing safe-area tests, the topbar occupies roughly 34–78px while this pill starts at 54px, so reconnecting users on notched devices see it overlap the topbar rather than sit below it. Please add the safe-area inset here, or anchor the pill to a shell element that already includes it.

Useful? React with 👍 / 👎.

Comment on lines +391 to +394
.connection-banner__title {
color: var(--text-strong);
font-weight: 600;
white-space: nowrap;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Allow the pill contents to shrink or wrap on phones

On narrow mobile widths with localized labels, hiding only connection-banner__state still leaves the title and retry button unbreakable. Existing Polish/Portuguese/German strings plus the spinner, gaps, and padding exceed the 288px inner width of a 320px phone, and flex items with nowrap min-content cannot shrink, so the Retry now action can render off-screen; the previous in-flow banner used flex-wrap and stayed usable. Please let this text wrap/truncate or further simplify the mobile pill.

Useful? React with 👍 / 👎.

@clawsweeper

clawsweeper Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed July 7, 2026, 1:00 PM ET / 17:00 UTC.

Summary
This PR changes the Control UI gateway reconnect banner from an in-flow warning strip into a fixed floating pill and updates the Control UI docs to describe it.

PR surface: Source +64, Docs 0. Total +64 across 3 files.

Reproducibility: yes. from source inspection. The PR's fixed top offset ignores the existing standalone safe-area body padding, and the nowrap title/retry CSS conflicts with existing longer locale strings on narrow phones.

Review metrics: none identified.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🦐 gold shrimp
Result: needs maintainer review before merge.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Add safe-area-aware vertical positioning for the fixed banner.
  • Make the mobile pill fit 320px and localized labels without losing the retry action.
  • Refresh visual proof for standalone safe-area and the narrow localized/mobile case.

Risk before merge

  • [P1] Standalone PWA safe-area behavior is not covered by the proof, and the fixed pill can overlap the top bar on notched devices.
  • [P2] Narrow localized phone layouts are not covered by the proof, and nowrap title/retry text can make the retry action render off-screen.

Maintainer options:

  1. Decide the mitigation before merge
    Keep the no-reflow floating pill, but make its fixed offset safe-area-aware and make the mobile pill shrink, wrap, or truncate safely across localized labels before merge.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • The remaining blockers are narrow CSS/layout repairs that automation can attempt without a product-direction decision.

Security
Cleared: The diff only changes Control UI markup/CSS and docs for the reconnect banner; no concrete security or supply-chain concern was found.

Review findings

  • [P2] Include the safe-area inset in the fixed banner offset — ui/src/styles/components.css:319
  • [P2] Allow the mobile pill text to fit localized labels — ui/src/styles/components.css:394
Review details

Best possible solution:

Keep the no-reflow floating pill, but make its fixed offset safe-area-aware and make the mobile pill shrink, wrap, or truncate safely across localized labels before merge.

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

Yes, from source inspection. The PR's fixed top offset ignores the existing standalone safe-area body padding, and the nowrap title/retry CSS conflicts with existing longer locale strings on narrow phones.

Is this the best way to solve the issue?

No. The floating pill is the right maintainable direction, but the CSS needs safe-area positioning and narrow-width localization handling before this is the best fix.

Full review comments:

  • [P2] Include the safe-area inset in the fixed banner offset — ui/src/styles/components.css:319
    In standalone PWA/viewport-fit-cover contexts, the body already adds --safe-area-top padding, but this new fixed banner is positioned against the viewport. With the existing 34px safe-area case, the topbar occupies roughly 34-78px while the pill starts at 54px, so reconnecting users on notched devices can see it overlap the topbar instead of sitting below it.
    Confidence: 0.93
  • [P2] Allow the mobile pill text to fit localized labels — ui/src/styles/components.css:394
    Hiding only .connection-banner__state still leaves the title and retry button unbreakable. Existing German, Polish, and pt-BR labels plus the spinner, gaps, and padding can exceed a 320px phone's 288px inner lane, so the retry action can render off-screen where the previous wrapped banner stayed usable.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.88

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against fa84741f93b9.

Label changes

Label changes:

  • add P2: The PR is a bounded Control UI improvement with concrete mobile layout blockers before merge, not an urgent runtime regression.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes inspected before/after desktop and mobile screenshots from a running UI plus retry-wiring notes, which is sufficient visual proof for the intended no-reflow pill behavior.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body includes inspected before/after desktop and mobile screenshots from a running UI plus retry-wiring notes, which is sufficient visual proof for the intended no-reflow pill behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (screenshot): The PR body includes inspected before/after desktop and mobile screenshots from a running UI plus retry-wiring notes, which is sufficient visual proof for the intended no-reflow pill behavior.

Label justifications:

  • P2: The PR is a bounded Control UI improvement with concrete mobile layout blockers before merge, not an urgent runtime regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (screenshot): The PR body includes inspected before/after desktop and mobile screenshots from a running UI plus retry-wiring notes, which is sufficient visual proof for the intended no-reflow pill behavior.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes inspected before/after desktop and mobile screenshots from a running UI plus retry-wiring notes, which is sufficient visual proof for the intended no-reflow pill behavior.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body includes inspected before/after desktop and mobile screenshots from a running UI plus retry-wiring notes, which is sufficient visual proof for the intended no-reflow pill behavior.
Evidence reviewed

PR surface:

Source +64, Docs 0. Total +64 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 97 33 +64
Tests 0 0 0 0
Docs 1 3 3 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 100 36 +64

Acceptance criteria:

  • [P1] pnpm test ui/src/e2e/login-gate.e2e.test.ts.
  • [P1] pnpm check:changed -- ui/src/components/connection-banner.ts ui/src/styles/components.css docs/web/control-ui.md.
  • [P1] Capture Control UI proof at desktop, 375px, 320px, and a standalone/PWA-like safe-area-top case with the reconnect pill visible.

What I checked:

  • PR diff changes the reconnect banner to a fixed overlay: The PR head sets .connection-banner to position: fixed with top: calc(var(--shell-topbar-height, 44px) + 10px) and moves the visible content into .connection-banner__pill. (ui/src/styles/components.css:319, eee8a97f2f3c)
  • Standalone safe-area behavior is a real current-main invariant: Current main defines --safe-area-top and applies it as standalone body padding, so fixed viewport-positioned overlays need to account for it separately. (ui/src/styles/base.css:118, fa84741f93b9)
  • Existing safe-area test documents the 34px top inset case: The login-gate E2E safe-area test injects --safe-area-top: 34px and verifies standalone body padding pushes content down by that amount. (ui/src/e2e/login-gate.e2e.test.ts:207, fa84741f93b9)
  • Localized labels are longer than the English proof case: German, Polish, and pt-BR strings have longer title or retry labels, while the PR makes the title and retry button nowrap and only hides the reconnecting state below 640px. (ui/src/i18n/locales/de.ts:1563, fa84741f93b9)
  • Runtime mount path preserved: The app host still mounts openclaw-connection-banner in the content area when gatewayConnected is false and passes the same retry callback to context.gateway.connect(). (ui/src/app/app-host.ts:758, fa84741f93b9)
  • Real behavior proof inspected: The artifact manifest and after screenshots show the intended desktop and 375px floating pill behavior in a running UI, but they do not cover standalone safe-area or 320px localized layouts. (eee8a97f2f3c)

Likely related people:

  • steipete: Current main's connection banner component/CSS blame to Peter Steinberger's recent UI work, and the related dashboard chrome redesign PR was authored and merged under the same area. (role: recent area contributor; confidence: high; commits: 84d0a714062d, 5a234d61fa47; files: ui/src/components/connection-banner.ts, ui/src/styles/components.css, ui/src/styles/layout.css)
  • Val Alexander: The dashboard-v2 refactor substantially changed the shared Control UI layout and component stylesheet that this PR builds on. (role: adjacent layout contributor; confidence: low; commits: f76a3c5225bb; files: ui/src/styles/components.css, ui/src/styles/layout.css)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. labels Jul 7, 2026
@steipete
steipete merged commit 21f2512 into main Jul 7, 2026
143 of 155 checks passed
@steipete
steipete deleted the claude/goofy-shaw-083a76 branch July 7, 2026 18:00
@steipete

steipete commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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 docs Improvements or additions to documentation maintainer Maintainer-authored PR 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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S 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