Repository navigation
fix: archived chat composer returns after session navigation - #122641
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 12, 2026, 4:06 PM ET / 20:06 UTC. ClawSweeper reviewWhat this changesThis PR adds a Control UI archive-state overlay so an archived chat remains disabled across stale session refreshes and navigation. Merge readiness⛔ Blocked by patch quality or review findings - 6 items remain Keep open: the new confirmed-archive overlay is not retired when a Gateway delete event removes the session, so stale archive state can survive a remote deletion and be reapplied to a later same-key projection. Priority: P1 Review scores
Verification
How this fits togetherThe Control UI reconciles Gateway session lists and events into a roster that drives the selected chat and composer. The patch retains a confirmed archive fact outside roster rows so an evicted archived row cannot be reintroduced as active by stale data. flowchart LR
A[Gateway session list and events] --> B[Session reconciler]
C[Archive or unarchive action] --> D[Confirmed archive overlay]
B --> E[Session roster]
D --> E
E --> F[Selected chat]
F --> G[Composer state]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +101, Tests +325. Total +426 across 9 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Clear confirmed archive state whenever reconciliation reports a deleted key, cover a remote delete followed by an id-less same-key projection, then retain the overlay as the canonical fix for stale refreshes. Do we have a high-confidence way to reproduce the issue? Yes, from source: a Gateway delete has no archive field, and the new event reconciliation path never clears the confirmed archive map for its deleted key. Is this the best way to solve the issue? No—not yet. Keeping confirmed archive state at the session-capability boundary is the right shape, but its Gateway delete lifecycle is incomplete. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3edc9c2be5ff. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
705aa47 to
64fdb0a
Compare
bfcd8f7 to
71d5355
Compare
…w#122641) * fix(ui): preserve archive state across stale refreshes * fix(ui): retain archive state across navigation * fix(ui): ignore stale archive events * fix(ui): scope archive state to session identity * fix(ui): require session identity for presentation metadata * fix(ui): require exact archive identity
What Problem This Solves
Fixes an issue where users who archived the selected Control UI chat could see the active composer return after a delayed session refresh or after navigating away and back, even though the Gateway kept the session archived.
Why This Change Was Made
The session capability records confirmed archive state independently of roster-row lifetime and reapplies it to stale list projections. The reconciler remains the freshness authority: rejected stale events cannot update the overlay, explicit unarchive events clear it, and replacement session identities retire it. Presentation metadata remains gated on a known matching
sessionId.User Impact
Archived chats continue to show the archived-session notice and keep the composer disabled across refreshes and session navigation. Unarchiving or replacing the session restores the active projection normally, and replacement sessions do not inherit an earlier session's title or message preview.
Evidence
sessionId. A partial prior row followed by a replacement identity cannot transfer its title or preview.sessionIdand retires on an identity mismatch, so a replacement session cannot inherit the old archive state.session-management.groups.e2e.test.tsexpected a stale active-list row to restore the archived row. The scenario asserts that the confirmed archive leaves the Active view while retaining its separate selection-order coverage.pnpm --dir ui exec vitest run --config vitest.config.ts src/lib/sessions/index.test.ts src/lib/sessions/list-options.test.ts src/lib/sessions/reconcile.test.ts: 67 tests passed on headbfcd8f7ac22.pnpm test:ui:e2e ui/src/e2e/session-management.archive.e2e.test.ts ui/src/e2e/session-management.groups.e2e.test.ts: 20 tests passed on headbfcd8f7ac22.OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 node scripts/check-changed.mjs: passed on headbfcd8f7ac22.main.