Skip to content

feat(ui): mirror active destination and connection state in the dashboard title - #112929

Merged
steipete merged 3 commits into
mainfrom
claude/dashboard-header-display-90c7e4
Jul 23, 2026
Merged

steipete merged 3 commits into
mainfrom
claude/dashboard-header-display-90c7e4

Conversation

@steipete

@steipete steipete commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Control UI document title was the static boot string "OpenClaw Control" forever: every browser tab and the Mac app window titlebar read the same regardless of which sidebar destination, chat session, or connection state was active. Users with several dashboard tabs (or a backgrounded window) had no way to tell them apart or notice that the gateway dropped.

Why This Change Was Made

Maintainer-requested (direct request, no issue): the window/tab title should mirror the active sidebar selection with the brand demoted to a secondary suffix, following the pattern the standalone approval page already established (" — OpenClaw").

  • New pure formatDocumentTitle() in ui/src/app-navigation.ts composes the title; OpenClawShell.syncDocumentTitle() stamps it from updated(), so route changes and locale switches both refresh it.
  • Routes render their localized nav title: "Usage — OpenClaw", "Threads — OpenClaw", ….
  • Chat renders the session's display name via resolveSessionDisplayName (async derivedTitle arrival refreshes through a new context.sessions subscription): "Quarterly launch plan — OpenClaw".
  • Pending approvals prefix an attention count: "(2) Approvals — OpenClaw".
  • A disconnected gateway prefixes "(Offline)" and, when chat messages are parked in the stored outbox, "(Offline · 3 queued)"; offline suppresses the approval count since a stale queue is not actionable. Markers sit leftmost because tabs truncate from the right.
  • The custodian route window-titles as the existing "Ask OpenClaw" label instead of the bare brand; titles already ending in "OpenClaw" skip the suffix so nothing reads "OpenClaw — OpenClaw".
  • The outbox scope host previously inlined in render() is extracted to storedOutboxScopeHost() and shared with the title sync.

No new i18n keys, no visible page markup changes, boot title in index.html untouched (login gate/pre-connect keeps "OpenClaw Control").

User Impact

Dashboard tabs and the Mac app window now say where you are ("Usage — OpenClaw"), which conversation you're in ("Main Thread — OpenClaw"), how many approvals are waiting ("(2) …"), and whether the gateway is down with messages queued ("(Offline · 1 queued) …") — all visible from the tab strip without focusing the window.

Evidence

  • Focused tests: node scripts/run-vitest.mjs ui/src/app-navigation.test.ts ui/src/app/app-host.test.ts — 2 files, 104 tests passing, covering the formatter matrix (suffix/dedupe/count/offline/queued precedence) and shell composition (boot-title preservation, session titles, custodian label, markers).
  • Live end-to-end against a session-owned dev gateway + Vite dev UI: navigated /usage, /sessions, /custodian, /chat, first-run model setup — all titles correct; stopped the gateway → title flipped to "(Offline) Main Thread — OpenClaw"; sent a chat message while offline → "(Offline · 1 queued) Main Thread — OpenClaw"; restarted the gateway → outbox flushed and title recovered to "Main Thread — OpenClaw".
  • oxfmt --check and scripts/run-oxlint.mjs clean on all touched files; Codex autoreview (gpt-5.6-sol, xhigh) clean.

@steipete
steipete marked this pull request as ready for review July 23, 2026 05:35
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Jul 23, 2026
@steipete
steipete force-pushed the claude/dashboard-header-display-90c7e4 branch from 4ff1427 to 7f2ef80 Compare July 23, 2026 05:55
@steipete
steipete force-pushed the claude/dashboard-header-display-90c7e4 branch from 7f2ef80 to 29cf329 Compare July 23, 2026 12:59
@steipete
steipete merged commit 856f534 into main Jul 23, 2026
93 of 97 checks passed
@steipete
steipete deleted the claude/dashboard-header-display-90c7e4 branch July 23, 2026 13:10
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 24, 2026
…oard title (openclaw#112929)

* feat(ui): mirror active destination and connection state in the dashboard title

* feat(ui): title agent main chats with the agent name

* test(ui): split document-title shell tests to satisfy max-lines
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 maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant