Skip to content

fix(ui): prevent account suffixes from leaking into chat labels - #125097

Merged
vyctorbrzezowski merged 1 commit into
mainfrom
fix/124307-chat-rename-stored-label
Aug 18, 2026
Merged

vyctorbrzezowski merged 1 commit into
mainfrom
fix/124307-chat-rename-stored-label

Conversation

@vyctorbrzezowski

Copy link
Copy Markdown
Member

Closes #124307

What Problem This Solves

Fixes an issue where users renaming an unlabeled session from the chat pane could persist the rendered account suffix as part of the stored label. A later edit could then show a doubled or stale account discriminator.

Why This Change Was Made

The chat pane now follows the established Sessions page and sidebar contract: inline rename starts from the persisted user label, or an empty value when no label exists. It no longer treats the rendered pane title as editable user data, and the obsolete derived-title unchanged guard is removed.

User Impact

For account-qualified sessions such as Alice · cards, opening inline rename starts empty when the session has no custom label. Account decoration remains display-only and cannot leak into stored session labels through this flow.

Evidence

Added focused Control UI browser regression coverage for an account-qualified session with displayName: Alice, accountId: cards, and no stored label. The test confirms the pane title renders as Alice · cards while the inline rename field opens empty.

Executable proof was not run locally per task constraint; CI/external review will execute the regression.

Static inspection: git diff --check passed. Production LOC: +5/-7 (net -2). Tests: +28/-0.

@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Aug 17, 2026
@vyctorbrzezowski vyctorbrzezowski self-assigned this Aug 17, 2026
@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review August 17, 2026 06:05
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 17, 2026
@clawsweeper

clawsweeper Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 2:17 AM ET / 06:17 UTC.

ClawSweeper review

What this changes

The PR prevents the Control UI chat-pane rename field from treating an account-qualified display title as a persistable session label, and adds a focused browser regression case.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open: current main still seeds chat-pane rename from the account-decorated display title, while this PR moves the write producer to the same stored-label-or-empty contract used by the Sessions page and sidebar.

Priority: P2
Reviewed head: 370df78179c14366e7eb7d156b8b7b4135b97454

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a clean, net-negative producer-side repair with focused browser coverage and no blocking code findings.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is outside the external-contributor proof gate; nonetheless, repository UI policy still calls for a redacted observed Control UI capture before landing.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is outside the external-contributor proof gate; nonetheless, repository UI policy still calls for a redacted observed Control UI capture before landing.
Evidence reviewed 6 items Current-main defect path: Current main initializes an unlabeled header rename from paneTitle, while the chat-pane renderer derives that title through the display-name resolver and the commit path persists the entered value through sessions.patch.
Sibling rename invariant: Both the Sessions page and sidebar seed rename only from the stored label; the sidebar type explicitly separates its decorated label from undecorated userLabel to prevent derived display text becoming persistent state.
PR repairs the producer: The PR uses the canonical optional-string normalizer for the stored label, seeds empty when absent, removes the obsolete derived-title no-op branch, and adds a browser scenario with a decorated title and no stored label.
Findings None None.
Security None None.

How this fits together

The Control UI renders Gateway session rows into decorated chat-pane titles, then lets operators rename the session through an inline field. The field submits its value back through the session patch API, where it becomes persistent user state.

flowchart LR
  A[Gateway session row] --> B[Display-name resolver]
  B --> C[Decorated chat title]
  A --> D[Inline rename seed]
  D --> E[Session label update]
  E --> A
  C --> F[Visible chat pane]
Loading

Before merge

  • Resolve merge risk (P1) - The PR body says no local executable proof was run and includes no observed Control UI capture; repository UI policy requires a redacted before/after screenshot or short video before landing.
  • Complete next step (P2) - The focused repair appears correct; the protected maintainer PR needs normal maintainer handling and observed UI evidence rather than an automated replacement.
Agent review details

Security

None.

PR surface

Source -2, Tests +28. Total +26 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 5 7 -2
Tests 1 28 0 +28
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 33 7 +26

Review metrics

Metric Value Why it matters
Production versus test delta production -2, tests +28 The bug repair removes the derived-title persistence path while adding focused browser coverage without growing production code.

Stored data model

Persistent data-model change detected: serialized state: ui/src/e2e/session-management.account-label.e2e.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #124307
Summary: This PR is the focused candidate repair for the linked chat-pane persistence bug.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Mantis proof suggestion

A short Control UI chat interaction capture would directly prove the visible title and editable-field separation. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis web UI chat proof: verify and capture that an unlabeled account-qualified session shows its account suffix in the title while its inline rename field starts empty.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the producer-side stored-label seed, retain display-only account decoration, and attach observed Control UI proof before merge.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the producer-side stored-label seed, retain display-only account decoration, and attach observed Control UI proof before merge.

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

Yes—source reproducible with an account-qualified, unlabeled session: current main displays the suffix, seeds the input from that display title, and persists a partial edit. The PR's browser scenario encodes this path, but this read-only review did not execute it.

Is this the best way to solve the issue?

Yes. The patch fixes the write producer and follows the established sibling invariant that only stored user labels are editable; the display resolver remains responsible for account decoration.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded Control UI session-label correctness repair with limited blast radius.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is outside the external-contributor proof gate; nonetheless, repository UI policy still calls for a redacted observed Control UI capture before landing.

Evidence

What I checked:

  • Current-main defect path: Current main initializes an unlabeled header rename from paneTitle, while the chat-pane renderer derives that title through the display-name resolver and the commit path persists the entered value through sessions.patch. (ui/src/pages/chat/chat-pane-session-menu.ts:250, 0af3b865d782)
  • Sibling rename invariant: Both the Sessions page and sidebar seed rename only from the stored label; the sidebar type explicitly separates its decorated label from undecorated userLabel to prevent derived display text becoming persistent state. (ui/src/components/app-sidebar-session-types.ts:65, 0af3b865d782)
  • PR repairs the producer: The PR uses the canonical optional-string normalizer for the stored label, seeds empty when absent, removes the obsolete derived-title no-op branch, and adds a browser scenario with a decorated title and no stored label. (ui/src/pages/chat/chat-pane-session-menu.ts:247, 370df78179c1)
  • Regression-test contract: The added browser assertion would fail against the PR base because that implementation assigns paneTitle to the input; the fixture supplies an account-qualified row with no stored label. (ui/src/e2e/session-management.account-label.e2e.test.ts:103, 370df78179c1)
  • Feature provenance: The header session menu that introduced the original rename flow dates to the named feature commit; current blame also routes the carried-forward code to the same area owner. (ui/src/pages/chat/chat-pane-session-menu.ts:250, 9d77e5c3b75b)
  • Current-main and release check: The latest release commit is an ancestor of current main, but no tag or branch contains the PR head and current main retains the unpatched seed behavior; the PR is not obsolete. (0af3b865d782)

Likely related people:

  • steipete: Authored the header session menu commit and is identified by current blame on the carried-forward rename and display paths. (role: header-session-menu author and recent Control UI contributor; confidence: high; commits: 9d77e5c3b75b, bf9b25ab7e50; files: ui/src/pages/chat/chat-pane-session-menu.ts, ui/src/lib/session-display.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attach a redacted screenshot or short video showing the decorated title and the empty inline rename field on the repaired flow.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-17T06:12:42.955Z sha 370df78 :: needs maintainer review before merge. :: none

@vyctorbrzezowski
vyctorbrzezowski merged commit 70df031 into main Aug 18, 2026
196 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the fix/124307-chat-rename-stored-label branch August 18, 2026 11:01
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
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 P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: chat pane rename seeds from the rendered title, persisting the account suffix into stored labels

1 participant