Repository navigation
fix(ui): preserve split selections and newer drafts - #149364
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. Reviewed September 15, 2026, 7:02 PM ET / 23:02 UTC (Revision 5). ClawSweeper reviewWhat this changesThe PR preserves newer split-pane drafts, keeps rapid conversation selections and expanded dashboards stable, and updates regression tests, documentation, and a wrapper-test fixture. Merge readiness✅ Ready for maintainer review Keep open: the central fixes remain necessary on current main. The pinned patch has useful browser evidence, preserves existing storage contracts, and introduces no actionable correctness finding. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI manages conversation panes, unsent drafts, and browser navigation. Pane lifecycle events feed composer recovery, while focus changes feed the router that selects the visible conversation. flowchart TD
A[Composer edits] --> B[Existing draft store]
C[Pane eviction and return] --> D[Revision-aware handoff]
B --> D
D --> E[Recovered composer]
F[Pane focus or dashboard notification] --> G[Navigation owner]
G --> H[Selected conversation and view]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +15, Tests +133, Docs +4. Total +152 across 16 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one revision-aware recovery path for evicted composers and let the router settle explicit focus intent without disturbing saved dashboard presentation. Do we have a high-confidence way to reproduce the issue? Yes: save different drafts in two panes showing the same conversation, then evict and revisit the older pane. Current-main source supports the failure mechanism, and the supplied Chromium evidence demonstrates the sequence; this review did not rerun it. Is this the best way to solve the issue? Yes: extending the existing handoff with its original revision removes competing restoration logic, and delegating focus cancellation to the existing router avoids another navigation owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 66d85ddf5397. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
CI exposed a separate rapid-focus race: focusing A then returning to C before navigation settled let A replace the selected session in C's split. C's draft survived in a hidden view, while the visible pane showed A's draft. The page's redundant same-session shortcut prevented the existing router from canceling superseded navigation. Removing it lets the router own cancellation and same-match handling. The deterministic Chromium regression fails before the repair and passes afterward, preserving both drafts, the final C URL, and browser history length. Inspected synthetic screenshots show the same sequence at 1000×900. This is mocked-Gateway browser proof. Rendering of these newly uploaded images remains to be verified before landing because browser automation became unavailable. |
7d8392a to
22279d9
Compare
Link the existing installed wrapper dependencies into the linked alias fixture so its node recorder observes the supervisor handoff after the code-only wrapper dependency cutover. Preserve all delegation and refusal assertions. Validation: nine delegation cases fail before the fix; all twelve alias delegation and refusal cases pass afterward. Focused formatting, typed lint, and independent P2 review pass. (cherry picked from commit 4ad5e7d)
5f34b41 to
c43b068
Compare
|
Merged via squash.
|
* fix(ui): preserve newer drafts after split pane eviction * fix(ui): supersede stale split focus navigation * fix(ui): refresh canonical Home session bindings * fix(ui): preserve expanded dashboard route intent * test(pr): restore dependencies in alias fixtures Link the existing installed wrapper dependencies into the linked alias fixture so its node recorder observes the supervisor handoff after the code-only wrapper dependency cutover. Preserve all delegation and refusal assertions. Validation: nine delegation cases fail before the fix; all twelve alias delegation and refusal cases pass afterward. Focused formatting, typed lint, and independent P2 review pass. (cherry picked from commit 4ad5e7d)


What Problem This Solves
Fixes two split-pane failures: an evicted pane restoring an older draft over newer saved work, and rapid focus changes letting an earlier navigation replace the last selected conversation.
User Impact
Users can return to a conversation and reload without losing the newer draft. Rapid focus changes keep the last selected conversation active, including after resizing. Text, selected recipients, Goal mode, and attachments remain consistent; unsaved drafts retain storage-failure recovery guidance. No migration or configuration change is required.
Why This Change Was Made
Eviction previously restored an unversioned draft alongside the saved composer, allowing old content to acquire a new revision. The existing handoff now carries the complete composer with its original revision and rejects stale content. The redundant eviction restore path is removed; explicit session creation and failed-storage fallbacks keep their existing ownership.
Evidence
Inspected synthetic before/after screenshots are attached below and in the originating QA conversation.
Rapid split focus follow-through
A second split-draft failure exposed a navigation race: focus the left conversation and return immediately to the lower-right conversation before the first route finishes loading. The chat page compared the requested conversation with its last committed route and skipped the return navigation. The first route could then settle into the newly active pane, displaying the wrong conversation and draft.
The chat page now delegates that focus intent to the existing router, whose same-match path cancels superseded navigation without reloading or adding history. Repeated focus within the same active pane still returns at the pane-focus owner. The original draft-revision/eviction repair remains unchanged.
The bundled Chromium regression now exercises that sequence deterministically and verifies the actual active conversation, URL, unchanged history length, preserved independent drafts, narrow viewport coverage, and restored desktop geometry. It failed on the prior head by displaying Session a instead of Session c; it passes with the four-line owner simplification. The 40 focused chat-page/router-outlet cases pass, including draft URL cleanup and face-navigation siblings. UI typechecking, changed-file type-aware lint, styles, formatting, and fresh independent P2 review are recorded with the final candidate validation.
Inspected synthetic before/after screenshots for the rapid-focus race supplement the original eviction screenshots above. Both new captures have been inspected and attached in the originating chat. Their GitHub rendering has now been verified through the restored extension relay; the screenshot delivery gate is satisfied.
The CI follow-up preserves the canonical Home-session binding refresh in the existing session-change callback. Its original failing test passes unchanged, together with 63 focused owner/router cases and the bundled rapid-focus regression. The rebase onto main containing the shared lint fix is patch-identical; those focused checks also pass on the rebased head.
Shared CI prerequisite
This branch includes the existing test-only fix from #149423 which has now landed on main as
6c28739b1aca420df0c753acb79f065085cc7229. It resolves the unrelated managed-update fixture line-limit failure without changing its assertions or production behavior. The exact extracted patch passed four Linux lifecycle cases and a fresh independent review; current-head hosted CI is still required. The feature-specific changes above are unchanged.Expanded dashboard CI regression
A repeated face notification during dashboard startup could discard the expanded-view URL setting and restore a split view. The notification now preserves an already-selected route, while explicit split-pane focus still supersedes pending navigation. The existing mobile case failed before this repair; all six dashboard cases, the rapid-focus browser case, and 28 page-owner cases passed afterward. Targeted lint, formatting and fresh independent review passed.
These additional captures use synthetic data with a mocked Gateway. The earlier swarm-disclosure failure did not reproduce on an unchanged local replay; the current CI run passes all substantive jobs, including that browser lane. Its original root cause remains unconfirmed.
Shared CI prerequisite: includes the reviewed one-line alias-fixture dependency repair from #149481 (4ad5e7d). It restores installed wrapper dependencies so alias tests reach the supervisor handoff; delegation and refusal assertions remain unchanged. The prerequisite has nine failing cases before repair, twelve passing cases afterward, and a clean independent review. Exact-head CI will validate this combination. This branch also incorporates main at 14b8ad1 to supply the existing dependency helper; all feature commits remain patch-identical, with already-landed prerequisite commits omitted.
The shared test-fixture prerequisite #149481 has landed on main. Exact-head CI run 35032472588 passed all 127 checks, including the aggregate (12 inapplicable jobs skipped). Native preparation and merge completed without a bypass; merged as c536d37.