Skip to content

fix(ui): show users typing in the transcript - #125244

Merged
clawsweeper merged 8 commits into
mainfrom
feat/transcript-typing-item
Aug 18, 2026
Merged

clawsweeper merged 8 commits into
mainfrom
feat/transcript-typing-item

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Aug 17, 2026 •

Copy link
Copy Markdown
Member

Closes #125234

Additional instructions

MUST: Keep Allow edits from maintainers enabled for this PR so maintainers can help update the branch when needed.

What Problem This Solves

Fixes an issue where users in shared chat sessions would see remote typing activity outside the transcript above the composer. Typing transitions changed the composer-area geometry and did not participate in chronological transcript scrolling or virtualization.

Why This Change Was Made

The existing typing presentation is now projected as one stable, ephemeral final transcript row after visible chat content. The transcript virtualizer measures and indexes that row, follows it only when the reader was already at the end, and preserves a scrolled-up viewport otherwise. Active typing also counts as transcript content when no history rows exist, so the typing row can render and be measured as the sole transcript item.

The existing typing lifecycle removes actors on explicit stop or expiry. An arriving session.message removes only the actor authoritatively identified by an exact structured sender ID on a matching user message; assistant, tool, unattributed, and other-participant messages do not clear unrelated actors.

The composer rendering path and its outside/sticky styling were removed. Typing remains transient presence state rather than a persisted message or turn. Session suggestions and composer design are unchanged.

User Impact

Remote typing activity now scrolls naturally with conversation history and appears directly after the latest visible turn or event, including in an otherwise empty transcript. Starting, updating, or ending typing no longer changes composer geometry, readers inspecting older history are not forced back to the bottom, and unrelated messages no longer erase active participant indicators.

Evidence

Implementation inspection confirms:

  • the keyed presence:typing row is appended by the transcript projection and included in virtualizer count, indexing, and measurement;
  • active typing bypasses the empty/welcome and loading-skeleton branches so the sole typing row renders through the virtualizer;
  • TanStack followOnAppend is enabled only for the typing tail row and applies only when the viewport was already at the transcript end;
  • actor updates reuse the same row key, while empty, expired, and explicitly stopped actors remove it;
  • matching user messages remove only message.__openclaw.senderId from the active actor map; messages without that authoritative identity remove nobody;
  • avatars are aria-hidden while the status text names all actors, avoiding duplicate announcements;
  • the composer no longer receives or renders typing actors.

Per the requested publication scope, no tests, build, checks, lint, formatting, install, screenshots, review pass, or CI monitoring were run. git diff --check passed before each commit.

Implementation Plan

Tracked in #125234. This PR implements the issue plan at the transcript projection, virtualizer, and typing lifecycle owners without changing persistence, protocol, composer design, or session suggestions.

@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.

@clawsweeper

clawsweeper Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 18, 2026, 12:31 AM ET / 04:31 UTC.

ClawSweeper review

What this changes

Moves remote shared-session typing presence from above the composer into a virtualized, ephemeral final transcript row and clears only the matching structured user sender on message arrival.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

No blocking code defect found in the reviewed PR head. The implementation coherently makes typing transient transcript state, but a maintainer should explicitly approve the shared-session UX change before merge.

Priority: P2
Reviewed head: d2440ea57b1c83167e69595f6bb7cae437a27b62
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The source and focused coverage support the implementation, while independent artifact, dependency-contract, and current-main verification are unavailable in this environment.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Evidence reviewed 6 items Transcript ownership and ordering: The chat render path passes typing actors into the thread, and projection appends one keyed typing row after message, realtime, recap, and task rows.
Viewport behavior: The transcript controller only follows when the typing row is newly added and the virtualizer reports the reader at the end; it otherwise retains the existing viewport.
Presence lifecycle boundary: Message-driven cleanup first scopes the event to the selected session, then removes only a user-role message's structured sender ID; unattributed or assistant messages preserve typing presence.
Findings None None.
Security None None.

How this fits together

Control UI receives shared-session typing and message events from the Gateway, maintains transient participant presence in the chat pane, then projects it into the virtualized transcript. The resulting row affects scroll-follow behavior and what readers see beside the composer.

flowchart LR
  A[Gateway typing event] --> B[Chat pane presence state]
  A2[Gateway message event] --> C[Scoped sender cleanup]
  B --> D[Transcript projection]
  C --> B
  D --> E[Virtualized transcript]
  E --> F[Reader viewport]
Loading

Decision needed

Question Recommendation
Should remote shared-session typing become transient chronological transcript content, rather than remain adjacent to the composer? Approve transcript ownership: Accept the virtualized final-row design so typing scrolls with the conversation and does not alter composer geometry.

Why: Both placements are technically viable, but they optimize different reader expectations and change the established shared-session interaction.

Before merge

  • Resolve merge risk (P1) - Merging intentionally changes an established shared-session interaction from composer-adjacent presence to transcript content; that UX policy needs explicit owner approval.
  • Resolve merge risk (P1) - This environment could not compare the head with current main, inspect the installed TanStack virtualizer contract, or open the linked proof images because the checkout is grafted and GitHub reads failed.
  • Complete next step (P2) - The remaining blocker is an explicit maintainer choice about shared-session interaction design, not a mechanical repair.
Agent review details

Security

None.

PR surface

Source +161, Tests +115. Total +276 across 16 files.

View PR surface stats
Area Files Added Removed Net
Source 12 210 49 +161
Tests 4 155 40 +115
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 16 365 89 +276

Review metrics

Metric Value Why it matters
Production versus test delta production +209/-49 (net +160); tests and test support +156/-40 (net +116) The branch adds a new transcript presentation and lifecycle boundary while replacing the prior composer rendering path.

Stored data model

Persistent data-model change detected: serialized state: ui/src/e2e/session-suggestions.e2e.test.ts, unknown-data-model-change: ui/src/e2e/session-suggestions.e2e.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #125234
Summary: This PR is the concrete implementation candidate for the linked shared-session typing presentation request.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Mantis proof suggestion

A redacted web UI chat transcript would directly show the requested placement, scrolling, and composer-stability behavior. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis web UI chat proof: verify remote typing renders as the final transcript row while an older scrolled-up viewport remains unchanged.

Merge-risk options

Maintainer options:

  1. Approve the transcript interaction
    Accept the intentional transient-presence behavior change after confirming it is the desired shared-session UX.
  2. Pause for product direction
    Keep the PR open until a Control UI owner chooses transcript ownership or composer-adjacent presence.

Technical review

Best possible solution:

Adopt the transcript as the single owner of remote typing only after a Control UI owner confirms that chronological placement is preferable to composer-adjacent presence.

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

Not applicable: this PR proposes a new presentation policy for existing transient presence, rather than reporting a contract-defined failing behavior.

Is this the best way to solve the issue?

Unclear: the transcript projection is a coherent owner-boundary solution, but whether typing belongs in chronological history rather than beside composition requires product approval.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: The PR changes a user-visible shared-session interaction and scrolling behavior, without evidence of broader availability or data impact.
  • merge-risk: 🚨 session-state: Typing actors are transient shared-session state whose cleanup and projection now change when matching messages arrive.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Evidence

What I checked:

Likely related people:

  • vyctorbrzezowski: The timeline assigns this member to the work, and the PR and linked request identify the same shared-session typing design. (role: assigned implementation and product-direction participant; confidence: medium; commits: 53f89d20c3a6, 2aad21e09575; files: ui/src/pages/chat/components/chat-transcript-projection.ts, ui/src/pages/chat/chat-pane-sharing.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record a Control UI owner decision on transcript versus composer-adjacent typing.
  • Refresh the review against a checkout that includes current main and the installed virtualizer dependency.

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 (6 earlier review cycles)
  • reviewed 2026-08-17T11:24:37.721Z sha 5701d0c :: needs changes before merge. :: [P1] Move the stale typing-status tests with the UI | [P2] Render typing when the shared transcript is empty
  • reviewed 2026-08-17T19:26:45.614Z sha c6f8225 :: found issues before merge. :: [P1] Read only the authoritative sender id | [P1] Move the stale typing-status tests with the UI
  • reviewed 2026-08-18T02:33:05.007Z sha 2fbd47795bcb7f7e14f667f1d0cf1961023a363b :: found issues before merge. :: [P1] Use only the raw structured sender ID | [P1] Move typing assertions into the transcript surface | [P2] Append the typing row after all transcript content
  • reviewed 2026-08-18T03:44:07.078Z sha f7c9fb21b462f4b4138a8e906e424636e685f7e0 :: found issues before merge. :: [P2] Scope the borderless avatar rule to typing
  • reviewed 2026-08-18T04:06:49.033Z sha 6247e9dcbf85229a05bde941652b19280bce73a6 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-18T04:21:44.379Z sha 074c8b3270b753a23a73cc9d8ab339c5df636825 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. 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. labels Aug 17, 2026
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Operator-validated mock evidence on the current implementation.

One actor at the final conversational turn

Dark Light
Dark: one remote actor typing after the final chat turn Light: one remote actor typing after the final chat turn

Two actors share one stable typing row

Dark Light
Dark: two remote actors typing Light: two remote actors typing

Reader scrolled up

Typing became active while the viewport remained on older transcript turns; the capture position was unchanged.

Dark Light
Dark: scrolled-up viewport preserved while typing is active Light: scrolled-up viewport preserved while typing is active

Matching author message clears only that actor

Colin’s message arrived; Patricia remained in the typing row.

Dark Light
Dark: Colin message arrived while Patricia remains typing Light: Colin message arrived while Patricia remains typing

Typing as the only transient transcript item

Dark Light
Dark: typing row in the empty-session fixture Light: typing row in the empty-session fixture

The user avatars are circular and borderless to match the identity treatment used in the sidebar; the typing row reuses the transcript avatar renderer so initials, colors, and image fallbacks remain consistent.

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review August 18, 2026 02:25
@clawsweeper

Copy link
Copy Markdown
Contributor

Addressed all three current ClawSweeper findings on head f7c9fb21b46:

  • typing removal now reads only the raw structured user __openclaw.senderId; legacy labels, assistant messages, and other sessions cannot clear presence;
  • presence:typing is appended after realtime, recap, and background-task rows, so it is always the final transcript row;
  • stale composer assertions moved to transcript/lifecycle coverage, including exact sender removal, legacy/unattributed preservation, expiry, final ordering, and the mocked Gateway session.message flow; the obsolete composer typing prop was removed.

Proof:

  • node scripts/run-vitest.mjs ui/src/pages/chat/chat-pane-lifecycle.test.ts ui/src/pages/chat/chat-view.test.ts ui/src/pages/chat/chat-composer.test.ts — 307 tests passed across UI and isolated lifecycle shards.
  • AWS Crabbox run_349264d4a805 / lease cbx_5339db01ed82 — session-suggestions.e2e.test.ts, 4/4 passed; lease stopped cleanly.
  • mandatory autoreview — clean, no accepted/actionable findings.

Repair delta: production net 0 relative to the reviewed head; tests/test-support +101 net. The overall PR remains production +146 because the transcript typing presentation is the new user-visible capability.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 18, 2026
@clawsweeper

Copy link
Copy Markdown
Contributor

CI follow-up on head 6247e9dcbf8:

  • restored the established 1px user-avatar border; typing-only borderlessness remains scoped to .agent-chat__typing-indicator .chat-avatar;
  • extracted raw structured-sender presence removal into chat-typing-presence.ts, keeping the owner file under its max-lines gate;
  • moved the lifecycle regression into chat-pane-typing.test.ts, keeping the existing lifecycle suite under its max-lines gate;
  • formatted the three original branch files reported by CI.

Focused proof after the repair:

  • UI + isolated lifecycle: 280 tests passed, 82 browser-only cases skipped by the local runner;
  • mocked Chromium session-suggestions.e2e.test.ts: 4/4 passed locally (the prior AWS run also passed 4/4);
  • focused oxlint on the changed typing owner/tests: clean;
  • mandatory autoreview: clean, no accepted/actionable findings.

@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 18, 2026
@clawsweeper clawsweeper Bot removed the rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. label Aug 18, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 18, 2026
@clawsweeper
clawsweeper force-pushed the feat/transcript-typing-item branch from 074c8b3 to d2440ea Compare August 18, 2026 04:25
@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 18, 2026
@clawsweeper
clawsweeper merged commit e97b42a into main Aug 18, 2026
147 checks passed
@clawsweeper

Copy link
Copy Markdown
Contributor

Merged via squash.

@clawsweeper
clawsweeper deleted the feat/transcript-typing-item branch August 18, 2026 05:19
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
* fix(ui): move typing status into transcript

* fix(ui): complete transcript typing lifecycle

* fix(ui): finish transcript typing presentation

* fix(ui): refine typing bubble tail

* fix(ui): complete transcript typing invariants

* fix(ui): satisfy transcript typing gates

* fix(ui): keep typing presence ownership bounded

* fix(ui): keep typing presence dependencies private

---------

Co-authored-by: RoboClaw <[email protected]>
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 merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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.

Show users typing as the final transcript item

3 participants