feat(web,mobile): thinking shows inline and finished work folds under Worked for#28655

open1
main
t3/simplify-thread-work-display
opened9d agobyTtheo
View on GitHubTwo-way sync enabledPR last imported 44m ago

While an agent works, its thinking was buried in a one-line preview under a live row that kept changing. Tool calls were stacked in layers that were hard to read, and the fold was confusing. This PR makes the work log simple, close to how Codex shows it.

  • Thinking shows inline. Each thinking trace is its own row (brain icon, muted markdown), in order, on web, desktop, and mobile.
  • Tools group into one row. Consecutive tool calls share one row. While a call runs, the row names it ("Running vp", "Reading foo.ts", "Searching TODO in src") plus "+N more". A single call opens directly. Task lists keep their own row.
  • Finished turns fold under "Worked for …". Open it to see the thinking and tool calls again.
  • "Thinking" stays honest. It shows only when nothing else is live: no running call, pending approval, live trace, or streaming reply from the current prompt.
  • Less code. The separate live-work row, its thought-preview machinery, and the repainting shine animation are gone (net −420 lines).

Read labels show the file name only. The full path shows when you open the row.

Before / after

📹 before · 📹 after

Known limits

  • A reply left marked streaming after a steering restart, or a local /feedback row sent while a thought streams, can hide or add one "Thinking" row. Both are rare, and nothing wrong is shown.
  • On web a task list between two calls splits them into two rows. Mobile does not show task lists in the work log, so it shows one group.

Proof: vp run check:changed passes. Focused tests cover each grouping and "Thinking" rule, and each fix test fails without its fix. I recorded the free Replay (dev) showcase on web, on main and on this branch.

Council review

Rounds: 15

DelegateR1R2R3R4R5R6R7R8R9R10R11R12R13R14R15
Claude Opus 5.57/108/108/109/109/109/108/109/109/108/109/109/109/109/109/10
Codex GPT-6.1 Sol7/108/109/109/109/109/109/1010/109/1010/109/108/1010/1010/1010/10

Created with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Checks

22 successful · 11 skipped
All checks passed
2cddb9c
Synced from GitHub

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — Reasoning now appears inline by default, with consecutive tool calls grouped into expandable rows. A human must confirm this change to the default activity-log experience for existing web and mobile users.

No code changes detected at 2cddb9c. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

Synced from GitHub

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire5.0 KiB5.0 KiB−6 B (−0.1%)6.8 KiB✅
CodexThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
CodexLive turn WebSocket wire1.3 KiB1.2 KiB−6 B (−0.5%)2.0 KiB✅
CodexLive turn WebSocket decoded21.6 KiB21.6 KiB0 B (0.0%)24.4 KiB✅
CodexLive turn messages220 (0.0%)8✅
ClaudeTotal thread wire5.0 KiB5.0 KiB0 B (0.0%)6.8 KiB✅
ClaudeThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
ClaudeLive turn WebSocket wire1.3 KiB1.3 KiB0 B (0.0%)2.0 KiB✅
ClaudeLive turn WebSocket decoded21.9 KiB21.9 KiB0 B (0.0%)24.4 KiB✅
ClaudeLive turn messages220 (0.0%)8✅

Baseline: e925dd6 · PR result: 2cddb9c · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Synced from GitHub

Review in Change Stack →

No actionable comments were generated in the recent review.

External image Recent review info
External image Run configuration
External image Commits

Reviewing files that changed from the base of the PR and between 44acda0091d26a5f0c2370641dd09f9104d8e99b and 2cddb9c43889319864d198ec18ef098869e2e194.

External image Files selected for processing: 4
  • apps/web/src/components/ChatMarkdown.tsx
  • apps/web/src/components/chat/MessagesTimeline.logic.test.ts
  • apps/web/src/components/chat/MessagesTimeline.logic.ts
  • packages/shared/src/String.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

Walkthrough

The change revises mobile and web activity timelines to present reasoning, active work, and tool groups with updated visibility and expansion rules. It also updates streaming text detection, work-log presentation, and Markdown math behavior.

Changes: Activity Timeline

Layer / File(s)Summary
Shared visibility and tool labels
packages/shared/src/String.ts, packages/client-runtime/src/state/threadDetail.ts, packages/client-runtime/src/work-log/presentation.ts, related tests
A shared helper detects non-whitespace text. Thread-detail streaming comparisons track whether assistant text is visible. Work-log presentation adds active tool labels for supported tool types.
Feed rows and active-work state
apps/mobile/src/lib/threadActivity.ts, apps/web/src/components/chat/MessagesTimeline.logic.ts, related tests
Mobile and web feed derivation present reasoning separately and group tool work. Thinking rows are suppressed when a qualifying streaming reply or active activity is present. Tests cover feed visibility, grouping, and lifecycle cases.
Work-group rendering and interactions
apps/mobile/src/features/threads/*, apps/web/src/components/chat/*, apps/web/src/index.css, docs/user/activity-log.md
Work-log components render grouped tool entries, reasoning, and Thinking rows without the former live-work row and shimmer presentation. Group expansion, row sizing, Markdown math, and activity-log instructions are updated.

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Feature

Sequence Diagram(s)

mermaid
1sequenceDiagram
2 participant ActivityFeed
3 participant MessagesTimelineLogic
4 participant MessagesTimeline
5 participant WorkGroupToggleTimelineRow
6 ActivityFeed->>MessagesTimelineLogic: activity entries and streaming state
7 MessagesTimelineLogic->>MessagesTimeline: derived work, work-toggle, and thinking rows
8 MessagesTimeline->>WorkGroupToggleTimelineRow: grouped entries and active-entry state

Possibly related issues

  • pingdotgg/t3code#28161: The issue reports turn folds hiding replies while leaving progress notes visible; this change updates turn-fold and work-log visibility.
  • pingdotgg/t3code#27238: The issue reports explanations appearing only as collapsed Thought rows; this change renders reasoning inline, but does not change server-side thinking promotion.
  • pingdotgg/t3code#25283: The issue concerns expanded thought-group layout on mobile; this change alters mobile reasoning grouping and work-log row presentation.
  • pingdotgg/t3code#28113: The issue identifies mobile work-row shimmer repainting; this change removes shimmer presentation from live work rows.

Suggested reviewers: juliusmarminge, yash-singh1, maria-rcks

Merge Risk: External image Minimal · up to 2cddb

No identified issue needs to be resolved before merging.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check nameStatusExplanationResolution
Description checkWarningThe description explains the problem, intended behavior, UI changes, known limits, screenshots, recordings, and verification command. However, it does not follow the required section structure and doe…Add explicit Problem, Change, Scope and approval, and Verification sections. Provide the linked triaged issue or maintainer approval with its approval comment, or explain why this focused fix qualifies for an exemption. List the focused tes…
Passed Passed checks: 3 passed
Check nameStatusExplanation
Title checkPassedThe title clearly and concisely identifies the main changes: inline thinking and folding completed work under “Worked for.”
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the problem, intended behavior, UI changes, known limits, screenshots, recordings, and verification command. However, it does not follow the required section structure and does not provide the required scope and approval information.

Resolution

Add explicit Problem, Change, Scope and approval, and Verification sections. Provide the linked triaged issue or maintainer approval with its approval comment, or explain why this focused fix qualifies for an exemption. List the focused test names or commands and their observed results, including anything not checked. Keep the before/after UI evidence in the Verification section and include the required agent model and harness statement if applicable.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Added 1 commit

  • feat(web,mobile): show thinking inline and fold finished work under Worked for2cddb9c