Repository navigation
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 26, 2026, 5:30 AM ET / 09:30 UTC. Summary PR surface: Source +391, Tests +1633. Total +2024 across 44 files. Reproducibility: not applicable. this is a new Control UI affordance, not a current-main bug report. The PR body supplies live gateway/Chromium proof for the intended user flow, and the branch adds focused DOM regression coverage for the cache and rename-state cases. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Maintainers should choose the canonical Control UI session rename/history model, then either land this narrow inline editor or fold its tested cache/race behavior into the selected broader session-history branch. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a new Control UI affordance, not a current-main bug report. The PR body supplies live gateway/Chromium proof for the intended user flow, and the branch adds focused DOM regression coverage for the cache and rename-state cases. Is this the best way to solve the issue? Unclear as a product decision: the narrow implementation reuses sessions.patch and appears technically sound, but the best overall solution depends on whether maintainers want this inline editor or the broader accessible picker/sidebar model to be canonical. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ec737ee74d9b. Label changesLabel justifications:
Evidence reviewedPR surface: Source +391, Tests +1633. Total +2024 across 44 files. View PR surface stats
What I checked:
Likely related people:
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. How this review workflow works
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3e46522b11
ℹ️ 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".
|
Thanks for the detailed review. I pushed 1. Refresh the picker cache after rename — 2. Clear rename state on every picker close — the three app-level dismissal paths in 3. Surface rename failures in the picker — New regression tests cover: cache reload after a successful rename, picker-visible error + editor restore on failure, and the no-restore-after-close race. i18n key Quality gates green locally: On the proof ask: I still can't attach a running-UI recording from this contribution environment, so the added coverage remains DOM/unit-level with the sessions controller boundary exercised through the real |
|
Updated this branch against current What changed in the conflict resolution:
Validation run locally:
@codex review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2a7ec7b3a0
ℹ️ 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".
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d10fcbb1ba
ℹ️ 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".
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
1 similar comment
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Addressed the latest Codex + ClawSweeper rename-picker findings in 0712c24:
Evidence:
Note: @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d4e462432
ℹ️ 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".
| title=${renameLabel} | ||
| aria-label=${renameLabel} | ||
| ?disabled=${renameDisabled} | ||
| @click=${() => beginChatSessionRename(state, row.key, label)} |
There was a problem hiding this comment.
Avoid saving disambiguation text as the label
When duplicate session names are present, resolveSessionOptionGroups() appends UI-only scope/key text to label to disambiguate rows, and this passes that rendered label into the rename draft. Opening the editor and pressing Save without edits then compares against the raw row label and persists the disambiguated text (for example Work · <scope>) via sessions.patch, changing the user's label and recency even though they made no rename; seed the editor from the editable row name/display name rather than the picker’s disambiguated label.
Useful? React with 👍 / 👎.
| normalizeOptionalString( | ||
| state.chatSessionPickerResult?.sessions.find((row) => row.key === key)?.label ?? | ||
| state.sessionsResult?.sessions.find((row) => row.key === key)?.label, | ||
| ) ?? null |
There was a problem hiding this comment.
Treat displayName-backed drafts as unchanged
For rows whose visible name comes from displayName rather than a custom label, the editor is now prefilled from that visible name, but this no-op check still looks only at row.label. Opening such a channel/group session and pressing Save without edits therefore sends sessions.patch with label set to the display name, converting a generated display name into a custom label and bumping recency even though nothing changed; fresh evidence in this revision is that the current-label helper still ignores displayName.
Useful? React with 👍 / 👎.
| if (!requestIsCurrent) { | ||
| if (state.chatSessionPickerOpen) { | ||
| updateChatSessionPickerCachedLabel(state, key, label); | ||
| if ( |
There was a problem hiding this comment.
Refresh ordering for stale rename successes
When an older save succeeds after the user has already started another edit and there is no active picker search, this stale-success path only patches the cached label. sessions.patch bumps updatedAt and refreshes sessionsResult, but the open picker continues to render chatSessionPickerResult, so the renamed row keeps its old position/timestamp until some later reload; refresh or patch the cached row ordering/metadata here as well.
Useful? React with 👍 / 👎.
|
Follow-up after reviewing the ClawSweeper/Codex rename notes:
Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dbff910857
ℹ️ 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".
| ? { | ||
| ...row, | ||
| label: label ?? undefined, | ||
| displayName: label === null ? undefined : row.displayName, |
There was a problem hiding this comment.
Preserve display names when clearing stale labels
When a label-clear save succeeds after another rename has made this request stale, this cached-row patch removes displayName as well as label. Channel/group rows can legitimately have both a custom label and a generated display name, and clearing the custom label should reveal the generated name; with no active picker search this stale-success path does not reload, so the picker falls back to the session key/generic channel name until a later refresh.
Useful? React with 👍 / 👎.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
1 similar comment
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Addressed the open Codex picker-rename findings:
Validation:
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
This pull request has been automatically marked as stale due to inactivity. |
df19ab9 to
5a6a19c
Compare
Summary
patchSession(state, key, {label})flow (the samesessions.patch+loadSessions()path the admin Sessions tab already uses). Empty/whitespace input clears the label vianormalizeOptionalString, matching admin-tab semantics exactly./name,/new --name,/sessions), switching sessions from text channels, and any LLM auto-suggest. Those are planned as separate, smaller PRs.Linked context
Related #54397, #85502
This is the small "header/sidebar shortcut" that maintainers explicitly invited as a separate polish request when closing #85502 (the admin-tab rename shipped there). It also advances the chat-native session-management UX discussed in #54397. I deliberately did not put
Closes #because neither issue is a 1:1 match — happy to add one if a maintainer prefers.Real behavior proof (required for external PRs)
Behavior addressed: Rename a session inline from the in-chat session picker (open picker → edit icon on a row → type a new label → Enter/Save), including clear-on-empty and Cancel/Escape.
Real environment tested: A live self-hosted OpenClaw gateway (v2026.5.27, Node v22, on WSL2/Ubuntu-24.04) serving this PR branch's built
control-ui, driven through a real Chromium browser via Playwright. The browser authenticates against the running gateway over the actual WebSocket control channel and exercises the production render path end to end. Endpoint, tokens, and other session labels are redacted.Exact steps or command run after this patch:
control-uiand pointed the running gateway at it; confirmed it was live withcurl -fsS http://127.0.0.1:<port>/healthz→200.node rename_e2e.js, headless Chromium): connect to the gateway → open the in-chat session picker → click a row's inline edit icon → type a new label → press Enter to commit → re-read the session list to confirm persistence → restore the original label.Evidence after fix (browser console + control-channel capture):
Observed result after fix: Clicking a row's edit icon enters inline edit mode seeded with the current label. Pressing Enter commits through the existing
sessions.patchflow (ok=true) and the self-refreshingsessions.listimmediately shows the new name in both the picker row and the sidebar "Recent" list — no page reload and without opening the admin Sessions tab. Cancel/Escape and closing the picker mid-edit discard the draft and leave the label unchanged. The new name persisted across a freshsessions.listread; the original label was then restored.What was not tested: Non-web channels (this is a Control UI surface only), and exact visual pixel styling across physical devices/browsers other than headless Chromium. The commit path is the same
patchSessionflow the admin Sessions tab already uses, which is additionally covered by the DOM-level regression tests inui/src/ui/views/chat.test.ts.Tests and validation
ui/src/ui/views/chat.test.tsunder "chat session controls": commit via Enter, clear-on-whitespace via Save, cancel via Escape, and discard-on-close (regression guard so closing the picker mid-edit cannot leak a stale rename/draft).pnpm tsgo:test:ui,pnpm ui:i18n:check, oxlint and oxfmt all green on the changes.Risk checklist
sessions.patchflow already used by the admin rename.<div>to host the rename button. Mitigation: wrappers are markedrole="presentation"so options remain owned by thelistbox. Note: this picker was already a loose listbox (button options, no roving tabindex); a deeperlist/listitemrefactor is intentionally left out of scope.Current review state
role="presentation"approach.