Repository navigation
fix(ui): recover expired Incognito conversations - #156544
Conversation
Explain expired private sessions, preserve unsent input for explicit fresh Incognito creation, and stop doomed retries. Keep private attachments out of durable payload storage before session metadata arrives while preserving ordinary queued destinations.
|
🦞👀 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 23, 2026, 12:06 PM ET / 16:06 UTC (Revision 4). ClawSweeper reviewWhat this changesThe Control UI explains expired Incognito conversations, offers explicit private-session recovery with unsent input preserved, suppresses futile retries, and scopes attachment persistence to the queued destination. Merge readiness✅ Ready for maintainer review This PR remains useful: current main does not cover recovery from expired canonical Incognito links. The reviewed patch has no blocking correctness findings, and the supplied evidence supports the changed behavior. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI receives session history from the Gateway and uses it to control the chat composer and queued messages. Recovery creates a fresh private conversation through the existing session owner and transfers the unsent draft within the tab. flowchart TD
A[Incognito conversation link] --> B[Gateway history response]
B --> C{Private session missing?}
C -->|No| D[Existing chat composer]
C -->|Yes| E[Expiry notice and retained failed text]
E -->|User chooses recovery| F[Existing session creation owner]
F --> G[Fresh private conversation with unsent draft]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +126, Tests +368, Docs +2. Total +496 across 16 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep expiry detection with accepted history and recovery with the existing session owner, preserving private drafts without automatic replay. Do we have a high-confidence way to reproduce the issue? Yes: a canonical Incognito link whose Gateway session disappeared reaches an empty history response without an expiry state on current main. Source and supplied before/after evidence establish the path; this review did not execute it. Is this the best way to solve the issue? Yes: the patch extends the existing history, creation, and persistence owners while preserving ordinary sessions and pending creation, avoiding a competing recovery mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 322e358bb0ca. LabelsLabel changes: No label 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) |
|
Merged via squash auto-merge.
|
Explain expired private sessions, preserve unsent input for explicit fresh Incognito creation, and stop doomed retries. Keep private attachments out of durable payload storage before session metadata arrives while preserving ordinary queued destinations.
What Problem This Solves
Fixes expired Incognito links appearing as editable new conversations after a Gateway restart, with a Retry action that can never succeed.
User Impact
An expired conversation explains what happened and offers New Incognito session. Unsent composer text and attachments move into that fresh private conversation without being sent automatically. Failed submitted text stays available to copy or discard. Private attachments also stay out of IndexedDB when session metadata has not arrived.
Why This Change Was Made
The accepted history response now carries the missing-session fact through the existing connection and session guards. The composer and send queue consume that fact, while recovery reuses the existing creation and navigation owner. Attachment admission and asynchronous custody use the queued destination's existing Incognito classification, so another selected pane cannot change its persistence policy.
No server protocol, permissions, retention, or data migration changes.
Evidence
The original registered deep-link flow and both attachment regressions failed before the fix. The fixed browser flow covers explicit private recovery, an actual failed submission followed by expiry, exact clipboard copying, Discard, and removal of Retry: 2.654 seconds for the case, 13.256 seconds including its bundle.
Focused owner proof passes 11 expiry/payload cases in 1.78 seconds, four session-creation lifecycle cases in 2.40 seconds, and 37 existing payload/attachment cases in 4.43 seconds. Coverage includes valid empty private sessions, ordinary uncreated sessions, provisional creation completing during a history request, changed session/client/epoch, double-click creation, and unsent attachment handoff.
The final integration preserves current Guest creation and session-permission controls. Its five registered browser cases pass (25.758 seconds including the bundle; expiry case 2.619 seconds). This includes both Guest first-turn outcomes and both SESSION_READ/SESSION_WRITE cases. After incorporating the main-branch CI fixture repair and newer shell rendering changes, the registered expiry flow passes again (13.667 seconds including its bundle). The production UI build passes in 9.263 seconds; unchanged startup budgets pass at JavaScript 371,157 / 371,332 bytes gzip and CSS 51,144 / 51,200 bytes. The shared Profile catalog loading repair supplies the budget headroom; this PR introduces no additional lazy catalog.
Fresh managed Codex P2 reviews of the final recovery patch and latest integration found no actionable findings. Earlier unchanged owner proof includes all three affected UI type graphs, scoped lint/format/styles, line/assertion guards, and docs checks. Pre-integration UI-production types on the identical recovery-owner source (37.990 seconds), scoped format/lint (0.183/7.321 seconds), i18n (2.441 seconds), and diff checks pass. The earlier hosted core type failure came from an unchanged main-branch placement fixture missing its required policy configuration; repair
090126032356is now included, with its owning type graph proven red→green and all three existing lifecycle cases passing. The full local UI suite and unrelated core type graphs were not run; hosted required gates remain enabled.An isolated live Gateway candidate containing the recovery fix also passed the actual restart flow: the expired route kept failed text available without Retry, the explicit action created a fresh private conversation without sending, and its unsent Unicode draft survived Back/Forward navigation. That live candidate predates the later Guest/access integration; the five registered cases above cover the final combined source.