Skip to content

fix(ui): keep submitted prompts visible across session startup - #152241

Merged
steipete merged 2 commits into
mainfrom
codex/new-session-prompt-visibility
Sep 19, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/new-session-prompt-visibility

Conversation

@steipete

@steipete steipete commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes submitted prompts disappearing during new-session reconnects, background starts, navigation failures, and delayed history handoffs.

Related: #152024.

User Impact

The submitted text and attachments stay visible with their current status. Successful background starts and failed navigation offer Open session without creating or sending again. Suggested tasks retain their instructions through acceptance, and Skill Workshop revisions remain visible while chat history loads.

An interrupted Incognito startup keeps a read-only prompt after confirmed temporary-session cleanup. This copy stays in memory in the current browser tab and credential scope.

Why This Change Was Made

The submission and recovery owners already knew the prompt, but some views cleared it before the next view had received the authoritative message. Preserve display custody across that handoff and ordinary reconnects, then reconcile it with the Gateway's input receipt or transcript without duplication. Execution, retry, cleanup, storage, and credential boundaries remain with their existing owners. Authoritative session resets or replacements retire stale display; ordinary cache refreshes preserve it. Settled first-turn entries release message and attachment bytes while keeping bounded in-memory identity to reject late duplicate handoffs.

Evidence

Passed 21,100 UI unit tests (four pre-existing skips) and 91 production-bundle browser tests. These cover reconnects, background starts, navigation retry without replay, canonical receipt ordering, Incognito cleanup, native-terminal starts, task suggestions, Workshop revisions, and reset/replacement ownership.

Regressions reproduced the original prompt loss and the accepted-send/reconnect, cleanup-status, and stale-handoff races before their repairs. The first CI run also exposed incomplete older fixtures, pre-context Chat rendering, and outdated native/reconnect expectations; those were repaired and verified by the full UI suites and fresh independent review.

Changed-file guards, UI and test typechecks, i18n verification, lint, UI styles, and the production UI build passed. Real Chrome interaction against a synthetic Gateway confirmed immediate prompt display and reconnect visibility. No live Gateway deployment is part of this PR.

The images below are inspected captures of the actual UI using synthetic data.

Background start

Before After
Background start before Background start after

Reconnect during creation

Before After
Reconnect during creation before Reconnect during creation after

Created session with failed navigation

Before After
Created session with failed navigation before Created session with failed navigation after

@steipete steipete self-assigned this Sep 18, 2026
@clawsweeper

clawsweeper Bot commented Sep 18, 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.

@steipete
steipete marked this pull request as ready for review September 18, 2026 23:26
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: XL maintainer Maintainer-authored PR labels Sep 18, 2026
@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 18, 2026
@clawsweeper

clawsweeper Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 18, 2026, 7:56 PM ET / 23:56 UTC (Revision 2).

ClawSweeper review

What this changes

The Control UI keeps submitted prompts and attachments visible through session startup, reconnects, navigation failures, and delayed history, with matching recovery controls, tests, and documentation.

Merge readiness

✅ Ready for maintainer review

This remains useful beyond the merged cloud-startup fix: current main still has the display gaps addressed here. No blocking introduced defect was found.

Priority: P2
Reviewed head: 7c1b1806c617514535249ab804b92bead077a98c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, coherent repair with direct visual evidence and meaningful lifecycle coverage; no blocking correctness finding.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after Chrome captures show the changed submission presentation retaining prompts during reconnect and background completion against a synthetic Gateway. Source and focused regression coverage support the remaining reconciliation paths; this is browser UI proof, not a live Gateway deployment.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before/after Chrome captures show the changed submission presentation retaining prompts during reconnect and background completion against a synthetic Gateway. Source and focused regression coverage support the remaining reconciliation paths; this is browser UI proof, not a live Gateway deployment.
Evidence reviewed 9 items Current-main gap remains: The fetched main runtime returns no startup presentation when its live connection lifecycle is interrupted, and accepted recovery retires the startup entry without the new accepted-input display handoff.
Display and execution remain separately fenced: Startup presentation checks connection revision, Gateway URL, presentation owner, and recovery scope. Runtime retry still requires the current lifecycle; cancelled Incognito entries retain display without enabling retry or another send.
Canonical reconciliation and retirement: Initial display is reconciled against pending inputs, canonical user-message identities, and consumed-event identities. Retirement releases message bytes while retaining bounded identity; reset and physical-session replacement tests cover stale handoff suppression.
Findings None None.
Security None None.

How this fits together

The Control UI carries submitted input from New Session, suggested tasks, and Skill Workshop into chat. The Gateway owns execution and delivery; browser presentation retains the prompt until authoritative input or history replaces it.

flowchart LR
  A[Submitted prompt and attachments] --> B[Browser submission display]
  A --> C[Gateway session startup]
  B --> D{Connection owner still matches?}
  D -->|Yes| E[Visible pending prompt]
  D -->|No| F[Retire private display]
  C --> G[Authoritative input or history]
  G --> E
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +808, Tests +1178, Docs +2. Total +1988 across 67 files.

View PR surface stats
Area Files Added Removed Net
Source 36 1129 321 +808
Tests 30 1353 175 +1178
Docs 1 6 4 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 67 2488 500 +1988

Review metrics

Metric Value Why it matters
Production versus test growth Production +808 net lines; tests and test support +1178 The stated production growth supports retained presentation across several existing entry points, with regression coverage for their lifecycle boundaries.

Technical review

Best possible solution:

Keep display custody with the existing submission owners until authoritative chat content arrives, while preserving current send, retry, cleanup, and credential boundaries.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: interrupting the current-main startup connection suppresses its retained prompt, and accepted recovery can retire presentation before the pane receives history. This review did not execute a current-main reproduction.

Is this the best way to solve the issue?

Yes. The patch extends existing presentation and reconciliation owners, keeps navigation recovery separate from creation, and adds targeted lifecycle coverage without changing persisted formats or Gateway RPCs.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against e623bcd437da.

Labels

Label justifications:

  • P2: Repairs confusing prompt disappearance during bounded Control UI startup and recovery flows without evidence of lost Gateway delivery.
  • 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 before/after Chrome captures show the changed submission presentation retaining prompts during reconnect and background completion against a synthetic Gateway. Source and focused regression coverage support the remaining reconciliation paths; this is browser UI proof, not a live Gateway deployment.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after Chrome captures show the changed submission presentation retaining prompts during reconnect and background completion against a synthetic Gateway. Source and focused regression coverage support the remaining reconciliation paths; this is browser UI proof, not a live Gateway deployment.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after Chrome captures show the changed submission presentation retaining prompts during reconnect and background completion against a synthetic Gateway. Source and focused regression coverage support the remaining reconciliation paths; this is browser UI proof, not a live Gateway deployment.

Evidence

What I checked:

  • Current-main gap remains: The fetched main runtime returns no startup presentation when its live connection lifecycle is interrupted, and accepted recovery retires the startup entry without the new accepted-input display handoff. (ui/src/app/session-placement-startup.runtime.ts, e623bcd437da)
  • Display and execution remain separately fenced: Startup presentation checks connection revision, Gateway URL, presentation owner, and recovery scope. Runtime retry still requires the current lifecycle; cancelled Incognito entries retain display without enabling retry or another send. (ui/src/app/session-placement-startup.ts:82, 7c1b1806c617)
  • Canonical reconciliation and retirement: Initial display is reconciled against pending inputs, canonical user-message identities, and consumed-event identities. Retirement releases message bytes while retaining bounded identity; reset and physical-session replacement tests cover stale handoff suppression. (ui/src/pages/chat/history-merge.ts, 7c1b1806c617)
  • Navigation-only recovery: Open session uses the recorded created session and existing navigation owner. Tests verify that retrying navigation does not call session creation again and that changed credential scope hides the retained prompt. (ui/src/pages/new-session/started-session-navigation.ts, 7c1b1806c617)
  • Inspected browser proof: Inspected all four prepared images from media-proof-manifest.json: the background-start pair shows the retained prompt and Open session above the next draft; the reconnect pair shows the prompt remaining visible with Reconnecting. These demonstrate visible behavior in the reported Chrome/synthetic-Gateway setup. The navigation-failure pair linked in the captured body was not included in the prepared manifest and was not independently inspected.
  • Merged related work is only a partial overlap: GitHub confirms fix(ui): keep cloud startup prompts and progress in chat #152024 merged as 400d1f8. Its cloud-provisioning presentation fix does not replace this PR's reconnect, background completion, navigation recovery, and late-handoff work. (400d1f8d0fef)

Likely related people:

  • Peter Steinberger: Raw commit 400d1f8 adds ui/src/app/session-placement-initial-turn.ts:14 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 400d1f8d0fef; files: ui/src/app/session-placement-initial-turn.ts)

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 (1 earlier review cycle)
  • reviewed 2026-09-18T23:33:06.214Z sha aaca89bb97c3741126b36406a0239916cde2987f :: needs maintainer review before merge. :: none

Keep submitted text and attachments visible through reconnects, background
starts, navigation failures, task suggestion acceptance, and Workshop revision
handoffs. Retain interrupted temporary-session prompts with their actual status
and reconcile accepted input with canonical history without duplicate display.

Preserve execution, recovery, credential, and storage ownership. Open session
retries navigation without creating another session or sending another prompt.

Follow-up to #152024.
Keep native-terminal starts busy while showing the submitted prompt. Preserve valid Chat rendering before context is bound, and bring unit fixtures and browser assertions onto the submitted-prompt visibility contract.
@steipete
steipete force-pushed the codex/new-session-prompt-visibility branch from fd13307 to 7c1b180 Compare September 18, 2026 23:49
@steipete
steipete merged commit 5d39249 into main Sep 19, 2026
153 checks passed
@steipete
steipete deleted the codex/new-session-prompt-visibility branch September 19, 2026 00:09
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 19, 2026
* commit 'ca69b4d25dfcd488acc6ba1d878e4b4252f40cd2': (325 commits)
  perf(gateway): streamline config reload comparison (#152279)
  fix(xai): reject invalid UTF-8 OAuth responses (#111737)
  fix(release): accept waived advisory performance evidence for stable publication (#152290)
  fix: deliver watcher results while other sessions are busy (#152287)
  perf(media): reuse attachment filename classification (#152274)
  refactor(build): reuse forwarded option scanning (#152293)
  chore(diagnostics-otel): revert unapproved duration-bucket merge (#152292)
  fix: stop chat media reads after access changes (#152219)
  fix(test): use Gateway WebSocket transport in network fixtures (#152143)
  improve: retain quota refresh evidence from successful CI runs (#152173)
  improve(gateway): reduce memory used by session selection (#152260)
  perf(agents): use keyed subagent capability lookups (#152263)
  refactor(matrix): centralize media metadata assembly (#149128)
  chore(ui): refresh control ui locales (#152276)
  feat: open Crabbox apps beside the conversation (#152094)
  refactor: simplify worker and model fallback handling (#152268)
  perf(codex): reconcile session catalogs incrementally (#152257)
  fix(ui): keep submitted prompts visible across session startup (#152241)
  perf(sessions): move automatic maintenance database work to workers (#148630)
  fix: preserve reply metadata through outbound preparation (#152231)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 19, 2026
…law#152241)

* fix(ui): keep submitted prompts visible across session startup

Keep submitted text and attachments visible through reconnects, background
starts, navigation failures, task suggestion acceptance, and Workshop revision
handoffs. Retain interrupted temporary-session prompts with their actual status
and reconcile accepted input with canonical history without duplicate display.

Preserve execution, recovery, credential, and storage ownership. Open session
retries navigation without creating another session or sending another prompt.

Follow-up to openclaw#152024.

* fix(ui): preserve pending status and pre-context rendering

Keep native-terminal starts busy while showing the submitted prompt. Preserve valid Chat rendering before context is bound, and bring unit fixtures and browser assertions onto the submitted-prompt visibility contract.
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 maintainer Maintainer-authored PR 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: XL 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