Skip to content

feat(ui): make optional-question dismissal reversible - #154692

Merged
roboclaw-bot merged 5 commits into
mainfrom
feat/question-dismissal-undo-20260921
Sep 21, 2026
Merged

roboclaw-bot merged 5 commits into
mainfrom
feat/question-dismissal-undo-20260921

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Prerequisite #154473 is merged. This PR now targets main; the focused dismissal change and original contributor ancestry are preserved. Saved-answer recovery #154312, originally contributed by @jb510, is also merged.

Related: #154395

What Problem This Solves

Optional questions currently return after a refresh when skipped, and offer no immediate way to undo that choice.

User Impact

Users can dismiss an optional question, undo the dismissal, or answer it later from the conversation. Their unfinished answer is preserved. Dismissal does not send an answer, approve anything, resolve a blocking request, or stop work. Blocking questions retain Skip.

This is browser-local presentation state with the prerequisite's authenticated identity, expiry, capacity, and Incognito/deletion rules. No migration or user action is required.

Why This Change Was Made

Dismissal reuses the existing composer draft owner. Undo and Answer consult current conversation state and wait for the existing durable writer before revealing a restored answer. Late storage completion cannot reopen a canonically answered question or a replacement owner, and a newer completion boundary is saved before restoration completes. A failed save still permits answering with the existing unsaved notice.

The summary/answer-codec extraction is behavior-preserving; the canonical matcher, the prerequisite's newer Submit/reload regression, and its serialization and SAFETY-comment repairs remain intact. No separate storage or delivery manager is added.

Evidence

Final main-targeted candidate

Head 4d00bc0b6660fec854140f7e3db6dc3dd5be83c5 includes the landed draft prerequisite and repairs the CI failure by awaiting the asynchronous reopen action in the existing restart-recovery test. No assertion was weakened and no product behavior changed in that repair.

  • 65 focused tests passed on this head (4.72 seconds for the test wrapper); targeted type-aware lint, formatting, and whitespace checks passed.
  • Independent P0–P2 review of the focused dismissal change and test repair found no actionable findings. The main integration replays that reviewed delta using the prerequisite as the explicit merge base, without replacing contributor ancestry.
  • A targeted bundled-browser Dismiss/Undo/Answer regression passed before the mechanical main integration (one scenario; 18.78 seconds including the UI build).
  • Fresh actual Control UI capture on this exact head proves Dismiss → reload stays dismissed, then Answer → reload stays restored. Zero chat.send, question.resolve, chat.abort, or persisted answer messages at every stage; zero browser errors. Maintained mock Gateway with real browser IndexedDB, synthetic content, dark 1440×1000. This is not live Gateway/provider proof.
  • Before baseline 0ce174f0b1a4eea126c8398d1eb4c999a34a49f1 reproduces Skip → reload → unwanted question.
  • Fresh exact-head ClawSweeper review found no actionable introduced defects and confirms the prior stack blocker is resolved.
  • Exact-head CI attempt 2 completed successfully: 106 jobs successful, 14 skipped; the required CI gate passed. Exactly one diagnostic failed-job replay ran on unchanged head 4d00bc0b6660fec854140f7e3db6dc3dd5be83c5, after the original run finished. Attempt 1 failed in a mobile question-collapse click timeout, a board action in unchanged code waiting for its second board.update, and a SQLite checkpoint-recovery assertion. The original logs/diagnostics are retained; assertions and deadlines are unchanged. Local diagnostic replays passed: browser shard 2/12, 244 tests / 51 files in 284.74s (Node 26.8.2); browser shard 10/12, 238 tests / 53 files in 240.30s (CI-matching Node 24.19.0); config shard, 1,329 tests / 86 files in 170.96s (Node 24.19.0, two workers). All three formerly failing hosted jobs passed on the diagnostic replay. The original failures remain unreproduced, not fixed; no additional source change, assertion relaxation, or deadline increase was made.

Original stacked-candidate evidence

  • Exact candidate 0be34e08b4d4e2f39ef93ffe8b74ce9d171e3338 on draft parent 7a25c100af2bda0fc5d092bb6d204702205837d3: 109 focused tests passed (7.73 seconds whole command), 34 browser scenarios passed (46.71 seconds), and the complete 12-file changed-file gate passed in 401.57 seconds with unchanged SHA and clean status. This includes core/UI types, formatting, i18n, dead exports, lint, styles and guards. Final main-targeted validation is recorded above.

  • Two delayed-write/remount regressions fail before the restoration fix and pass after it. The held-writer barrier establishes the real uncommitted transaction before mounting the second reader; no reload assertion was weakened.

  • Final standalone source after summary extraction passed 64 focused tests across two files in 3.20s, UI types, and type-aware lint with zero warnings/errors (26.9s). Its targeted dismissal browser scenario passed in 10.10s. Those timings are whole commands, not per-file allocations.

  • Before the pure extraction, the complete corrected standalone candidate passed 108 focused tests across five files in 4.66s and 15 async-question browser scenarios in 27.44s. These are supporting input results, not hosted CI on a future publication head.

  • The browser flow reloads immediately after visible Undo and Answer restoration, retains the original answer, and observes zero chat.send, question.resolve, and chat.abort requests. Transport is the maintained mocked Gateway; persistence is real browser IndexedDB.

  • The final 12-file composition is based on draft candidate 7a25c100af2bda0fc5d092bb6d204702205837d3, which replays onto current main. It preserves the compact title, multiline answer controls, canonical matching, and saved Submit/reload case. Shared types use the prerequisite's leaf contract, with no type-only summary cycle. The new draft Skip regression is strengthened to assert that dismissal stays out of pending questions after reload and later completion while retaining its answer. Final composed-candidate changed-file checks pass as recorded above. Final main-targeted validation is recorded above.

Test-cost scope

Measured at exact 0be34e08b4d with pnpm test <file> --maxWorkers=1 (whole-command wall time): draft/persistence regression file 3.207s; plugin-question view 2.950s; composer 3.874s. All passed. The complete 34-scenario browser command covers both async and blocking-question files in 46.71s; that total is not allocated to individual files.

Before / after

Before — Skip hides the question, but reload brings it back.

Before: the skipped question returns after reload

After — dismissal survives reload, with Answer available to restore it.

After: the question stays dismissed after reload

Video proof

Before (9.16 seconds):

skip-before.mp4

After (15.04 seconds):

skip-after.mp4

Contributor credit

Original implementation by @vincentkoc. Landing test repair and verification with @VACInc.

Work sessions

@clawsweeper

clawsweeper Bot commented Sep 21, 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 app: web-ui App: web-ui size: L maintainer Maintainer-authored PR labels Sep 21, 2026
@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 21, 2026, 10:15 AM ET / 14:15 UTC (Revision 3).

ClawSweeper review

What this changes

The Control UI remembers optional-question dismissals and adds Undo and Answer actions that preserve unfinished answers.

Merge readiness

✅ Ready for maintainer review

Keep open: the merged prerequisites do not cover this remaining capability. The introduced changes have no actionable correctness or security findings, and the supplied browser evidence supports the intended behavior.

Priority: P2
Reviewed head: 4d00bc0b6660fec854140f7e3db6dc3dd5be83c5

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with relevant browser evidence, compatibility coverage, and no actionable introduced findings.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots and the captured exact-head browser results support the changed question presentation and real IndexedDB persistence through dismissal and restoration reloads; the Gateway was mocked, with no live-provider claim.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before/after screenshots and the captured exact-head browser results support the changed question presentation and real IndexedDB persistence through dismissal and restoration reloads; the Gateway was mocked, with no live-provider claim.
Evidence reviewed 8 items Pinned introduction and review continuity: Reviewed the introduced delta from the merged prerequisite to head 4d00bc0. The earlier reviewed dismissal implementation is unchanged; the restart-recovery test now awaits reopening without weakening assertions. The supplied stale test merge was not used to infer removals from main.
Current main still lacks reversible dismissal: Fetched main retains the prerequisite behavior: skipped questions leave the pending list, reopening requires an archival boundary, and skipped drafts are omitted from persistence. The central production files have no changes between the pinned prerequisite and fetched main.
Latest-release comparison: The v2026.9.5 source marks Skip in local draft state and has no dismissal or reopening operation. This release does not supersede the proposed capability.
Findings None None.
Security None None.

How this fits together

The Control UI turns optional questions in conversation history into answer cards. Its existing browser-local draft store now remembers dismissal, while canonical conversation history remains authoritative about submitted answers.

flowchart TD
  A[Conversation history] --> B[Question presentation]
  C[Dismiss or restore action] --> B
  B --> D[Existing browser draft store]
  D --> B
  B --> E[Pending answer card]
  B --> F[Dismissed transcript summary]
  F --> C
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +109, Tests +349. Total +458 across 13 files.

View PR surface stats
Area Files Added Removed Net
Source 8 255 146 +109
Tests 5 360 11 +349
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 13 615 157 +458

Review metrics

Metric Value Why it matters
Persistent representation 1 optional dismissal field; no database-version change Existing records remain readable without migration, and the PR explains the browser-local persistence contract.
Production versus test growth Production net +109 lines; tests net +349 lines Production growth implements restoration sequencing and visible recovery using existing owners; tests cover persistence and concurrent state changes.

Root-cause cluster

Relationship: partial_overlap
Canonical: #154395
Summary: This PR addresses the dismissal portion of the broader optional-question improvement request; merged prerequisites address separate recovery behavior.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep dismissal and restoration in the existing question presentation and draft store, preserving canonical answers and recoverable unfinished input.

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

Not applicable as a feature acceptance question; current-main source establishes the missing dismissal persistence and Undo path, and the supplied baseline capture shows the returned card.

Is this the best way to solve the issue?

Yes. Extending the existing browser draft owner is a narrow solution, with backward-readable records and restoration checks that preserve authoritative conversation history.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded improvement to optional-question interaction during ongoing chat, without an established core-runtime or onboarding blocker.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 screenshots and the captured exact-head browser results support the changed question presentation and real IndexedDB persistence through dismissal and restoration reloads; the Gateway was mocked, with no live-provider claim.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after screenshots and the captured exact-head browser results support the changed question presentation and real IndexedDB persistence through dismissal and restoration reloads; the Gateway was mocked, with no live-provider claim.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after screenshots and the captured exact-head browser results support the changed question presentation and real IndexedDB persistence through dismissal and restoration reloads; the Gateway was mocked, with no live-provider claim.

Evidence

What I checked:

  • Pinned introduction and review continuity: Reviewed the introduced delta from the merged prerequisite to head 4d00bc0. The earlier reviewed dismissal implementation is unchanged; the restart-recovery test now awaits reopening without weakening assertions. The supplied stale test merge was not used to infer removals from main. (ui/src/pages/chat/components/chat-async-question.ts:352, 4d00bc0b6660)
  • Current main still lacks reversible dismissal: Fetched main retains the prerequisite behavior: skipped questions leave the pending list, reopening requires an archival boundary, and skipped drafts are omitted from persistence. The central production files have no changes between the pinned prerequisite and fetched main. (ui/src/pages/chat/components/chat-async-question.ts:308, 900f00302f51)
  • Latest-release comparison: The v2026.9.5 source marks Skip in local draft state and has no dismissal or reopening operation. This release does not supersede the proposed capability. (ui/src/pages/chat/components/chat-async-question.ts:165, ec9c1a13db89)
  • Compatible persistence extension: The stored dismissal flag is optional and validated; records without it retain their existing interpretation. Restoration uses the existing serialized writer, checks the current presentation after awaiting storage, and preserves canonical-answer precedence. Existing owner scoping, expiry, capacity, and deletion mechanisms remain in place. (ui/src/lib/chat/composer-draft-store.runtime.ts:122, 4d00bc0b6660)
  • Inspected browser evidence: Inspected both downloaded PR screenshots: the baseline shows the returned question card; the candidate shows Dismissed with an Answer button and no pending card. The captured PR body, sourceRevision 80774aa79ebf653548f1f93b998214b2ec3f0f708538638920e013670426900e, records exact-head Dismiss/reload and Answer/reload success using the actual Control UI and real IndexedDB with a maintained mock Gateway, observing zero sends, resolves, aborts, or persisted answers. Video preparation failed because ffprobe was unavailable (spawnSync ffprobe ENOENT); video playback was not independently inspected. (4d00bc0b6660)
  • Focused behavioral coverage: Read regressions covering old-format draft recovery, dismissal persistence, delayed Undo/Answer writes, canonical answers arriving during restoration, replacement owners, advancing completion boundaries, and storage failure. The browser regression exercises rendered actions and immediate reloads. No tests were executed during this read-only review. (ui/src/pages/chat/components/chat-async-question-draft.test.ts:483, 4d00bc0b6660)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • jb510: 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 (2 earlier review cycles)
  • reviewed 2026-09-21T09:56:03.382Z sha 0be34e0 :: needs changes before merge. :: none
  • reviewed 2026-09-21T13:53:52.029Z sha 4d00bc0 :: needs maintainer review before merge. :: none

Base automatically changed from feat/question-draft-recovery-20260921 to main September 21, 2026 13:41
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

The draft-persistence prerequisite #154473 is merged, and this PR now targets main at 4d00bc0b6660fec854140f7e3db6dc3dd5be83c5. The reported lint failure is repaired by awaiting the existing test's asynchronous reopen action; no assertion was weakened. Original contributor ancestry is preserved.

The current-head before/after screenshots and videos are embedded in the updated body. Dismiss and Answer both survive reload, with zero sends/resolves/aborts; 65 focused tests and targeted lint/format checks pass. Fresh exact-head CI is running.

@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@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 21, 2026
@roboclaw-bot
roboclaw-bot enabled auto-merge (squash) September 21, 2026 14:39
@roboclaw-bot
roboclaw-bot merged commit ac1dbb4 into main Sep 21, 2026
313 of 317 checks passed
@roboclaw-bot
roboclaw-bot deleted the feat/question-dismissal-undo-20260921 branch September 21, 2026 14:46
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Merged via squash auto-merge.

@VACInc

VACInc commented Sep 21, 2026

Copy link
Copy Markdown
Member

Umbrella coordination for #154395: this already-merged PR provides browser-local optional-question dismissal with Undo and Answer, scoped to the same browser and authenticated Gateway identity, with seven-day expiry, shared 20-record capacity, and Incognito/deletion privacy. Dismiss sends no answer, grants no approval, resolves no blocking question, and stops no work. Saved-answer reconstruction is #154312, unfinished-draft recovery is #154473, and outbox delivery/retry remains open in #154486. No state change is needed here.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 22, 2026
Keep dismissed optional questions dismissed across reloads while retaining their unfinished answers. Offer Undo and Answer restoration through the existing authenticated draft store without sending an answer or stopping work.

Await the asynchronous reopen action in the restart-recovery regression test. Preserve canonical-answer, owner-change, and deletion safeguards.

Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: VACInc <[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 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.

3 participants