feat(control-ui): auto-set document.title to current agent name (#80942)#80944
feat(control-ui): auto-set document.title to current agent name (#80942)#80944SymbolStar wants to merge 7 commits into
Conversation
|
Codex review: needs maintainer review before merge. Latest ClawSweeper review: 2026-05-22 01:01 UTC / May 21, 2026, 9:01 PM ET. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: not applicable. this is a feature request, not a bug report. Source inspection confirms the current baseline is the static PR rating Rank-up moves:
What the crustacean ranks mean
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. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the focused UI title-sync path only after maintainers accept the default behavior and either document or coordinate the precedence plan with the static Do we have a high-confidence way to reproduce the issue? Not applicable: this is a feature request, not a bug report. Source inspection confirms the current baseline is the static Is this the best way to solve the issue? Unclear as a product decision: the patch is a plausible narrow implementation, but maintainers must accept dynamic titles as the default and settle how this composes with the open static-title configuration PR. Label changes:
Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 4faeb378ee49. |
…rt static <title>; fix check-lint - Revert ui/index.html <title> to 'OpenClaw Control' so smoke checks (scripts/e2e/parallels/macos-smoke.ts and scripts/openclaw-cross-os-release-checks.ts) pass without modification. The runtime hook in app-lifecycle.ts overrides it after mount when the toggle is enabled. - Add Appearance > Browser tab toggle (Agent name / Static). Default: Agent name (preserves the per-agent title sync from the original PR). Persists via the existing UiSettings localStorage store as documentTitleSyncEnabled. - syncDocumentTitleFromHost now reads host.settings.documentTitleSyncEnabled; when off, restores the static 'OpenClaw Control' title. - Replace 'TODO(openclaw#51067)' comment with a non-TODO note to satisfy the no-warning-comments oxlint rule that failed check-lint.
|
Pushed follow-up commit
Diff: 9 files, +104 / -4. CHANGELOG Unreleased entry updated to mention the toggle. Holding off on re-pinging ClawSweeper until CI is green. |
…cycleHost.settings - LifecycleHost.settings: include token? so it satisfies ControlUiBootstrapState (loadControlUiBootstrapConfig was failing typecheck). - storage.node.test / overview.render.test / config-quick.test: add the new required documentTitleSyncEnabled (and setter) field to UiSettings/QuickSettingsProps fixtures, plus the persisted toEqual blocks. Resolves check-prod-types, check-test-types, checks-node-core(-runtime-media-ui) failures introduced by the new required UiSettings field.
|
CI triage on previous run (8c22fd7): Real bugs (fixed in 7040ab5):
Noise / not actionable:
Diff: 4 files, +20/-1 (test fixtures + one type widening). No |
|
Real browser proof — five Control UI tabs disambiguated by agent name in the macOS Cmd- Captured against an out-of-tree mirror of this exact patch (zero-build local override with the same name/agentId fallback chain and the same @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
build-artifacts (root cause of cascading build-smoke/check/check-additional/checks-node-core skips): control-ui i18n raw-copy baseline drift. The new Appearance toggle in config-quick.ts introduced 5 raw user-facing strings (3 html-text, 2 html-attribute title) that were not registered in ui/src/i18n/.i18n/raw-copy-baseline.json. Added the 5 entries in sorted (path,kind,name,text) order so `pnpm ui:i18n:check` passes. check-test-types: ui/src/ui/app-settings.test.ts SettingsHost fixture was missing the new `documentTitleSyncEnabled: boolean` field on UiSettings, causing TS2345 at 8 call sites. Added the field to the SettingsHost type alias and to the createHost factory literal (defaulting to true to match initial UI state).
…itle # Conflicts: # CHANGELOG.md # ui/src/ui/app-render.ts # ui/src/ui/app-settings.test.ts # ui/src/ui/app-view-state.ts # ui/src/ui/app.ts # ui/src/ui/storage.node.test.ts # ui/src/ui/storage.ts # ui/src/ui/views/config-quick.test.ts # ui/src/ui/views/config-quick.ts
After merging origin/main (which itself widened UiSettings with textScale and touched many test fixtures), two additional test fixtures still hit TS2345/TS2741 because they construct SettingsHost-shaped literals locally: - ui/src/ui/app-render.helpers.node.test.ts createSettings(): missing the new documentTitleSyncEnabled field on UiSettings. - src/ui-app-settings.agents-files-refresh.test.ts createHost(): same missing field on the inline settings literal cast to refreshActiveTab's host param. Default to true (matches the initial Control UI behavior the feature ships with). Pure additive fixture fix, no behavior change.
|
Rebased onto current main via merge (rebase produced too many cross-commit conflicts on overlapping UI files; merge gave a single clean conflict pass). Conflict resolution summary:
Final head: CI: all required lanes green ( |
|
@steipete friendly nudge when you have a moment 🙏 Quick status:
Mind taking a look when you get a chance? cc @clawsweeper — verdict has flipped to needs-human, could you drop the leftover |
…itle # Conflicts: # ui/src/i18n/.i18n/raw-copy-baseline.json
|
Merged latest origin/main into branch (merge again because file fan-out is huge). Resolved 1 trivial conflict in |
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Velvet Review Wisp Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
Closing per author cleanup — this PR has been waiting on review for 14+ days. Happy to reopen if a maintainer wants to pick it up; otherwise the fix can be re-proposed if the underlying issue resurfaces. |

Auto-set Control UI
document.titleto the active agent's name so multi-agent operators can disambiguate Control UI tabs.Closes #80942.
Coexistence with PR #51067
Coexists with PR #51067 (
gateway.controlUi.titlestatic config); when both land, the static config title should take precedence. A TODO referencing #51067 is left inapp-lifecycle.tsso the wiring can be added once that surface is onmain.Implementation
ui/index.html: change static<title>fromOpenClaw Controlto justOpenClaw(the suffix is now appended dynamically).ui/src/ui/app-lifecycle.ts:syncDocumentTitleFromHost(host)helper.${assistantName || assistantAgentId || "Control"} · OpenClaw.handleUpdated()calls it wheneverassistantNameorassistantAgentIdis in the changed-properties map, so the tab title updates within the same render cycle as the agent identity.documentis undefined.Tests
ui/src/ui/app-lifecycle.doc-title.test.ts(vitest, jsdom):assistantName→assistantAgentId→"Control"),handleUpdatedtriggers a title write forassistantNamechange,handleUpdatedtriggers a title write forassistantAgentIdchange,handleUpdateddoes not rewrite the title when only unrelated state (e.g.logsEntries) changed.Out of scope (deliberately skipped, per issue's "optional polish" list)
…prefix while a chat stream is in progress — can be a follow-up.assistantEmoji; adding new state plumbing is out of scope here.CHANGELOG entry added under
Unreleased→Features.