Skip to content

fix(ui): recover expired Incognito conversations - #156544

Merged
steipete merged 4 commits into
mainfrom
codex/incognito-expired531
Sep 23, 2026
Merged

steipete merged 4 commits into
mainfrom
codex/incognito-expired531

Conversation

@steipete

@steipete steipete commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

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 090126032356 is 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.

Before: expired Incognito link still offers an editable new session

After: expired Incognito link explains recovery and offers a fresh private session

After: failed private input remains available to copy or discard without retry

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.
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: L labels Sep 23, 2026
@steipete
steipete marked this pull request as ready for review September 23, 2026 13:48
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 23, 2026, 12:06 PM ET / 16:06 UTC (Revision 4).

ClawSweeper review

What this changes

The 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
Reviewed head: e5df4adf686f06707e516f086f12d2c58f4c2c1a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with convincing visual and reported live evidence, meaningful regression coverage, and no blocking findings.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected screenshots demonstrate the changed expiry and failed-message states, supported by the captured live Gateway restart and recovery observations. The live run predates Guest/access integration; final registered browser coverage supplements it. No stored-data format changes require migration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected screenshots demonstrate the changed expiry and failed-message states, supported by the captured live Gateway restart and recovery observations. The live run predates Guest/access integration; final registered browser coverage supplements it. No stored-data format changes require migration.
Evidence reviewed 8 items Pinned introduced change: Reviewed the complete introduced diff against the pinned base. The original head's raw commit records match the supplied two parents; base integration was kept separate from PR ownership.
Still necessary on main: Fetched main lacks the accepted-history expiry predicate and still classifies attachment persistence using the selected pane's metadata. The latest release's history-state blob also matches the pre-change implementation; no released replacement was established.
Scoped recovery and existing authorization: Expiry requires an accepted missing-session response for the current client, connection epoch, session owner, and key, excluding pending creation. Recovery reuses sessions.create and the existing draft handoff without automatic submission; the shared scope policy still requires operator.admin for Incognito creation.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +126, Tests +368, Docs +2. Total +496 across 16 files.

View PR surface stats
Area Files Added Removed Net
Source 11 184 58 +126
Tests 4 368 0 +368
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 16 554 58 +496

Review metrics

Metric Value Why it matters
Production and regression coverage production +126 net lines; tests +368 net lines Production growth supports scoped expiry and recovery within existing owners; tests cover distinct routing, lifecycle, and attachment-storage failures.

Technical review

Best 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.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This repairs a bounded Incognito recovery and attachment-persistence defect without changing ordinary session behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected screenshots demonstrate the changed expiry and failed-message states, supported by the captured live Gateway restart and recovery observations. The live run predates Guest/access integration; final registered browser coverage supplements it. No stored-data format changes require migration.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected screenshots demonstrate the changed expiry and failed-message states, supported by the captured live Gateway restart and recovery observations. The live run predates Guest/access integration; final registered browser coverage supplements it. No stored-data format changes require migration.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected screenshots demonstrate the changed expiry and failed-message states, supported by the captured live Gateway restart and recovery observations. The live run predates Guest/access integration; final registered browser coverage supplements it. No stored-data format changes require migration.

Evidence

What I checked:

  • Pinned introduced change: Reviewed the complete introduced diff against the pinned base. The original head's raw commit records match the supplied two parents; base integration was kept separate from PR ownership. (e5df4adf686f)
  • Still necessary on main: Fetched main lacks the accepted-history expiry predicate and still classifies attachment persistence using the selected pane's metadata. The latest release's history-state blob also matches the pre-change implementation; no released replacement was established. (ui/src/pages/chat/chat-history-state.ts, 322e358bb0ca)
  • Scoped recovery and existing authorization: Expiry requires an accepted missing-session response for the current client, connection epoch, session owner, and key, excluding pending creation. Recovery reuses sessions.create and the existing draft handoff without automatic submission; the shared scope policy still requires operator.admin for Incognito creation. (ui/src/pages/chat/chat-pane-session-creation.ts:228, e5df4adf686f)
  • Attachment privacy and compatibility: Payload preparation now consumes the existing destination-scoped Incognito classifier, including before roster metadata arrives. Ordinary destinations retain durable payload storage. The diff changes admission checks, not stored schemas, serialization, or migration formats. (ui/src/pages/chat/outbox-payloads.ts:88, e5df4adf686f)
  • Inspected visual and reported live proof: Inspected all three prepared screenshots: before shows an editable empty conversation; after shows the expiry notice and recovery action; the failed-message state preserves text with Discard and no Retry. The captured PR body, sourceRevision 6a8459dfc387f7aa6637c45c13783f52a25f6dfcfd5d46f325c2cd028bce2961, additionally reports an isolated live Gateway restart followed by explicit private creation without sending and Unicode draft preservation through Back/Forward. That live candidate predates the later Guest/access integration, as disclosed.
  • Regression coverage: Read the registered browser flow and focused owner tests covering missing versus valid private sessions, ordinary uncreated sessions, provisional creation, stale connections, duplicate recovery clicks, unsent attachment handoff, and destination-scoped payload persistence. The body reports the final expiry browser replay at 13.667 seconds including its bundle. Tests were not executed during this read-only review. (ui/src/e2e/chat-incognito-expired.e2e.test.ts:16, e5df4adf686f)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Shakker: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-23T13:56:25.734Z sha a086923 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-23T14:14:17.292Z sha 803bb59 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-23T15:53:04.044Z sha 18ad61d :: needs maintainer review before merge. :: none

@openclaw-barnacle openclaw-barnacle Bot reopened this Sep 23, 2026
@steipete
steipete enabled auto-merge (squash) September 23, 2026 16:13
@steipete
steipete merged commit d099094 into main Sep 23, 2026
111 checks passed
@steipete
steipete deleted the codex/incognito-expired531 branch September 23, 2026 16:16
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 24, 2026
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.
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant