Skip to content

fix(ui): clear split-pane questions after answers and cancellations - #118787

Merged
steipete merged 2 commits into
mainfrom
codex/auto-qa-ui-question-lifecycle-owner-3b6
Aug 5, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/auto-qa-ui-question-lifecycle-owner-3b6

Conversation

@steipete

@steipete steipete commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users answering or cancelling a Control UI question could remain stuck with waiting indicators and disabled chat panes when the Gateway committed the response without a broadcast. Closing the submitting split pane while its request was in flight also discarded the authoritative result for every surviving pane and the sidebar.

Why This Change Was Made

A single Gateway-client-keyed question lifecycle owner now fans authoritative responses out to every still-current projection. Recipient generation checks preserve account/socket isolation, while valid committed results survive disposal of only the submitting view; actual Gateway transport disconnection already rejects outstanding requests, so stale fabricated reconnect-success tests were replaced with the real dependency contract.

User Impact

Answer and cancel actions now clear all split chat panes, re-enable the remaining composer, and remove the sidebar waiting indicator even if the original submitting pane closes before the RPC response. Existing reconnection, expiration, privacy/account isolation, hydration, and automatic recovery behavior remain intact; there are no Gateway protocol, authentication, or public API changes.

Evidence

  • Exact reviewed commit: 133257985327eade58ba20a0ef07fc4f11990eeb; immutable comparison base: 3b6cad7e31e1c2ede4727ac9e27044d609e0c206; exact five-file binary patch SHA-256: 388e8f90e8dfb978b2ce166e5971ea23f558a5ae56b51e451124092be809e55e.
  • Genuine tests-first reproductions failed for both delayed answer and delayed cancellation after disposing the submitting owner; all 71 focused canonical owner and sibling tests subsequently passed.
  • Production delta: +133 lines, justified by the previously missing shared Gateway-client lifecycle owner and generation-fenced fanout; regression and real-browser tests are counted separately (+789 lines). The owner replaces independent per-pane resolution decisions rather than introducing a second transport or compatibility path.
  • Four wholly fresh independent reviewers audited real Gateway RPC/transport ordering, the browser fixture and surviving-pane identity, generation/privacy isolation, installed Vitest types, live sidebar ownership, and all touched code; no actionable findings remained.
  • The first high-reasoning Sol autoreview raised two suspected issues that were conclusively disproved: the actual installed strict native TypeScript compiler accepted the exact callback expression, and existing source plus its direct regression already scheduled list-only hydration. A second genuinely fresh full-branch gpt-5.6-sol high-reasoning P3/no-web autoreview independently returned clean, confidence 0.92; checksum-verified TruffleHog was clean.
  • Final exact-head Blacksmith Testbox tbx_01kz49nw7ptgchqgqw69p9sffs succeeded: 9/9 actual Chromium question-flow scenarios, including delayed answer/cancellation after disposing the submitting split pane; 71/71 focused lifecycle tests; and the complete exact-five-path changed gate, including strict native core/UI TypeScript, formatting, lint, duplicate/dependency guards, Control UI i18n, and dead-export checks. The authenticated remote patch remained 388e8f90e8dfb978b2ce166e5971ea23f558a5ae56b51e451124092be809e55e; the lease was stopped after its successful timing JSON.
  • ClawSweeper merge-drift resolution: the last independently inspected current-main snapshot changed none of the five reviewed files; the repository-native maintainer landing workflow will revalidate the exact reviewed head, current clean mergeability, and required green checks immediately before merge. Root repository policy treats moving-main drift as advisory rather than requiring repeated speculative rebases.
  • ClawSweeper exact-head gate resolution: the only failed refreshed UI E2E case was an unchanged, separately introduced config-safe-write.e2e.test.ts timeout; the identical fourth shard passed on the exact same main base in job 92178886463. Only the failed jobs were retried, and the repository-native landing workflow refuses to merge until the exact reviewed head is mergeable and every required check is green.
  • Protected maintainer decision: the repository owner explicitly authorized autonomous maintainer review and landing; four fresh independent reviewers, a clean high-reasoning Sol review, exact-head Chromium proof, and the native guarded maintainer workflow supply the required human-delegated decision.
  • ClawSweeper rank-up resolution: the native maintainer workflow revalidates the exact reviewed head, clean current mergeability, and all required hosted checks immediately before landing.
  • Stored-data classifier resolution: the flagged path is a browser E2E test fixture, not vector storage or an embedding schema; all five changed files are Control UI code or tests, with no persistent data-model, protocol, configuration, or migration change.
  • The earlier unrelated brace-expansion advisory has already been remediated on current main; this PR changes no dependencies and no failing security or CI gate will be bypassed.
  • A separately pre-existing server-issued question-ID reuse/tombstone edge case was recorded as a named follow-up; it is not introduced by this owner refactor.

@steipete
steipete marked this pull request as ready for review August 3, 2026 17:21
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XL maintainer Maintainer-authored PR labels Aug 3, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P1 High-priority user-facing bug, regression, or broken workflow. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 9:10 PM ET / August 5, 2026, 01:10 UTC.

ClawSweeper review

What this changes

The PR shares authoritative Gateway question answer and cancellation results across split chat panes and the sidebar, including when the submitting pane closes first.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

No blocking correctness or security finding: this remains a useful P1 Control UI repair. The protected maintainer label and incomplete check rollup require an exact-head maintainer landing review.

Priority: P1
Reviewed head: 133257985327eade58ba20a0ef07fc4f11990eeb
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch has strong focused behavior proof and no actionable finding; exact-head required checks remain the merge gate.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body supplies exact-head Testbox evidence for nine Chromium question-flow scenarios, including delayed answer and cancellation after disposing the submitting pane.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body supplies exact-head Testbox evidence for nine Chromium question-flow scenarios, including delayed answer and cancellation after disposing the submitting pane.
Evidence reviewed 5 items Current main remains pane-local: Current main disposes a pane by clearing only its local client state and resolves only that still-current state; it has no client-keyed shared outcome owner.
Shared owner is generation-fenced: The PR registers state projections by Gateway client identity and snapshots generations before delivering a committed result, preventing stale delivery after a reconnect or client swap.
Gateway response contract: The server returns the typed answer/cancellation result after resolving the question; the protocol schema permits exactly those two result shapes.
Findings None None.
Security None None.

How this fits together

Control UI panes and the sidebar each track Gateway questions to control composer availability and attention indicators. A Gateway answer or cancellation must clear every active projection of that same client connection.

flowchart LR
A[Gateway question event] --> B[Pane and sidebar state]
B --> C[Operator answer or cancel]
C --> D[Gateway resolve response]
D --> E[Shared client outcome owner]
E --> F[Active panes and sidebar]
Loading

Decision needed

Question Recommendation
Should this protected Control UI lifecycle repair be landed once the exact head has clean mergeability and required green checks? Land after exact-head verification: Confirm clean mergeability and required checks for the current head, then merge the focused lifecycle repair.

Why: The protected maintainer label requires explicit human handling even though source, dependency contracts, and supplied behavior proof support the repair.

Before merge

  • Resolve merge risk (P1) - The supplied GitHub rollup is incomplete and includes a failed UI E2E shard; required checks and clean mergeability must be revalidated on the exact head before landing.
  • Complete next step (P2) - The protected maintainer label and incomplete exact-head check rollup require maintainer landing review rather than an automated repair.
Agent review details

Security

None.

PR surface

Source +133, Tests +789. Total +922 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 2 209 76 +133
Tests 3 1096 307 +789
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 1305 383 +922

Review metrics

Metric Value Why it matters
Production versus test delta production +133 net (209 added, 76 removed); tests +789 net (1,096 added, 307 removed) The production growth is justified by one shared lifecycle owner that removes per-projection resolution decisions; the larger test delta exercises its ordering and isolation boundary.

Stored data model

Persistent data-model change detected: vector/embedding metadata: ui/src/e2e/question-flow.e2e.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the shared client-keyed lifecycle owner once the exact PR head is cleanly mergeable with required checks green, preserving the generation fence and pane/sidebar regression coverage.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the shared client-keyed lifecycle owner once the exact PR head is cleanly mergeable with required checks green, preserving the generation fence and pane/sidebar regression coverage.

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

Yes — with two projections on one Gateway client, delay a question resolve RPC, dispose the submitting pane, then deliver the result; current main has only pane-local completion while the PR's focused and browser coverage exercises this sequence.

Is this the best way to solve the issue?

Yes — client-keyed authoritative-result fanout is the narrow owner boundary shared by panes and sidebar, and its generation checks avoid crossing a reconnect or different Gateway client.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 618fba92bf01.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • remove rating: 🦞 diamond lobster: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P1: A committed question response can otherwise leave active Control UI panes disabled and sidebar attention stuck.
  • 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 (live_output): The PR body supplies exact-head Testbox evidence for nine Chromium question-flow scenarios, including delayed answer and cancellation after disposing the submitting pane.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies exact-head Testbox evidence for nine Chromium question-flow scenarios, including delayed answer and cancellation after disposing the submitting pane.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the original question UI, reconnect isolation in this path, and both commits in this PR. (role: feature owner and recent lifecycle contributor; confidence: high; commits: da44d52ac6c0, b12f631a4ab2, 755760321e5a; files: ui/src/app/question-prompt.ts, ui/src/e2e/question-flow.e2e.test.ts)
  • Shakker: Current main's question-prompt lifecycle implementation dates to the recent retained-connection ownership work. (role: recent area contributor; confidence: medium; commits: 770c1202ecf2; files: ui/src/app/question-prompt.ts)
  • vincentkoc: Authored the canonical record-guard refactor touching the question state module. (role: adjacent contributor; confidence: medium; commits: 25c375e47f56; files: ui/src/app/question-prompt.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Revalidate clean mergeability and required checks for the exact current head before landing.

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 (4 earlier review cycles)
  • reviewed 2026-08-03T17:26:41.823Z sha 1332579 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-03T17:34:00.866Z sha 1332579 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-04T22:20:04.427Z sha 1332579 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-05T01:03:57.428Z sha 1332579 :: needs maintainer review before merge. :: none

@steipete steipete closed this Aug 5, 2026
@steipete steipete reopened this Aug 5, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Aug 5, 2026
@steipete
steipete merged commit 8d29969 into main Aug 5, 2026
325 of 340 checks passed
@steipete
steipete deleted the codex/auto-qa-ui-question-lifecycle-owner-3b6 branch August 5, 2026 01:28
@steipete

steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 5, 2026
…time

* origin/main:
  fix(ui): clear split-pane questions after answers and cancellations (#118787)
  fix(slack): authorize reaction and message reads before applying limits (#118736)
  fix(ci): isolate cache warmer configs (#119381)
  fix(slack): Fix bad escaping in slack tool commentary (#119373)
  feat(audit): add execution identity inspection (#117034)
  fix(fs): adopt fs-safe 0.5.2 untrusted filename sanitization (#119363)
  fix(ci): preserve release evidence across reruns (#119380)
  fix(telegram): keep commands responsive during Codex login
  perf(memory): defer session backfill runtime (#119372)
  fix(ci): isolate built TUI PTY fixture (#119339)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 5, 2026
…penclaw#118787)

* fix(ui): reconcile question outcomes across gateway projections

* fix(ui): preserve question outcomes after pane disposal

---------

Co-authored-by: Peter Steinberger <[email protected]>
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 maintainer Maintainer-authored PR P1 High-priority user-facing bug, regression, or broken workflow. 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