Skip to content

feat(ui): render queued follow-ups as transcript bubbles - #131909

Merged
steipete merged 3 commits into
mainfrom
feat/queued-sends-thread-bubbles
Aug 28, 2026
Merged

steipete merged 3 commits into
mainfrom
feat/queued-sends-thread-bubbles

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

A follow-up sent while the agent is still streaming gave no immediate acknowledgment in the transcript: it appeared only as a composer-attached queue card until admission, so the send looked ignored. Operator request: the message should immediately appear in the chat stream at the very bottom, with the in-flight reply continuing to grow above it, and each further follow-up appearing as its own bubble.

Why This Change Was Made

Queued-but-not-started sends now render as real user bubbles at the transcript tail, one bubble per submit in queue order. The live stream block naturally stays above them (they are user rows in the causal projection, no special-casing). Each bubble keeps one stable identity from submit through queue reorder, admission, and durable-history handoff, so nothing remounts or jumps. The existing queue capabilities — steer now, edit, reorder, remove, retry — attach beneath the queued bubble, and the composer-attached cards stop duplicating message content (local-command cards remain). This deliberately supersedes the ordinary-message placement half of #127823; its queue mechanics, persistence, and admission semantics are untouched.

User Impact

Sending during an active run immediately "looks like it worked": your message is in the stream at the bottom, the reply keeps writing above it, and the first queued message is what the agent sees at the next admission.

Evidence

  • 845 unit tests + 15 mocked-gateway browser tests green; check-changed exit 0; Codex autoreview clean (0.99).
  • Browser proof with pre-change failures (HEAD-copy protocol, byte-verified restore): pre-change, a submitted follow-up is visible only in the composer card (screenshot captured); post-change, two independent submits render as two tail bubbles with streamed text above, bubble fix: add @lid format support and allowFrom wildcard handling #1 admitted in place (stable DOM node) while bubble Login fails with 'WebSocket Error (socket hang up)' ECONNRESET #2 stays queued; reorder/edit/remove verified with four queued bubbles. Screenshots inventoried in the investigation artifacts and visually inspected.
  • Live-gateway sanity on this branch's dist: a real ChatGPT-backed run streamed to completion with the optimistic bubble rendering immediately (isolated rig). A full live queued-follow-up round trip is blocked by a separate pre-existing defect — send dispatch can wait minutes on a pane-startup session-settings patch whose reconciliation is slow to settle (no pending WS requests; local wait at chat-send-delivery.ts settings loop) — documented with evidence and being fixed separately.
  • Production +130/−22; the composer-card content path is deleted rather than paralleled.

@clawsweeper

clawsweeper Bot commented Aug 28, 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 docs Improvements or additions to documentation app: web-ui App: web-ui size: L maintainer Maintainer-authored PR labels Aug 28, 2026
@steipete
steipete marked this pull request as ready for review August 28, 2026 16:37
@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 28, 2026
@clawsweeper

clawsweeper Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 5:59 PM ET / 21:59 UTC.

ClawSweeper review

What this changes

The PR shows queued follow-up messages as stable user bubbles in the Control UI transcript, with queue controls attached beneath each bubble rather than duplicated in the composer.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open. The branch’s queued-message transcript projection is still absent from current main, and no introduced correctness or security defect was identified in the reviewed UI path.

Priority: P3
Reviewed head: fad5b250467bdf6133bf35e78307720f429ae061

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a focused, well-covered UI feature with no actionable introduced defect identified in the reviewed decision surface.
Proof confidence 🌊 off-meta tidepool Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; supplied focused browser and mocked-gateway evidence remains supplemental.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; supplied focused browser and mocked-gateway evidence remains supplemental.
Evidence reviewed 5 items Feature implementation: The branch passes queue data and its callbacks into transcript rendering, allowing pending-send bubbles to locate and render the matching controls.
Stable queue/history handoff: Pending and persisted user messages derive the same send identity, preventing a bubble remount as a queued send becomes history.
Focused behavior coverage: The test covers transcript-tail placement, reorder, extension, sending, and authoritative-history handoff while preserving stable keys.
Findings None None.
Security None None.

How this fits together

The Control UI queues follow-up messages while an agent run is active, then combines queue rows, persisted history, and streamed output into the chat transcript. Users can edit, steer, reorder, retry, or remove a queued item before it becomes durable history.

flowchart LR
  A[User submits follow-up] --> B[Queued send]
  B --> C[Transcript projection]
  C --> D[User bubble]
  D --> E[Queue controls]
  C --> F[Live stream]
  B --> G[Composer local commands]
Loading

Before merge

  • Complete next step (P2) - No repair work is indicated; await exact-head CI and ordinary maintainer review for this protected member PR.
Agent review details

Security

None.

PR surface

Source +101, Tests +256, Docs +1, Other 0. Total +358 across 25 files.

View PR surface stats
Area Files Added Removed Net
Source 9 137 36 +101
Tests 14 435 179 +256
Docs 1 3 2 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 2 0
Total 25 577 219 +358

Review metrics

Metric Value Why it matters
Production versus test delta production +137/-36; tests +435/-179; docs +3/-2; baseline config +2/-2 The production growth implements a new visible queue placement flow, while focused tests materially exceed it and cover projection, recovery, and controls.

Technical review

Best possible solution:

Land the transcript-tail projection with its stable pending-to-history identity and attached queue controls after normal exact-head CI and maintainer review.

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

Not applicable: this is a feature PR rather than a report of broken current-main behavior; focused source and UI test coverage exercises the proposed flow.

Is this the best way to solve the issue?

Yes: the branch keeps the existing queue as the delivery owner, projects pending work into the transcript, and uses one stable identity through history handoff.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a contained Control UI usability feature rather than a demonstrated regression or operational outage.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • remove P2: Current review triage priority is P3, so this older priority label is no longer current.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P3: This is a contained Control UI usability feature rather than a demonstrated regression or operational outage.
  • 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: The author is a repository member, so the external-contributor proof gate does not apply; supplied focused browser and mocked-gateway evidence remains supplemental.

Evidence

Acceptance criteria:

  • [P1] Review exact-head CI when complete.
  • [P1] Retain focused transcript projection, handoff, and queue-control coverage.

What I checked:

Likely related people:

  • steipete: Authored the queued-bubble implementation and recent chat-path changes. (role: recent area contributor; confidence: high; commits: 4969f2d2610a; files: ui/src/pages/chat/chat-thread-build.ts, ui/src/pages/chat/chat-view.ts)
  • vyctorbrzezowski: Authored the merged composer-queue foundation that this transcript projection extends. (role: queue feature owner; confidence: high; commits: 18beca535036; files: ui/src/pages/chat/components/chat-composer-queue.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 (5 earlier review cycles)
  • reviewed 2026-08-28T16:45:47.224Z sha 729432ca67c1f168c5aaa14efbd17406e12aeced :: needs maintainer review before merge. :: none
  • reviewed 2026-08-28T17:45:42.586Z sha 6a1de00 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-28T21:05:01.596Z sha 5a0988bef7c164f03bdeeb6643e2cb9404389210 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-28T21:26:03.402Z sha e8a7de172bb0db92644c19ab6d06428b8765b68f :: needs maintainer review before merge. :: none
  • reviewed 2026-08-28T21:44:31.988Z sha ab44900f62cf9658b0dfac1c67927c4e7ead7b07 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the feat/queued-sends-thread-bubbles branch 2 times, most recently from 6a1de00 to 5a0988b Compare August 28, 2026 20:56
@steipete

steipete commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Rebased validation for queued-send transcript bubbles, head 6ef63664e50552f654de204cfd9faa068497980b.

The only rebase conflict was config/control-ui-startup-budget-baseline.json. Neither side was retained as the final answer: the obsolete budget commit was replaced with a fresh build on main a79e6517be8. Range-diff shows the queued-bubble feature and recovery-selector patches are unchanged.

Fresh startup JS: 345371 B; verification rebuild: 345335 B. The recorded baseline is now 345371 B, down 3078 B from main's 348449 B and 232 B above the previous branch measurement after newer upstream changes. Neither conflicting baseline was retained. Upstream agent-tool-policy chunking remains part of main. Existing 512 B growth + 64 B variance remain unchanged, giving a 345947 B enforcement limit; the 350 KiB ceiling and other budgets are unchanged. Commit 6ef63664e50 is explicitly titled build(ui): refresh startup budget for queued-send bubbles and records these numbers.

The renderer remains synchronous because it owns restored offline/error state as well as controls. No unrelated boot splitting, new renderer lifecycle, identifier/format trick, or gate-logic change was added. Original same-toolchain attribution remains historical context: +30 B initial startup and +911 B lazy boot, chiefly +669 B queue/message renderer and +197 B chat projection; manifest regeneration saved only 33 initial bytes and was reverted.

Fresh proof:

  • pnpm ui:build and node --import ./scripts/tsx.mjs scripts/check-control-ui-performance.mts: passed, 345335 B against 345947 B.
  • node scripts/run-vitest.mjs for seven affected chat suites: 895 chat tests passed. The unchanged workspace-sync inventory suite passed all 10 tests in the preceding validation.
  • node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner for active-run-follow-ups, queue-edit, queue-reorder, and cloud-startup-failure: 25 browser tests passed.
  • Fresh Codex autoreview: clean at its default P0 threshold.

Production +137/-36; tests +435/-179; docs +3/-2; budget config +2/-2. The budget repair itself adds no production or test code. Normal queue delivery, persistence, ordering, and history handoff remain with their existing owners.

Prior CI run 33212031042 passed the original budget failure, then exposed three stale recovery selectors and one inventory executable launch returning ETXTBSY. The selector fix now asserts the transcript bubble and attached reconnect state without changing mocks/timeouts; all recovery cases pass. Inventory source is unchanged and passes locally; no speculative infrastructure workaround was added. Superseded run 33214357231 passed every UI shard and the real-Gateway gate (345140 B), but one unrelated Gateway worker-placement RPC hit a 10-second timeout. Its full ten-file group passed locally afterward (21 passes, one skip), unchanged. A new main budget edit then required the second mechanical rebase. No infrastructure rerun has been used.

The screenshots below were personally inspected and show synthetic mocked-Gateway data. The attached after/admission captures are from the preceding rebased head; the feature patch remains identical and the same four Chromium suites passed again on this head. They are Chromium UI proof with a mocked Gateway, not a new authenticated live-provider round trip. The previously documented full live queued-follow-up/settings-reconciliation gap remains explicit. Latest completed ClawSweeper review reported no code/security findings; its remaining next step was exact-head CI and maintainer review. The rebase and browser proof are complete; exact-head CI is now green. The earlier rebase/validation Rank-up request has been completed; the latest review lists no additional Rank-up moves.

Before: composer-attached queued message.

Before: composer-attached follow-up

After: two separate queued bubbles below the growing stream.

After: queued transcript bubbles

Admission: first bubble stays in place while the second remains queued.

Admission in place

node scripts/check-changed.mjs completed with exit 0, including full core lint, core-test/UI typechecks, dead-export, i18n, formatting, and script guards. Head 6ef63664e50552f654de204cfd9faa068497980b is pushed with an explicit force-with-lease. Exact-head CI run 33216245998 completed successfully. The native watcher exited 0 with terminal line GREEN. Native prepare/merge are next. No infrastructure rerun was used.

Current-head Linux CI startup gate: 345367 B against 345947 B enforcement, with the recorded 345371 B baseline and unchanged allowances. Every selected CI job passed, including all UI shards and the Gateway shard that timed out on the superseded head.

@steipete
steipete force-pushed the feat/queued-sends-thread-bubbles branch from 5a0988b to e8a7de1 Compare August 28, 2026 21:19
@steipete steipete self-assigned this Aug 28, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 28, 2026
@steipete
steipete force-pushed the feat/queued-sends-thread-bubbles branch from ab44900 to fad5b25 Compare August 28, 2026 21:51
@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. and removed P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 28, 2026
A follow-up sent during an active run previously appeared only as a
composer-attached queue card until it started; the transcript gave no
immediate acknowledgment and the reply appeared to ignore the send.
Queued messages now render as real user bubbles at the transcript tail,
one bubble per submit in queue order, with the live stream continuing
above them. The bubble keeps one stable identity from submit through
queue reorder, admission, and durable-history handoff, so nothing
remounts or jumps. The existing queue controls (steer now, edit,
reorder, remove, retry) attach beneath the queued bubble; the
composer-attached cards no longer duplicate message content and keep
only local-command cards. Supersedes the ordinary-message placement
half of #127823.
CI run 33212031042 exposed three recovery cases still looking for message text inside the old composer queue item. Assert the user bubble and its attached reconnect state while retaining all recovery and exact-send assertions. The old selector fails locally; all eight recovery cases pass with the update. No production, mock, or timeout changes.
Replace the conflicting budget adjustment with a fresh production build on
main a79e651. Startup JS measures 345371 B; an independent verification
rebuild measures 345335 B. Record the measured 345371 B baseline rather
than either conflicting value.

This lowers main's 348449 B baseline by 3078 B and raises the superseded
branch measurement by 232 B after upstream changes. The feature and
recovery-test patches are unchanged by the mechanical rebase.

Keep the existing 512 B growth allowance and 64 B build variance, yielding
a 345947 B enforcement limit and 576 B measured headroom. The 350 KiB
baseline ceiling and all other performance budgets remain unchanged.

Immediate queued-send acknowledgment and restored offline/error controls
retain their existing synchronous renderer. No unrelated boot splitting,
new lazy-render architecture, or gate-logic change is introduced here.
@steipete
steipete force-pushed the feat/queued-sends-thread-bubbles branch from fad5b25 to 6ef6366 Compare August 28, 2026 22:18
@steipete
steipete merged commit b0cb107 into main Aug 28, 2026
154 checks passed
@steipete
steipete deleted the feat/queued-sends-thread-bubbles branch August 28, 2026 22:32
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete

Copy link
Copy Markdown
Contributor Author

Closing the live-proof gap documented in the PR body: with #131958 (send-dispatch settings wait) landed, the full authenticated round trip now completes on an isolated live gateway (merged main dist, real Chrome, ChatGPT-backed gpt-5.6-sol): a 30-line reply streamed live, two follow-ups submitted during the run rendered as tail bubbles, and after the run finished both were admitted in order and answered exactly (QUEUE-ACK-1, then QUEUE-ACK-2) — pre-follow-up output above, each follow-up's answer below it. chat.send dispatched within seconds of submit (previously minutes on the same rig). Capture attached (mock-free, isolated state).

live-21-later

@steipete

Copy link
Copy Markdown
Contributor Author

Screenshots for this change — before/after from the mocked-gateway proof plus live captures on current main (a86b427ca8e, isolated dev gateway, real ChatGPT-backed gpt-5.6-sol):

  1. Before (pre-change build, mocked fixture): a follow-up submitted during an active run is visible only as a composer-attached queue card — the transcript gives no acknowledgment.
  2. After (mocked fixture): the same submit renders immediately as a tail bubble with the Queued state and Steer/remove controls beneath it.
  3. After (mocked fixture): two independent submits are two bubbles in order, with the live stream continuing above both.
  4. Live on main: a completed reply above, the first follow-up admitted and being worked (memory-search tool call, running timer), and two further follow-up bubbles rendered instantly at the tail during the active run. The full live round trip with exact acks is in the previous comment's capture.

queued-00-submitted

queued-00-submitted

queued-02-stream-above-follow-ups

live-main-two-queued-bubbles

steipete added a commit that referenced this pull request Aug 29, 2026
Reverts #131909 (b0cb107) per operator product decision after live review — queued messages remain composer-attached; the send-dispatch fix (#131958) is unaffected.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 29, 2026
…1909)

* feat(ui): render queued follow-ups as transcript bubbles

A follow-up sent during an active run previously appeared only as a
composer-attached queue card until it started; the transcript gave no
immediate acknowledgment and the reply appeared to ignore the send.
Queued messages now render as real user bubbles at the transcript tail,
one bubble per submit in queue order, with the live stream continuing
above them. The bubble keeps one stable identity from submit through
queue reorder, admission, and durable-history handoff, so nothing
remounts or jumps. The existing queue controls (steer now, edit,
reorder, remove, retry) attach beneath the queued bubble; the
composer-attached cards no longer duplicate message content and keep
only local-command cards. Supersedes the ordinary-message placement
half of openclaw#127823.

* test(ui): find recovered queued messages in transcript bubbles

CI run 33212031042 exposed three recovery cases still looking for message text inside the old composer queue item. Assert the user bubble and its attached reconnect state while retaining all recovery and exact-send assertions. The old selector fails locally; all eight recovery cases pass with the update. No production, mock, or timeout changes.

* build(ui): refresh startup budget for queued-send bubbles

Replace the conflicting budget adjustment with a fresh production build on
main c36b413. Startup JS measures 345371 B; an independent verification
rebuild measures 345335 B. Record the measured 345371 B baseline rather
than either conflicting value.

This lowers main's 348449 B baseline by 3078 B and raises the superseded
branch measurement by 232 B after upstream changes. The feature and
recovery-test patches are unchanged by the mechanical rebase.

Keep the existing 512 B growth allowance and 64 B build variance, yielding
a 345947 B enforcement limit and 576 B measured headroom. The 350 KiB
baseline ceiling and all other performance budgets remain unchanged.

Immediate queued-send acknowledgment and restored offline/error controls
retain their existing synchronous renderer. No unrelated boot splitting,
new lazy-render architecture, or gate-logic change is introduced here.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 29, 2026
…#132294)

Reverts openclaw#131909 (31c9468) per operator product decision after live review — queued messages remain composer-attached; the send-dispatch fix (openclaw#131958) is unaffected.
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 docs Improvements or additions to documentation 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: L 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