Skip to content

fix(ui): keep unsent draft indicators visible - #125649

Merged
steipete merged 3 commits into
mainfrom
steipete/xenodochial-meitner-7412f4
Aug 18, 2026
Merged

steipete merged 3 commits into
mainfrom
steipete/xenodochial-meitner-7412f4

Conversation

@steipete

@steipete steipete commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users with browser-local unsent composer text would lose the draft pencil while the owning Home or session row was active. When an active run was present, the activity indicator could occupy the only visible trailing state, making the retained draft undiscoverable.

Why This Change Was Made

Draft presence is persistent row state, not an inactive-session notification. The sidebar now renders it for active and inactive rows alike, while keeping run activity and the pencil as separate trailing indicators. The draft remains browser-local: the durable payload lives in IndexedDB and its live presence projection is held in session storage; no Gateway or server persistence contract changes.

User Impact

The unsent-draft pencil remains visible while users are in the session, after they switch away and back, and alongside active-run activity. Clearing the composer removes it as before.

Evidence

Before typing — active run only:
Active Home before draft

After typing — active run and draft are both visible without overlap:
Active Home with separate activity and draft indicators

  • Regression test failed before the fix with the active Home and active session draft pencils missing, then passed after the two owner-boundary changes.
  • node scripts/run-vitest.mjs ui/src/components/app-sidebar.test.ts — 268 passed.
  • Focused mocked Gateway browser flow — passed; verifies active visibility, non-overlapping icon bounds, switch-away/back persistence, and removal after clearing.
  • node scripts/check-changed.mjs -- <five changed paths> — passed.
  • Codex autoreview — clean, no accepted/actionable findings.
  • Source-blind behavior validation — all four user-visible clauses passed.
  • Exact-head CI exposed two unrelated timing defects in existing UI coverage. The Markdown table copy test now checks synchronous clipboard dispatch before explicitly advancing its pending promise (one focused pass plus five bounded stress runs). The attachment restart E2E now waits for the asynchronously hydrated attachment itself instead of treating synchronously restored text as attachment readiness (one focused pass plus three bounded stress runs). Both follow-up changed gates and autoreviews are clean.

AI-assisted: yes. The implementation and behavior were independently reviewed and validated.

@clawsweeper

clawsweeper Bot commented Aug 18, 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 the app: web-ui App: web-ui label Aug 18, 2026
@steipete
steipete marked this pull request as ready for review August 18, 2026 06:11
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 18, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 18, 2026
@clawsweeper

clawsweeper Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 18, 2026, 3:02 AM ET / 07:02 UTC.

ClawSweeper review

What this changes

The branch keeps unsent draft pencils visible beside active-run indicators in the Control UI sidebar and stabilizes two related UI timing tests.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open. Current main still hides browser-local draft indicators on active Home and session rows; this maintainer-owned PR directly removes those presentation-only gates and has focused coverage.

Priority: P2
Reviewed head: 4816cb78d2e1d75177c520288a928ac93859c832

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A small, direct owner-boundary correction with focused UI coverage and no actionable review findings.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is not subject to the external-contributor proof gate; its body nevertheless includes before/after UI evidence and a focused browser-flow result.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is not subject to the external-contributor proof gate; its body nevertheless includes before/after UI evidence and a focused browser-flow result.
Evidence reviewed 5 items Current main remains affected: Current main suppresses the Home draft indicator whenever that row is active.
Session-row counterpart remains affected: Current main likewise suppresses a session draft indicator when the session is visually active.
Owner boundary: The application shell derives draft presence from browser-local stored draft scopes before passing it to the sidebar; no Gateway persistence is involved.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs ui/src/e2e/session-management.sidebar.e2e.test.ts --reporter=verbose

Result: FAIL (partial)

node scripts/run-vitest.mjs ui/src/e2e/session-management.sidebar.e2e.test.ts --reporter=verbose
runner@runnervmzvulz:~/work/clawsweeper/clawsweeper/target-pr$ node scripts/run-vitest.mjs ui/src/e2e/session-management.sidebar.e2e.test.ts --reporter=verbose
[test] starting test/vitest/vitest.ui-e2e.config.ts
[test] preflight test/vitest/vitest.ui-e2e.config.ts
node scripts/run-vitest.mjs ui/src/e2e/session-management.sidebar.e2e.test.ts --reporter=verbose
[ui-e2e] Using system Chromium at /usr/bin/chromium-browser.
Downloading FFmpeg (playwright ffmpeg v1011) from https://cdn.playwright.dev/dbazure/download/playwright/builds/ffmpeg/1011/ffmpeg-linux.zip
|                                                                                |   0% of 2.3 MiB
|■■■■■■■■                                                                        |  10% of 2.3 MiB
|■■■■■■■■■■■■■■■■                                                                |  20% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■                                                        |  30% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                                |  40% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                        |  50% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                |  60% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                        |  70% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                |  80% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■        |  90% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■| 100% of 2.3 MiB
FFmpeg (playwright ffmpeg v1011) downloaded to /home/runner/.cache/ms-playwright/ffmpeg-1011

 RUN  v4.1.10 /home/runner/work/clawsweeper/clawsweeper/target-pr

 ✓  ui-e2e  ui/src/e2e/session-management.sidebar.e2e.test.ts › Control UI session management mocked Gateway E2E › keeps the browser-local draft pencil visible
on active Home beside activity 6618ms
 ✓  ui-e2e  ui/src/e2e/session-management.sidebar.e2e.test.ts › Control UI session management mocked Gateway E2E › expands and manages child sessions inline bef
ore opening a child chat 2272ms
 ✓  ui-e2e  ui/src/e2e/session-management.sidebar.e2e.test.ts › Control UI session management mocked Gateway E2E › dismisses fixed session menus before the side
bar or drawer hides 4775ms























Assertions:

  • FAIL expect_output: keeps the browser-local draft pencil visible on active Home beside activity

How this fits together

The Control UI projects browser-local composer drafts into sidebar Home and session rows. Those rows combine persistent draft state with Gateway session activity to render separate trailing indicators.

flowchart LR
A[Composer draft in browser storage] --> B[Application shell draft projection]
C[Gateway session activity] --> D[Sidebar row state]
B --> D
D --> E[Home row]
D --> F[Recent session row]
E --> G[Draft and activity indicators]
F --> G
Loading

Before merge

  • Resolve merge risk (P1) - Exact-head CI is still in progress, so landing should wait for the required checks on the current head.
Agent review details

Security

None.

PR surface

Source +2, Tests +16. Total +18 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 4 7 5 +2
Tests 3 34 18 +16
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 41 23 +18

Review metrics

Metric Value Why it matters
Production versus test LOC production +2/-2 (net 0); tests +39/-21 The repair changes two existing UI conditions; the rest is focused regression and timing coverage.

Stored data model

Persistent data-model change detected: serialized state: ui/src/e2e/session-management.sidebar.e2e.test.ts, serialized state: ui/src/test-helpers/app-sidebar-cases/session-indicators.ts, unknown-data-model-change: ui/src/e2e/session-management.sidebar.e2e.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Render the persistent draft fact independently from transient active-run state, then land after routine maintainer review and exact-head CI complete.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Render the persistent draft fact independently from transient active-run state, then land after routine maintainer review and exact-head CI complete.

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

Yes. Current main’s two active-row conditions source-prove the missing indicators, and the branch adds a focused mocked-Gateway browser flow for the affected path.

Is this the best way to solve the issue?

Yes. Removing the two presentation-layer suppression conditions preserves the existing browser-local draft owner and keeps run activity separate.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded Control UI discoverability regression without data-loss, security, or availability impact.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is not subject to the external-contributor proof gate; its body nevertheless includes before/after UI evidence and a focused browser-flow result.

Evidence

What I checked:

Likely related people:

  • Ayaan Zaidi: Current-main blame attributes the active Home suppression condition to this contributor. (role: introduced current behavior; confidence: high; commits: c198f8aba4f4; files: ui/src/components/app-sidebar-render.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.

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 18, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready on exact head 4816cb78d2e1d75177c520288a928ac93859c832. Exact-head CI run 32109068288 is green.

Local proof:

  • node scripts/run-vitest.mjs ui/src/components/app-sidebar.test.ts — 268 passed.
  • node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/session-management.sidebar.e2e.test.ts -t "keeps the browser-local draft pencil visible on active Home beside activity" — passed against the focused mocked-Gateway flow, covering active visibility, non-overlap, navigation persistence, and clearing.

The two unrelated CI flakes were repaired: Markdown-table copy now verifies synchronous clipboard dispatch before advancing the pending promise (focused pass plus 5 bounded stress runs), and attachment restart now waits for asynchronously hydrated attachments (focused pass plus 3 bounded stress runs). Visual proof is attached in the PR body. Source-blind behavior validation passed all four clauses; autoreview clean. No known proof gaps.

@steipete
steipete merged commit ebe9d38 into main Aug 18, 2026
152 of 153 checks passed
@steipete
steipete deleted the steipete/xenodochial-meitner-7412f4 branch August 18, 2026 07:19
@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 20, 2026
* fix(ui): keep unsent draft indicators visible

* test(ui): make markdown table copy assertion deterministic

* test(ui): await restored draft attachments
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. 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