Skip to content

fix(ui): preserve dialog feedback through save retries - #180729

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

steipete merged 3 commits into
mainfrom
solid2/w-s2-input-submit-state

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Input and goal-edit dialogs copied asynchronous failures into local presentation state. The goal editor also left a failed dialog preparation invisible and unhandled. A second click during pending preparation must not replace the first admitted operation's failure receipt.

User Impact

Failed saves retain the draft, focused input and validation feedback. A failed goal-editor preparation now shows an alert beside the retained controls and permits a fresh attempt. Existing native dismissal, duplicate-submit admission and scope retirement remain intact.

Why This Change Was Made

Use co-written optimistic saving flags and narrow Errored slots derived from admitted completion promises. Expected validation strings remain ordinary results; rejected promises reach the boundary. The native input remains outside the error slot, with aria-invalid derived from the same receipt. Record goal preparation inside its existing admission guard so duplicate clicks cannot hide its result.

The shared recipe consolidates this audit's recurring patterns: validation receipts, initial-only loadingValue, retained status reads with latest, repeated boolean outcomes, native attribute boundaries, preparation failures, and native-root lazy error handling. It also documents the observed foreign-root and independent-option settlement exceptions. Domain owners, host tags, classes and lazy boundaries are unchanged; no dependency was added.

Evidence

Proof Result
pnpm tsgo:ui; targeted lint, format and diff check Passed on final runtime changes
Input dialog tests 11 passed
Goal dialog tests Four existing cases and rejected-save/retry case passed; new preparation failure/retry regression failed on base and passed on final implementation (1 passed, 5 filtered)
Native browser pending-input test Passed (1 passed, 4 skipped); waits for visible disabled/validation state while preserving native cancellation, draft and focus assertions
Sessions rename consumer Passed (1 passed, 33 filtered); waits for visible disabled state
Independent review Clean P0–P2 review of original changes, coupled test repairs and final preparation repair; consolidated documentation reviewed before final push
pnpm ui:build; strict performance check Passed; zero warnings or violations, compared on the same machine with exact base c5650f3a5e59d6523c913a8ebfff2b787cf58435
Startup JS gzip / CSS requests 317,324 B / 1 → 317,317 B / 1
Chat / New boot JS gzip 1,441,430 / 1,017,575 B → 1,441,422 / 1,017,555 B; all raw JS totals unchanged
Production Knip Same two unused files on exact base and head: src/infra/heartbeat-active-hours.ts, src/infra/heartbeat-wake-policy.ts; no UI finding
Synthetic browser captures Inspected before/after failure states and successful retry; field identity, focus, invalid state and pending disable verified

Production LOC: 408 → 494 (+86), needed for retained-field validation and error receipt boundaries. All changed tests: 1,514 → 1,634 (+120). Recipe: 498 → 575 (+77), including consolidated audit patterns shared by the other focused fixes.

Recipe pattern in these two production modules Before After
Conforming optimistic saving flags 1 2
Manual presentation saving flags 1 0
Copied async error fields 2 0
Narrow Errored boundaries 0 3
Actions / optimistic writes 1 / 1 2 / 2
Async receipt/validity derivations 0 5
affects, refresh, Loading on, outside-hold deviations 0 0

Two plain synchronous admission latches remain authoritative; they are not presentation saving flags. The existing untrack keeps prompt options fixed for the prompt lifetime. No new effects, listeners, queries, flushes, cleanup hooks or owner APIs were added. These counts cover this focused family; the coordinator owns the whole-scope audit table.

Full UI CI is requested with ci:full. Run 39805746766 identified the immediate sessions disabled assertion; run 39809900182 identified the native pending-input timing assertion. Both named consumer tests were repaired and passed locally. The latter run passed all nine UI E2E shards and both real-Gateway shards. Final-head ci:full run 39817758807 completed successfully for bc445da1c8f14d1df306c513e6890e2356f70b9a, including all selected unit/lint/type checks, all nine UI E2E shards and both real-Gateway shards.

Inspected synthetic screenshots

Dialog Before After
Input validation Input validation before Input validation after
Goal rejection Goal rejection before Goal rejection after
Goal preparation Goal editor preparation before Goal editor preparation after

@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-22T16:57:51.838401Z bc445da 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. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro 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 changes before merge.

What this changes

This PR derives input and goal-dialog feedback from completion promises while retaining native fields and synchronous submission admission.

Example: Creating “Project alpha” returns “A group with this name already exists.”

  • Before: The dialog stores the validation message in local presentation state.
  • After: The dialog derives the same visible message and invalid-field state from the completion receipt, then clears feedback during retry.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful owner-directed refactor with inspected visual parity and focused harness coverage, but two affected consumer tests fail on the reviewed head.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored presentation refactor is outside the ordinary contributor proof gate; inspected synthetic screenshots show preserved failure layouts, and the body reports browser retry and field-retention checks, without a shipped-entry-point trace.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Failed saves must leave dialog drafts editable, show validation feedback, and support retry without replacing the native field.
Reason: The maintainer-authored direction adopts the repository's Solid feedback pattern while retaining the existing user contract; no additional product approval is needed.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this maintainer-directed refactor has one focused repair remaining—two existing consumers fail because their assertions precede the new saving publication.

Priority: P3
Reviewed head: ae2924b07b0e20f62a3ec04dd04286cd89507c72

Before merge

  • Update both consumers to wait for the new saving publication (P2) - The new await defers presentSubmission and setSaving until after the submit handler yields. The focused input-dialog test was updated accordingly, but the native browser test still clicks Save, flushes synchronously, and expects input.disabled at ui/src/components/confirm-dialog.browser.test.ts:134; the Sessions rename test waits only for patch invocation before the same assertion at ui/src/pages/sessions/sessions-page.test.ts:141. Exact-head CI fails both assertions with expected true, received false. Update these consumers to wait for committed disabled state using waitForSolid, and make the browser test's later rejection/focus checks state-based as well, preserving cancellation, draft, and retry assertions.

Findings

  • [P2] Update both consumers to wait for the new saving publication — ui/src/components/input-dialog-view.tsx:93-95

Tests

  • Missing end-to-end proof: The supplied synthetic stills do not establish save/retry or pending-rename navigation through the shipped Control UI.
Agent review details

How this fits together

Control UI callers supply drafts and submission callbacks to modal dialogs; existing owners admit writes and settle the modal, while Solid presents saving, validation, errors, and focus.

flowchart TD
A[Session and Goal callers] --> B[Native modal host]
B --> C[Synchronous submission admission]
C --> D[Existing write owner]
D --> E[Completion receipt]
E --> F[Solid saving and feedback]
F --> B
Loading

Technical review

Best possible solution:

Preserve receipt-based feedback and update both affected consumer tests to observe committed saving and recovery state.

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

No new current-main product defect is established; exact-head CI independently records two consumer-test failures caused by the changed saving-publication timing.

Is this the best way to solve the issue?

The completion-receipt approach uses existing owners and preserves separate validation results and rejected errors, but its timing change must be carried through the existing consumers.

Full review comments:

  • [P2] Update both consumers to wait for the new saving publication — ui/src/components/input-dialog-view.tsx:93-95
    The new await defers presentSubmission and setSaving until after the submit handler yields. The focused input-dialog test was updated accordingly, but the native browser test still clicks Save, flushes synchronously, and expects input.disabled at ui/src/components/confirm-dialog.browser.test.ts:134; the Sessions rename test waits only for patch invocation before the same assertion at ui/src/pages/sessions/sessions-page.test.ts:141. Exact-head CI fails both assertions with expected true, received false. Update these consumers to wait for committed disabled state using waitForSolid, and make the browser test's later rejection/focus checks state-based as well, preserving cancellation, draft, and retry assertions.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm --dir ui test src/components/input-dialog.test.ts src/components/confirm-dialog.browser.test.ts src/pages/sessions/sessions-page.test.ts src/pages/chat/components/chat-details-goal.test.tsx --maxWorkers=1
  • pnpm tsgo:ui
  • git diff --check

What I checked:

PR surface

Source +55, Tests +83, Docs +64. Total +202 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 123 68 +55
Tests 2 85 2 +83
Docs 1 73 9 +64
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 281 79 +202

Review metrics

Metric Value Why it matters
Production versus test growth Production +55 lines; tests +83 lines The growth adds receipt-derived validation and retained-field error boundaries plus distinct returned-validation and rejected-save retry coverage; it introduces no new module or domain owner.

Labels

Label changes:

  • add P3: This is a presentation-maintenance refactor with a focused consumer-test repair, without an established urgent product regression.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is a presentation-maintenance refactor with a focused consumer-test repair, without an established urgent product regression.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • 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.

Reviewed October 22, 2026, 11:50 AM ET / 15:50 UTC.

@steipete
steipete enabled auto-merge (squash) October 22, 2026 16:06
@steipete
steipete disabled auto-merge October 22, 2026 16:17

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bc445da1c8

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +253 to +255
<Show
when={props.presented && editAttempt()?.identity === goalIdentity() && editAttempt()}
keyed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clear stale edit failures when the goal scope changes

When dialog preparation fails, editAttempt permanently retains the rejected promise and this condition merely hides it while another identity is active. If the retained component moves from session/goal A to B and later returns to A, the old alert reappears despite no edit attempt occurring in the current visit. Clear the attempt when goalIdentity() changes or associate it with a per-presentation generation rather than a reusable identity.

AGENTS.md reference: ui/AGENTS.md:L16-L19

Useful? React with 👍 / 👎.

@steipete
steipete merged commit e68052a into main Oct 22, 2026
105 of 107 checks passed
@steipete
steipete deleted the solid2/w-s2-input-submit-state branch October 22, 2026 17:27
@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
* fix(ui): preserve dialog feedback through save retries

* test(ui): await rename submission presentation

* fix(ui): surface goal dialog preparation failures
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. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant