Skip to content

fix(ui): wait for restored draft before clearing - #133575

Merged
vincentkoc merged 1 commit into
mainfrom
fix-ui-retained-draft-settlement
Aug 30, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix-ui-retained-draft-settlement

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 30, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Resolves a release-validation failure where the Control UI session-management E2E could leave a restored draft badge visible after clearing the composer on a slow CI runner.

Why This Change Was Made

The test now waits for the retained composer value to finish restoring, then waits for the cleared form state and draft-badge removal before navigating. The focused scenario lives in its own draft-indicator E2E file so the existing sidebar suite remains below the enforced line cap. This is a test-only synchronization repair; production behavior is unchanged.

User Impact

No product behavior changes. Main and Full Release Validation can reliably verify the existing restored-draft clearing behavior.

Evidence

@clawsweeper

clawsweeper Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@vincentkoc vincentkoc self-assigned this Aug 30, 2026
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Aug 30, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Aug 30, 2026
@clawsweeper

clawsweeper Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 6:44 PM ET / 22:44 UTC.

ClawSweeper review

What this changes

The PR moves the Control UI draft-indicator scenario into a dedicated E2E file and waits for restored and cleared composer values before asserting draft-badge removal.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

This is a clean, test-only repair for a reported Control UI E2E race. It remains open because it is maintainer-authored and carries the protected maintainer label; no introduced correctness or security defect was found.

Priority: P3
Reviewed head: 15553b6e12c85bd892b3ad095bd9e2ad43b5c98f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow, coherent test-only repair with reported focused validation and no supported correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored PR changes only E2E test synchronization; the supplied focused and exact-head CI results are supplemental validation, and the external-contributor real-behavior gate does not apply.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored PR changes only E2E test synchronization; the supplied focused and exact-head CI results are supplemental validation, and the external-contributor real-behavior gate does not apply.
Evidence reviewed 6 items Introduced test change: The verified introduced delta only adds the dedicated E2E scenario and removes its prior copy from the sidebar suite; it changes no production source.
Targeted settlement assertion: The test waits for both the restored text and later empty text before asserting the draft badge disappears, using the existing render-boundary helper.
Production owner supports the test boundary: Durable draft restoration adopts the complete restored draft before requesting a UI update, making the returned-composer settlement the relevant boundary for this flaky assertion.
Findings None None.
Security None None.

How this fits together

The Control UI restores a browser-local composer draft when a session becomes active and exposes draft presence in the sidebar. This E2E test verifies that clearing a restored draft removes that sidebar indicator across session navigation.

flowchart LR
  A[Saved browser draft] --> B[Session route opens]
  B --> C[Chat composer restores text]
  C --> D[Composer state settles]
  D --> E[Sidebar draft indicator]
  E --> F[Navigation assertion]
Loading

Before merge

  • Resolve merge risk (P1) - The supplied review snapshot omits two PR comments; read the latest ClawSweeper comment and any Rank-up moves before merging. This is a reviewer-context gap, not a contributor-proof deficiency.
Agent review details

Security

None.

PR surface

Tests +18. Total +18 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 97 79 +18
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 97 79 +18

Review metrics

Metric Value Why it matters
Production versus test delta production +0/-0; tests +97/-79 (net +18) The PR relocates and strengthens E2E synchronization coverage without growing runtime code.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the dedicated browser-level regression scenario and its render-settlement checks so restored-draft clearing remains reliably covered without changing product behavior.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the dedicated browser-level regression scenario and its render-settlement checks so restored-draft clearing remains reliably covered without changing product behavior.

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

Yes, from source and the supplied CI failure: the former scenario cleared the composer before restored state had settled, while the revised scenario waits at that boundary. This read-only review did not rerun the test.

Is this the best way to solve the issue?

Yes. Reusing the existing two-poll render-settlement helper addresses the asynchronous test race at the browser-visible boundary without coupling the test to storage internals or changing production code.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is a focused test-reliability repair with no product behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored PR changes only E2E test synchronization; the supplied focused and exact-head CI results are supplemental validation, and the external-contributor real-behavior gate does not apply.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: 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-08-30T21:56:31.894Z sha 1419da0 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-30T22:10:22.448Z sha 1419da0 :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc marked this pull request as ready for review August 30, 2026 22:05
@vincentkoc
vincentkoc force-pushed the fix-ui-retained-draft-settlement branch from 1419da0 to 15553b6 Compare August 30, 2026 22:31
@vincentkoc

Copy link
Copy Markdown
Member Author

ClawSweeper before-merge item addressed:

  • Read the latest durable ClawSweeper review and current PR comments.
  • No actionable correctness or security findings remain.
  • Exact-head CI for 15553b6e12c85bd892b3ad095bd9e2ad43b5c98f is green.
  • The reported review-context gap is therefore resolved; no code change or re-review is needed.

@vincentkoc
vincentkoc merged commit 6af76da into main Aug 30, 2026
106 checks passed
@vincentkoc
vincentkoc deleted the fix-ui-retained-draft-settlement branch August 30, 2026 22:55
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit to shojikumaru/openclaw that referenced this pull request Aug 30, 2026
…cked-delivery

* origin/main:
  fix(ui): wait for restored draft before clearing (openclaw#133575)
  fix(deps): update fast-uri security patches (openclaw#133572)
  test: reduce workflow sanity fixture cleanup time (openclaw#133588)
  fix(media): normalize detected Matroska MIME (openclaw#133383)
  refactor(docker): retire ClawDock shell helpers (openclaw#133594)
  perf(browser): reuse snapshot refs and screenshot metadata (openclaw#133598)
  perf: load web chat history in larger, faster batches (openclaw#133565)
  fix(plugins): keep bundled plugins bundled when selected by plugins.load.paths (openclaw#133584)
  test: isolate shared /tmp session-store paths in runner and health suites (openclaw#133568)
  fix(cron): avoid no-op schedule repair writes (openclaw#133552)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 31, 2026
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary 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