Skip to content

fix(ui): generic mock chat sends show a visible outcome - #125347

Merged
steipete merged 2 commits into
mainfrom
steipete/elastic-mclaren-7a002a
Aug 17, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/elastic-mclaren-7a002a

Conversation

@steipete

@steipete steipete commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where developers validating the generic Control UI mock could not exercise an ordinary send outcome: every available demo session appeared active, and chat.send cleared the composer without any visible acknowledgement.

Why This Change Was Made

Scope the existing plan/in-flight fixture to its owning main demo session, leaving another generic session idle. The stateful mock now acknowledges chat.send and emits the standard deterministic final chat event. Persistent composer draft storage is explicitly unchanged.

User Impact

Developers and source-blind behavior validators can now select an idle demo session, send a message, and observe both the submitted user message and a deterministic final reply instead of a silent composer clear. This changes only the developer mock harness, not production chat behavior.

Evidence

  • Before the fix, the focused E2E file failed 2 of 6 tests: the chosen generic session never exposed an idle send state, and no reply appeared after submission.
  • After the fix, focused E2E passes 6/6 and changed-file gates pass.
  • Hosted shard validation exposed two timing races: the PR now waits for selected-session composer readiness and settled lightbox animations; the exact shard passes 20/20 files and 62/62 tests.
  • Initial idle state:
    Generic mock idle session
  • After send:
    Generic mock visible reply
  • Recorded flow (bare URL on its own line):
    https://github.com/user-attachments/assets/06a080e0-d91d-4b65-b0d4-6b7e086b3610
  • Commands:
    node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/board-fixture.e2e.test.ts
    node scripts/check-changed.mjs -- scripts/control-ui-mock-dev.ts ui/src/e2e/board-fixture.e2e.test.ts
    git diff --check
  • AI-assisted; the author inspected the implementation and proof. Fresh autoreview found no accepted/actionable findings.

@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui scripts Repository scripts labels Aug 17, 2026
@steipete
steipete marked this pull request as ready for review August 17, 2026 16:45
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 17, 2026
@steipete steipete self-assigned this Aug 17, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 17, 2026
@clawsweeper

clawsweeper Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 1:45 PM ET / 17:45 UTC.

ClawSweeper review

What this changes

This PR makes the standalone Control UI mock leave a generic session idle and show a deterministic reply after sending, adds browser E2E coverage, and stabilizes an existing image-lightbox E2E wait.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

No blocking findings. The focused mock-harness repair follows the Control UI’s normal chat.send response/event contract, and the prior CI blocker is resolved on the current head; this member-authored, maintainer-labeled PR should remain for normal maintainer landing. Likely related people: steipete (high confidence).

Priority: P3
Reviewed head: f1772f980d2a1f433fa9f2ee2abd825a253bd5f1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, well-covered mock-harness repair with direct visual proof and no supported correctness finding.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (recording): The PR body provides after-fix idle and reply screenshots plus a recorded Control UI mock flow; exact-head browser E2E and CI success provide supporting evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (recording): The PR body provides after-fix idle and reply screenshots plus a recorded Control UI mock flow; exact-head browser E2E and CI success provide supporting evidence.
Evidence reviewed 7 items Current-main behavior: Current main attaches the in-flight plan to the generic scenario, so its default history/startup payload makes a selected generic session appear active rather than sendable.
Scoped fixture repair: The PR supplies plan history only for the main-session match, leaving unmatched generic sessions idle, then intercepts only chat.send to resolve it and emit a final assistant event.
Control UI event contract: The chat gateway normalizes a final assistant message, publishes it to the selected session projection, and clears the terminal run; the mock event has the matching session key, run ID, message, and final state.
Findings None None.
Security None None.

How this fits together

The standalone Control UI mock supplies Gateway-like history, request responses, and events to a browser-based developer harness. A selected mock session sends chat.send, receives a started response and final chat event, and the Control UI renders the resulting assistant message.

flowchart LR
  A[Developer selects mock session] --> B[Standalone mock gateway]
  B --> C[Session history and active-run decision]
  C --> D[Composer sends a message]
  D --> E[Started response and final chat event]
  E --> F[Visible assistant reply in Control UI]
Loading

Before merge

  • Complete next step (P2) - The member-authored, maintainer-labeled PR needs normal maintainer landing handling; no concrete repair task remains.
Agent review details

Security

None.

PR surface

Tests +40, Other +87. Total +127 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 49 9 +40
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 115 28 +87
Total 3 164 37 +127

Review metrics

Metric Value Why it matters
Production versus test support production 0; mock/test support +115/-28; tests +49/-9 The net growth is confined to the developer mock harness and browser E2E coverage; no shipped runtime surface changes.

Technical review

Best possible solution:

Merge the focused developer-mock repair on its exact green head while keeping production chat behavior unchanged.

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

Yes, source-reproducible: current main applies the plan/in-flight snapshot to the generic mock scenario, while the new browser test selects a generic session and verifies the idle send path.

Is this the best way to solve the issue?

Yes. The mock gateway owns both the missing response and final event, so scoping fixture state and emitting the existing event shape is preferable to modifying production chat code.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This repairs only the developer-facing standalone Control UI mock and its E2E validation path.
  • 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 (recording): The PR body provides after-fix idle and reply screenshots plus a recorded Control UI mock flow; exact-head browser E2E and CI success provide supporting evidence.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides after-fix idle and reply screenshots plus a recorded Control UI mock flow; exact-head browser E2E and CI success provide supporting evidence.
  • proof: 🎥 video: Contributor real behavior proof includes video or recording evidence. The PR body provides after-fix idle and reply screenshots plus a recorded Control UI mock flow; exact-head browser E2E and CI success provide supporting evidence.

Evidence

What I checked:

  • Current-main behavior: Current main attaches the in-flight plan to the generic scenario, so its default history/startup payload makes a selected generic session appear active rather than sendable. (scripts/control-ui-mock-dev.ts:1620, 1ea18c8cd8ca)
  • Scoped fixture repair: The PR supplies plan history only for the main-session match, leaving unmatched generic sessions idle, then intercepts only chat.send to resolve it and emit a final assistant event. (scripts/control-ui-mock-dev.ts:1664, f1772f980d2a)
  • Control UI event contract: The chat gateway normalizes a final assistant message, publishes it to the selected session projection, and clears the terminal run; the mock event has the matching session key, run ID, message, and final state. (ui/src/pages/chat/chat-gateway.ts:390, f1772f980d2a)
  • Behavioral regression coverage: The added browser tests select the formerly blocked generic session, assert it is idle, send text, and wait for the deterministic visible reply. (ui/src/e2e/board-fixture.e2e.test.ts:264, f1772f980d2a)
  • History and routing: Blame attributes the pre-existing generic in-flight fixture and stateful mock to the same recent Control UI mock commit; the current head adds the focused behavior and E2E timing follow-up. (scripts/control-ui-mock-dev.ts:1620, bb95d106d813)
  • Exact-head validation and proof: The supplied PR context records successful changed UI checks, all 12 UI E2E shards, real-gateway UI E2E, Security High, and the CI gate; its body includes before/after screenshots and a recording of the idle-session send flow. (ui/src/e2e/board-fixture.e2e.test.ts:277, f1772f980d2a)

Likely related people:

  • steipete: Current-main blame attributes the generic in-flight fixture and original stateful mock to Peter Steinberger; this PR’s two commits continue that same mock-harness work. (role: fixture originator and recent Control UI contributor; confidence: high; commits: bb95d106d813, f1772f980d2a; files: scripts/control-ui-mock-dev.ts, ui/src/e2e/board-fixture.e2e.test.ts)

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 (1 earlier review cycle)
  • reviewed 2026-08-17T16:53:45.125Z sha 889d8ba :: needs maintainer review before merge. :: none

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head f1772f980d2a1f433fa9f2ee2abd825a253bd5f1:

  • Native prepare ID: PR fix(ui): generic mock chat sends show a visible outcome #125347; prepare-run completed at 2026-08-17T18:39:22Z with hosted_exact_or_recent_parent, exact remote/head match, and no rebase or push change.
  • Testbox/hosted CI ID: run 32048871884, completed green on the exact head; rollup has zero pending/failing checks.
  • Regression proof: pre-fix generic 2/6; focused generic 6/6; focused lightbox 1/1; matching UI shard 20/20 files and 62/62 tests; changed-file gates and git diff --check green.
  • Final exact-head ClawSweeper review completed at 2026-08-17T17:45:55Z with no findings or security concerns; only normal maintainer landing remained. Full-branch autoreview is clean.
  • LOC: production +0/-0; tooling/test support +115/-28; tests +49/-9.
  • Sanitized before/after screenshots and video are embedded in the PR body.

No known proof gaps. Ready for the native scripts/pr merge-run path.

@steipete
steipete merged commit de9b367 into main Aug 17, 2026
120 of 124 checks passed
@steipete
steipete deleted the steipete/elastic-mclaren-7a002a branch August 17, 2026 18:40
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

* fix(ui): make generic mock chat sends observable

* test(ui): stabilize control UI e2e timing
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. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: M 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