Skip to content

fix: prefill generated session titles when renaming - #139796

Merged
steipete merged 1 commit into
mainfrom
codex/fix-session-rename
Sep 6, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/fix-session-rename

Conversation

@steipete

@steipete steipete commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users renaming an automatically titled dashboard session from the sidebar or Sessions page would see an empty field even though the session already had a visible title. The chat header already handled these titles, leaving the three rename entry points inconsistent. Related: #129529.

Why This Change Was Made

A shared policy selects the editable custom label or generated dashboard title and detects unchanged submissions. The sidebar's existing lazy operations module owns the dialog and save together; the sidebar and Sessions page capture their original connection before opening the dialog. Durable session identity checks remain intact.

User Impact

Generated dashboard titles are prefilled and editable across all three surfaces. Saving an unchanged title preserves automatic naming; clearing a custom label restores it. Channel/account decorations remain display-only. Connection changes cancel stale edits instead of submitting them through a replacement connection.

Evidence

  • The expanded browser regression failed on the original sidebar and Sessions-page code with an empty input; the header passed.
  • All 9 focused browser scenarios pass against the built Control UI: keyboard editing, Save/Enter, cancellation, unchanged-title no-op, saved-name reopening, clearing a custom label, disconnect cancellation, account decoration, and replacement-session protection.
  • 142 focused tests pass across dialog behavior, sidebar projection/navigation, session permissions, header actions, and Sessions-page typing.
  • Changed checks pass: formatting, typechecks, lint, i18n, dead exports, and repository guards. Independent Codex review found no actionable P0–P2 findings after cleanup.
  • Live Chrome verification against a disposable local Gateway fixture confirmed generated-title prefill, typing, Enter submission, and the updated sidebar title. The fixture retained blocked external form navigation while allowing its JavaScript submit handler.
  • Before/after captures below use synthetic session data. No operator screenshots or live session contents were uploaded.

Before: generated title opens blank

After: generated title is prefilled

@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Sep 6, 2026
@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 Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 2:07 AM ET / 06:07 UTC.

ClawSweeper review

What this changes

Prefills generated dashboard titles across session rename controls while preserving automatic naming, custom-label clearing, and cancellation when the connection changes.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused fix: current main still opens empty rename fields outside the chat header. No actionable correctness or security findings were identified, and the previous review contains no outstanding concrete findings.

Priority: P2
Reviewed head: 5689bdb5c79eae7f0be737b7a436207e597ca5c0

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable repair with meaningful browser coverage and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored PR is exempt from the external-contributor proof gate. Its captured evidence reports real Chrome prefill, edit, and save behavior through a disposable Gateway fixture, supplemented by browser regressions; attachment retrieval was unavailable to this reviewer.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR is exempt from the external-contributor proof gate. Its captured evidence reports real Chrome prefill, edit, and save behavior through a disposable Gateway fixture, supplemented by browser regressions; attachment retrieval was unavailable to this reviewer.
Evidence reviewed 9 items Current main still needs the fix: At fetched main, sidebar rename seeds only userLabel and therefore opens blank for generated titles; the Sessions page likewise seeds only row.label.
Latest release retains the sidebar defect: The v2026.9.2 sidebar also defaults to the stored user label rather than the generated title; the release resolves to the supplied release commit.
Shared editable-title policy: The helper preserves custom-label precedence, restricts generated-name prefilling to dashboard sessions, and suppresses unchanged submissions. Display decorations remain separate.
Findings None None.
Security None None.

How this fits together

The Control UI turns Gateway session metadata into sidebar, chat-header, and Sessions-page names. Rename controls submit custom labels through the existing session mutation API.

flowchart TD
  A[Gateway session metadata] --> B[Editable name selection]
  B --> C[Sidebar and Sessions dialog]
  B --> D[Chat header editor]
  C --> E{Name changed?}
  D --> E
  E -->|No| F[Keep automatic naming]
  E -->|Yes| G[Check connection and session identity]
  G --> H[Save custom label or clear it]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +25, Tests +69, Docs 0. Total +94 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 7 76 51 +25
Tests 3 105 36 +69
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 182 88 +94

Review metrics

Metric Value Why it matters
Production versus test growth Production net +25 lines; tests net +69 lines Production growth centralizes the existing title policy and binds dialogs to connection lifetimes; test growth exercises the user-visible rename lifecycle.

Technical review

Best possible solution:

Use one editable-name policy across all three controls while retaining the existing label storage, authorization, and session-identity contracts.

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

Yes, from source: open sidebar or Sessions-page Rename for a dashboard session with a generated title and no custom label; current main seeds an empty string. This review did not execute the UI.

Is this the best way to solve the issue?

Yes. Sharing the existing header policy fixes the inconsistent controls without introducing competing naming rules or changing stored-label semantics.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against f3f1995be7fe.

Labels

Label justifications:

  • P2: Repairs a bounded session-renaming inconsistency without blocking chat or setup.
  • 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: The MEMBER-authored PR is exempt from the external-contributor proof gate. Its captured evidence reports real Chrome prefill, edit, and save behavior through a disposable Gateway fixture, supplemented by browser regressions; attachment retrieval was unavailable to this reviewer.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Sebastien Tardif: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (2 earlier review cycles)
  • reviewed 2026-09-06T05:40:59.779Z sha f5fb51e5f45f85c910a3798c46cfe2ecd2a54180 :: blocked before merge. :: none
  • reviewed 2026-09-06T05:55:43.004Z sha f5fb51e5f45f85c910a3798c46cfe2ecd2a54180 :: needs maintainer review before merge. :: none

@steipete
steipete marked this pull request as ready for review September 6, 2026 05:48
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

The remaining review note is a reviewer access limitation, not an identified code defect. I inspected both synthetic before/after captures locally, reproduced the empty sidebar and Sessions-page fields on the original code, and verified the repaired flow in Chrome against a disposable local Gateway fixture: prefilled generated title, keyboard editing, Enter submission, and updated sidebar title. The built-Control-UI browser suite also passed all 9 focused scenarios, including cancellation, no-op saves, clearing, disconnects, and replacement-session protection. Another 142 focused tests and changed checks passed; independent review found no actionable P0–P2 findings.

The PR description now includes the live verification and retains the screenshots. The shared-title policy is the requested mitigation and is already implemented. Landing remains subject to the exact-head required CI gates.

Use the shared editable-title policy in the sidebar, Sessions page, and chat header. Preserve unchanged generated names, custom-label clearing, account decorations, and original connection/session ownership. Cover real keyboard edits and the full rename lifecycle across all three surfaces.
@steipete
steipete force-pushed the codex/fix-session-rename branch from f5fb51e to 5689bdb Compare September 6, 2026 06:02
@steipete
steipete merged commit d3605d9 into main Sep 6, 2026
126 checks passed
@steipete
steipete deleted the codex/fix-session-rename branch September 6, 2026 06:23
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
Use the shared editable-title policy in the sidebar, Sessions page, and chat header. Preserve unchanged generated names, custom-label clearing, account decorations, and original connection/session ownership. Cover real keyboard edits and the full rename lifecycle across all three surfaces.
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. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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.

1 participant