Skip to content

refactor(ui): use a draft store for input dialog status - #180272

Merged
steipete merged 3 commits into
mainfrom
solid2/w-s2-input-presentation-action
Oct 22, 2026
Merged

steipete merged 3 commits into
mainfrom
solid2/w-s2-input-presentation-action

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The shared input dialog copied its submitting/error status object for each update. Use a Solid draft store for that local presentation state while preserving synchronous duplicate-submit admission and the existing plain async submission lifetime. Controls disable with the admitted submission; rejected writes keep the draft editable and restore input focus.

The pending-attempt test retains its single-flush assertion, and a new regression aborts a pending prompt, opens a successor, and rejects the old write. The successor must remain editable with no leaked error. No second mutation owner, request, cancellation path, or navigation transaction is introduced.

Evidence

Check Result
UI typecheck Passed with the repository typechecker
Input dialog 10 focused tests passed on pinned Bun, including immediate disable, duplicate-submit admission, failures/retry, and abort/successor isolation
Sessions rename The earlier exact retry regression passed on pinned Bun (1 selected, 33 skipped); current full CI exercises the integrated consumer.
Independent P0–P2 review Fresh review of the complete integrated two-file candidate against main 0671880a: scoped-clean, no actionable findings
Synthetic visual proof Editing and pending-save captures passed and were inspected at 1280×900. Captured on d563; the rendered component and regression test are byte-identical after the merge-only integration. Original base images retained.
Normalized same-machine builds / strict performance Exact main 0671880a vs current head: passed, zero violations. Startup 316,060 → 316,057 B gzip / 7 JS requests; CSS 40,894 B / 1 request unchanged; chat 1,435,747 → 1,435,742 B; new session 1,014,063 → 1,014,049 B. Raw sizes and request counts unchanged.
Production Knip Exact 0671880a base and current head both report the same 13 unused heartbeat paths outside UI. Complete output byte-identical, SHA-256 0ec893790beb14caa4f097a177380749978d9ebed28d7a75700fd3df1a7af3fd; no new unused paths.
Full CI Current head 591751cb9db7, full run 39728328622, passed with ci:full: all UI units, all 9 browser shards, both real-Gateway shards, type/lint/security and performance checks

Current main integration includes the settings-focus repair in #180218. The previous full CI reported that focus failure and the Markdown table expansion case. A targeted run on its exact main parent f25a10e9 reproduced the focus failure while the table case passed; no inherited exemption is claimed for the table case. The current full run passed both the settings-focus and table-expansion cases. The earlier immediate disabled-state failure is covered by the restored single-flush assertion. Node is used only for targeted Playwright proof; unit tests use the pinned Bun runtime. No cloud/Testbox lease.

Solid 2 checklist and size

The one production file uses createStore 0 → 1, copied status-object signals 1 → 0, total signal calls 2 → 1, and retains the scalar input draft signal. Actions and optimistic flags remain 0 → 0. Native handler-binding defects, component teardown, async read loaders, manual imports, JSX factories, context rethrow wrappers, sibling-loading gaps, and owner API escapes remain 0 → 0. The existing untrack snapshot remains 1 → 1 because a prompt retains the request/options it opened with.

Checklist item 4 retains one named survivor: this generic confirmation prompt publishes immediate disabled/error state around its existing owner-owned submission. A pending presentation action delayed that contract in the tested candidate. This does not create an exception for other component mutations.

Production LOC 133 → 140 (+7), from explicit draft writes replacing object snapshots. No dependency, public contract, route, tag, selector, or style changes.

Screenshots

Synthetic data only, 1280×900.

State Before After
Editing Before: editing synthetic rename After: editing synthetic rename
Pending save Before: pending synthetic rename After: pending synthetic rename

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T05:36:38.765418Z 591751c New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR replaces the input dialog’s copied status-object signal with a Solid draft store and adds abort/successor isolation coverage.

Example: Save the session name “Renamed original” while its write remains pending.

  • Before: A signal publishes a replacement status object to disable the input and buttons.
  • After: Draft-store fields publish the same disabled state before the first await.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A narrow, behavior-preserving conversion with inspected visual parity, meaningful lifecycle coverage, and the earlier timing finding resolved; full CI acceptance remains pending.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected production-build Control UI screenshots show matching editing and pending-save states at 1280×900; captured component bytes match the reviewed head, while focused tests support duplicate admission, retry, focus, and abort/successor isolation.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: No existing user-visible defect is claimed; the dialog’s pending, retry, and cancellation behavior must remain stable during the Solid cleanup.
Reason: The maintainer-authored direction matches the repository’s local draft-store guidance, with a narrow conversion and distinct abort/successor coverage.

Merge readiness

✅ Ready for maintainer review

This PR preserves the dialog’s behavior while adopting draft-store updates; the earlier pending-state finding is resolved, and no actionable code defects remain.

Priority: P3
Reviewed head: 591751cb9db745456d78cbef4f6862a2f51adc51

Before merge

None.

Findings

None.

Agent review details

How this fits together

The shared Control UI input dialog accepts caller-owned submission callbacks and presents validation, pending state, errors, and cancellation through the existing modal host.

flowchart LR
  A[Session or group action] --> B[showInputDialog]
  B --> C[Promise modal host]
  C --> D[Input dialog view]
  D --> E[Caller submission]
  E --> F[Draft store presentation]
  F --> D
Loading

Technical review

Best possible solution:

Keep the local draft store with the existing synchronous admission flag, modal settlement owner, and caller-owned submission lifetime.

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

This is a behavior-preserving refactor; source comparison confirms the previous deferred-busy trigger has been removed, and no target code was executed during review.

Is this the best way to solve the issue?

The patch follows the repository’s structured-local-state guidance and keeps admission, mutation, and modal settlement with their existing owners.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Busy/error presentation and synchronous submission admission keeps the original intent (8ebabfb: Publish visible status directly while retaining the plain synchronous admission flag and existing interaction behavior.)
  • Prompt lifetime snapshots and submission callback keeps the original intent (9b9f081: Keep the prompt’s initial request/options snapshot while removing redundant callback tracking wrappers.)
  • Failure and retry test assertions keeps the original intent (3c5b58e: Consolidate low-value tests while retaining behavior and regression coverage; the revised wait still asserts visible failure, retained input, restored focus, and successful retry.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 20d928e adds ui/src/components/input-dialog.test.ts:112 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 20d928e3c3b0; files: ui/src/components/input-dialog.test.ts)

PR surface

Source +7, Tests +31. Total +38 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 20 13 +7
Tests 1 34 3 +31
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 54 16 +38

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This is a focused internal presentation refactor with no intended user-visible behavior change.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-22T04:26:03.133Z sha 9641edf :: needs changes before merge. :: [P2] Update consumer waits for the deferred presentation action

Reviewed October 22, 2026, 1:41 AM ET / 05:41 UTC (Revision 2).

@steipete steipete changed the title refactor(ui): present input submissions with Solid actions refactor(ui): use a draft store for input dialog status Oct 22, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

The synchronous pending-state finding is fixed on current head 591751cb9db7. The dialog now uses a draft store for presentation while retaining the original plain async submission and synchronous admission guard. The store is written before the first await, so the original single-flush disabled assertion remains intact; no consumer waits were weakened. The UI typecheck and all 10 input-dialog tests pass on the integrated head, and a fresh independent P0–P2 review is clean.

The earlier cross-agent and HTML-publication failures did not recur in the following full run on d5633745b11b; its only failures were plugin settings focus and table expansion. A targeted run on that CI merge's exact main parent reproduced the focus failure and passed the table case. This integration includes the verified settings-focus fix from #180218 and the table diagnostics from #180013. No inherited exemption is claimed for the table case; current full run 39728328622 will validate it.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added 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. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 22, 2026
@steipete
steipete merged commit 5684da2 into main Oct 22, 2026
111 of 113 checks passed
@steipete
steipete deleted the solid2/w-s2-input-presentation-action branch October 22, 2026 05:52
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 23, 2026
)

* refactor(ui): present input submissions with Solid actions

* refactor(ui): store input dialog presentation state
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 ci:full Keep ordinary native-locale CI selection on the next PR run. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S 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