Repository navigation
fix(ui): keep duplicate session rename errors in the modal - #168034
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR keeps duplicate-name rename failures inside the sidebar dialog while preserving the entered name. Example: Rename a sidebar session to the already-used name “Rejected rename”.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness✅ Ready for maintainer review Keep this PR open: it repairs a current rename-dialog defect, preserves unrelated errors, and has no actionable findings; it intentionally addresses only part of the linked issue. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI session organizer submits scoped session patches to the Gateway and routes rejection feedback to either the originating dialog or the sidebar. flowchart LR
A[Sidebar Rename] --> B[Input dialog]
B --> C[Session organizer]
C --> D[Session patch capability]
D --> E[Gateway validation]
E --> F[Attempt error handling]
F --> B
F --> G[Sidebar error]
Technical reviewBest possible solution: Retain this focused duplicate-name repair and leave the broader rejection-feedback work with its existing issue owner. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the close-before-response failure, corroborated by the linked real-Gateway report and inspected before screenshot; no runtime reproduction was executed during this review. Is this the best way to solve the issue? The existing asynchronous dialog contract is the appropriate repair, and attempt-local classification avoids consuming or clearing a concurrent mutation's error. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ced267e85754. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +30, Tests +91, Other +9. Total +130 across 6 files. Added test files: 1. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed October 9, 2026, 10:37 PM ET / October 10, 2026, 02:37 UTC (Revision 5). |
OpenClaw-Publication: 5ec9d965-426c-4316-ab0f-07070afeb4b5
722a4c0 to
99e40bb
Compare
|
@clawsweeper re-review Current head: |
|
🦞👀 Re-review progress:
|
…168034) * fix(ui): keep duplicate session rename errors in the modal OpenClaw-Publication: 5ec9d965-426c-4316-ab0f-07070afeb4b5 * fix(ui): keep rename rejection handling scoped to its attempt * refactor(ui): isolate session patch and rename proof owners --------- Co-authored-by: RomneyDa <[email protected]>
Related: #152762 (duplicate-name sidebar error only; overlong-name handling is outside this PR).
What Problem This Solves
Fixes the raw sidebar error banner and lost input when a session rename uses an existing name.
User Impact
The rename dialog stays open, preserves the attempted name, and shows “A session with this name already exists.” Unrelated mutation failures remain visible in the sidebar. No migration or configuration change is required.
Why This Change Was Made
Use the existing dialog submit contract to present duplicate validation locally. Classify the rejection synchronously for its own patch attempt instead of reading or clearing the shared sidebar error, so an overlapping mutation cannot discard the rename input or lose its own error.
Evidence
Reproduced the original sidebar-banner defect on the rebased main implementation; the browser regression fails there.
Fresh review identified a shared-error race. The concurrent pin/rename browser case failed on the first fix and passes with attempt-local handling. Independent corrected-candidate review found no P0–P2 findings.
Focused shipped-bundle/mock-Gateway E2E: 6 checks passed, covering isolated/concurrent duplicate rejection, subsequent generic errors, successful rename, and replacement-session protection across Sessions/sidebar/header. Invocation wall time: 63.30 s. The two rejection cases took 2.23 s and 2.00 s; suite startup is shared. This checks real UI routing, dialog rendering, and Gateway response ordering, not just a helper.
Formatting, i18n, UI typecheck, UI/script lint, and diff checks pass. Patch ownership and rename proof were mechanically split to satisfy file-size budgets; both runtime owners select the moved rename E2E through the actual CI selection contract. Independent review found no remaining P0–P2 findings.
Post-extraction
session-management.rename.e2e.test.ts: all 3 browser cases pass (12.17 s of test execution; measured invocation wall time 1,054.95 s, including inflated setup/host time). No extra per-test process boots. Final-head CI passed; hosted CI wall time was 527 s, with 6,956 aggregate job-seconds (parallel lanes, not additional local test time).Rebased onto
b1c3004f73cad1c1b68786e592d025fcdc048f68because main repaired the three unrelated avatar-test failures from the first CI run in feat: let themes customize Control UI branding #168027. Corrected-head CI (99e40bb0c94606bd21b9304b071c3d30e1e010a8) passed. Final mechanical cleanup head684912ccb141322b2bbf1603edabde138f028f1apassed current-head CI. No merge requested.Exact-head ClawSweeper review: no findings; patch quality and proof confidence are diamond lobster (5/6). Overall is gold shrimp (3/6) solely because this is an explicitly scoped partial fix of the broader linked issue.
Before
The rejected name appears in a raw sidebar banner; the edit dialog is gone.
After
The entered name is preserved with inline validation and no duplicate sidebar banner.
Concurrent failure
The duplicate remains editable while the unrelated pin rejection remains visible behind the modal.