Skip to content

fix(web): Keep running, stopped, and failed rows visible in the work log - #4762

Open
mwolson wants to merge 331 commits into
pingdotgg:t3code/codex-turn-mappingfrom
mwolson:fix/web-timeline-inflight-tool-rows
Open

fix(web): Keep running, stopped, and failed rows visible in the work log#4762
mwolson wants to merge 331 commits into
pingdotgg:t3code/codex-turn-mappingfrom
mwolson:fix/web-timeline-inflight-tool-rows

Conversation

@mwolson

@mwolson mwolson commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

What Changed

The web work log keeps the rows that tell you what a turn is doing. Running tools stay in the log with a spinner. Interrupted tools stay visible without a success check. Collapsed work logs still show an active or interrupted tool even when newer rows would have pushed it out.

When a provider fails and the turn has no assistant message, the failed error stays in the timeline instead of only the sidebar. Recovered retries still fold like ordinary work.

Why

The server already had the right items. The web timeline treated running and interrupted tools like noise. When a finished turn collapsed its work log, it kept a final assistant message but hid a failed error, so the error only showed in the sidebar.

This is web-only. Mobile does not share these filters.

UI Changes

Running and stopped tool rows remain visible, including in compact work logs. Failed provider errors remain visible on settled turns with no assistant message. Stopped tools have no extra glyph. The interrupt row still carries the stop marker.

No before/after screenshots. Checked on a Codex turn in the web app: a foreground command showed a spinner while running, and after Stop the row stayed without a spinner or success check. A live failed provider turn had the error folded away before this change.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Medium Risk
Large mobile thread/orchestration migration affects caching, runtime gating, and user-facing archive/stop behavior; removing the thread-transfer report workflow is low risk but changes PR observability for transfer regressions.

Overview
Removes the CI “thread transfer impact” PR comment pipeline by deleting thread-transfer-report.yml and the trusted publisher scripts/tests that validated artifacts and upserted comparison comments. Server test shards can still upload thread-transfer-results artifacts; nothing in this diff publishes them to PRs anymore.

Mobile is moved onto shared V2 orchestration client-runtime paths. SQLite shell/thread caches now encode/decode via StoredOrchestration* schemas and ORCHESTRATION_CACHE_SCHEMA_VERSION, with tests for DateTime round-trips. Connection wiring swaps in boundedThreadSnapshotLoaderLayer and threadHistoryControllerLayer. Thread UI and actions follow projection/runtime models (useSelectedThreadProjection, thread.runtime vs legacy session, RuntimeRequestId for approvals/user input with responseCapability gating). New or expanded UX includes thread queue control, relationships banner, activity inspector (files, rollback), visit watermark dispatch, and threadCanArchive rules that allow archive when queued work has no active provider run. Review/checkpoints derive from ThreadCheckpointSummary / deriveThreadCheckpointSummaries.

Smaller follow-ons: CI installs build-essential so ACP process-tree live tests always compile their pthread fixture; README links appearance docs; desktop exposes userDataDirName / legacy dir names in tests; marketing updates the Cursor harness label; mobile theme generator adds adaptive color tokens used by the new inspector surfaces.

Reviewed by Cursor Bugbot for commit 05f47ec. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Keep running, stopped, and failed rows visible in the work log and build orchestration V2 foundation

  • Adds derivePendingBackgroundWork to derive a post-settlement pending-work roster from provider-thread tasks and nonterminal turn items, gating on latest-run settlement and excluding rolled-back items
  • Updates isOrchestrationV2TurnItemVisible to hide items from rolled-back runs, queued user messages from cancelled runs, and unpaired superseded interruption results
  • Adds T3 MCP tool presentation resolver with display labels and logos for known orchestration, delegation, scheduling, and worktree tools
  • Adds the full orchestration V2 server and client runtime: provider adapters for Claude, Codex, Cursor, Grok, and OpenCode; event store, projection store, command receipt store, effect outbox, checkpoint services, session manager, run execution, thread lifecycle, context handoff, scheduled tasks, and legacy V1 importer
  • Adds database migrations 044–052, V2 contracts, MCP orchestrator and worktree toolkits, bounded thread snapshot loading, web/mobile UI components for queue control, thread details, relationships, and activity inspection
  • Risk: migrations 044–052 create new tables and backfill columns from existing payloads; the IPC EnvironmentApi replaces the legacy orchestration property with orchestrationV2, removing turn-diff and archived-shell methods

Macroscope summarized 05f47ec.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d63aaf22-b302-4873-a096-e3875d635abe

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Jul 28, 2026
Comment thread apps/web/src/components/chat/MessagesTimeline.tsx
@mwolson mwolson changed the title fix(web): Keep in-flight and stopped tool rows in the work log fix(orchestrator): Keep in-flight and stopped tool rows in the work log Jul 28, 2026
@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels Jul 28, 2026
@mwolson
mwolson force-pushed the fix/web-timeline-inflight-tool-rows branch from caf6f38 to d30b4a7 Compare July 28, 2026 17:55
@mwolson
mwolson force-pushed the fix/web-timeline-inflight-tool-rows branch from 5a7eae3 to 257f810 Compare July 28, 2026 18:36
@mwolson
mwolson force-pushed the fix/web-timeline-inflight-tool-rows branch from 257f810 to 365949a Compare July 28, 2026 18:55
@mwolson
mwolson marked this pull request as ready for review July 28, 2026 18:55
Comment thread apps/web/src/components/chat/MessagesTimeline.tsx Outdated
@macroscopeapp

macroscopeapp Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This range contains a 331-commit, 955-file orchestration V2 migration with new production workflows, persistence migrations, public API changes, authentication updates, and mobile/server integrations—not just the stated web work-log fix. Unresolved timeline rendering issues and the added product-default and static-analysis override changes add further review risk.

Not approved because:

  • 1 blocking correctness issue found at or above your repo's Minimum Blocking Severity

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jul 28, 2026
@macroscopeapp
macroscopeapp Bot dismissed their stale review July 28, 2026 19:18

Dismissing prior approval to re-evaluate 7d5e55c

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Jul 28, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jul 28, 2026
juliusmarminge and others added 16 commits August 31, 2026 21:33
Retain pending admission after transient status failures and use one generation-owned retry worker. Ignore stale timers and duplicate evidence so older prompts cannot finish newer steering.

Finding: R14 status reconciliation

Model: GPT-5.6 Sol via Codex
Keep hidden local and inherited rows from consuming history pages. Preserve stop-request dependencies, source-run cutoffs, and imported history while loading related metadata from the selected cohort and using indexed watermark lookups.

Finding: P01 bounded history visibility

Model: GPT-5.6 Sol via Codex
Adapt grouped tool summaries and the floating working timer to V2 run, attempt, and queue state. Bring over the composer, keyboard, and disclosure transitions while retaining the V2 activity inspector and queue controls.

Keep OV2 web composer and grouping behavior intact; share only the existing command label parser with mobile.
Restores main features dropped by the policy replay: pingdotgg#8569 theme wiring,
pingdotgg#8850 composer banner follow-ups, pingdotgg#8855/pingdotgg#8904 composer fixes, pingdotgg#8831
settings search rework, pingdotgg#8803 workspace-mutation refresh (v2-adapted),
pingdotgg#8840 circle-alert, pingdotgg#8584 codex artifact templates, pingdotgg#8688/pingdotgg#8807/pingdotgg#8936
video + image previews (web and mobile, v2-adapted), pingdotgg#8862 Expo glass,
and the round's docs. Timeline thinking rows (pingdotgg#8984) stay on the v2
work-live system.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch from a6e0049 to 50a57b6 Compare September 1, 2026 05:36
juliusmarminge and others added 3 commits September 1, 2026 00:24
The v2 equivalents of main's pingdotgg#8984 and pingdotgg#8922: a "Working for ..." header
anchors the active run, the trailing live tool row survives between
actions in past tense instead of vanishing, and a shimmering Thinking
row marks reasoning gaps. During workspace preparation the header shows
"Setting up worktree..." (driven by the local dispatch flag or the v2
run's preparing status, so remote viewers see it too), the composer
footer span is gone, and draft promotion waits until the run starts or
startup fails instead of navigating mid-preparation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mwolson
mwolson force-pushed the fix/web-timeline-inflight-tool-rows branch from 38109f8 to a9f243a Compare September 1, 2026 23:26
@macroscopeapp
macroscopeapp Bot dismissed their stale review September 1, 2026 23:26

Dismissing prior approval to re-evaluate a9f243a

if (
entry.id !== group.terminalEntry?.id &&
!timelineEntryIsPersistentResourceCard(entry) &&
!timelineEntryIsTerminalError(entry)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium chat/MessagesTimeline.logic.ts:783

A failed itemType: "error" with tone: "info" is rendered as a generic work-toggle instead of a work error row, so the provider error detail remains hidden and the expected provider-error-entry row never appears. deriveTurnFolds now leaves these entries visible, but the rendering branch only recognizes tone === "error"; update that branch to also recognize timelineEntryIsTerminalError.

🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/components/chat/MessagesTimeline.logic.ts around line 783:

A failed `itemType: "error"` with `tone: "info"` is rendered as a generic `work-toggle` instead of a `work` error row, so the provider error detail remains hidden and the expected `provider-error-entry` row never appears. `deriveTurnFolds` now leaves these entries visible, but the rendering branch only recognizes `tone === "error"`; update that branch to also recognize `timelineEntryIsTerminalError`.

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two of these findings look like fallout from rebasing onto t3code/codex-turn-mapping: the collapsed work-log UI this PR's round-4 repair targets (a per-group visible cap and a "+N previous tool calls" expander) does not exist on this base, so the new selector, its constant, and the component tests written against it have nothing to attach to.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/chat/MessagesTimeline.logic.ts
Comment thread apps/web/src/components/chat/MessagesTimeline.tsx
Comment on lines +2505 to +2557
structuredPayload: { status: row.itemStatus } as OrchestrationV2TurnItem,
},
};
});

// Collapsed groups used to keep only slice(-1), so a later completed tool
// buried the running or stopped row the work-log filter retained.
it("keeps pinned running and stopped tools visible in a collapsed work group", () => {
const runningAndCompleted = renderToStaticMarkup(
<MessagesTimeline
{...buildProps()}
timelineEntries={multiToolWorkEntries([
{ id: "running", label: "Active shell", itemStatus: "running" },
{ id: "completed", label: "Finished shell", itemStatus: "completed" },
])}
/>,
);
expect(runningAndCompleted).toContain("Active shell");
expect(runningAndCompleted).toContain("Finished shell");
expect(runningAndCompleted).toContain("lucide-loader-circle");
expect(runningAndCompleted).not.toContain("previous tool");

const stoppedAndCompleted = renderToStaticMarkup(
<MessagesTimeline
{...buildProps()}
timelineEntries={multiToolWorkEntries([
{ id: "stopped", label: "Interrupted shell", itemStatus: "interrupted" },
{ id: "completed", label: "Finished shell", itemStatus: "completed" },
])}
/>,
);
expect(stoppedAndCompleted).toContain("Interrupted shell");
expect(stoppedAndCompleted).toContain("Finished shell");
expect(stoppedAndCompleted).toContain(', stopped"');
expect(stoppedAndCompleted).not.toContain("previous tool");
});

it("does not pin pending or waiting rows in a collapsed work group", () => {
const markup = renderToStaticMarkup(
<MessagesTimeline
{...buildProps()}
timelineEntries={multiToolWorkEntries([
{ id: "pending", label: "Queued shell", itemStatus: "pending" },
{ id: "waiting", label: "Blocked shell", itemStatus: "waiting" },
{ id: "completed", label: "Finished shell", itemStatus: "completed" },
])}
/>,
);

expect(markup).toContain("Finished shell");
expect(markup).not.toContain("Queued shell");
expect(markup).not.toContain("Blocked shell");
expect(markup).toContain("+2 previous tool calls");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These collapsed-work-group cases assert against UI that does not exist on this target branch. Work groups render row.summary through WorkGroupToggleTimelineRow (e.g. Ran 2 commands), there is no +N previous tool calls expander string anywhere in MessagesTimeline.tsx, and no per-group visible cap that could hide Queued shell/Blocked shell — so both the pinned-row and the not-pinned expectations fail rather than guarding the fix.

Suggest retargeting them at the work-live/work-toggle row model (or removing them alongside the unused selectCollapsedWorkLogEntries) so the suite matches the shipped work-group rendering.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/ChatView.tsx

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a9f243a. Configure here.

entry.id !== group.terminalEntry?.id &&
!timelineEntryIsPersistentResourceCard(entry) &&
!timelineEntryIsTerminalError(entry)
) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Collapsed groups hide pinned tool rows

High Severity

selectCollapsedWorkLogEntries is never used when building or rendering work groups. Settled groups still emit only a work-toggle that hides every row, so running and stopped tools stay behind the summary instead of remaining visible in the compact log. The +N previous tool calls expander the new tests expect is also never rendered.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a9f243a. Configure here.

entry.id !== group.terminalEntry?.id &&
!timelineEntryIsPersistentResourceCard(entry) &&
!timelineEntryIsTerminalError(entry)
) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed errors stay behind work toggle

Medium Severity

deriveTurnFolds now keeps failed itemType === "error" entries out of the turn fold, but row emission still treats projected provider errors as ordinary work because their tone is info. They become a work-toggle labeled Provider error, so the failure detail stays hidden unless the group is expanded.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a9f243a. Configure here.

@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch 2 times, most recently from 6081201 to 95bacdd Compare September 2, 2026 07:19

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The selectCollapsedWorkLogEntries selector plus its collapsed-group tests, and the unused workingStepLabel / pendingBackgroundTasks props, are still in the state described in the earlier threads on MessagesTimeline.logic.ts:76, MessagesTimeline.test.tsx:2557, and MessagesTimeline.tsx:243MAX_VISIBLE_WORK_LOG_ENTRIES now type-checks, but nothing in MessagesTimeline.tsx calls the selector and the shipped work group still renders every visible entry with no per-group cap or expander. Not re-raising those inline.

Posted via Macroscope — UI Consistency

Comment on lines +2410 to +2411
const workRow = (itemStatus: OrchestrationV2TurnItem["status"] | undefined) => {
const toolLifecycleStatus = toolLifecycleStatusForItemStatus(itemStatus);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These fixtures never reach SimpleWorkEntryRow, so the new lifecycle assertions do not exercise the indicators they describe. beforeEach resets activityTestState.expanded to false, and a tone: "tool" entry with a settled run (isWorking: false, latestRun: null) derives a collapsed work-toggle row (MessagesTimeline.logic.ts:1105), which renders only row.summary — no spinner and no lifecycle-suffixed aria-label. expect(markup).toContain("lucide-loader-circle") and toContain(', stopped"') therefore fail, while toContain("Ran command") passes only because that is also the group summary text.

The neighboring failed-marker case opts into the expanded path explicitly; suggest doing the same in this helper so the rows under test are the ones the PR changed:

Suggested change
const workRow = (itemStatus: OrchestrationV2TurnItem["status"] | undefined) => {
const toolLifecycleStatus = toolLifecycleStatusForItemStatus(itemStatus);
const workRow = (itemStatus: OrchestrationV2TurnItem["status"] | undefined) => {
activityTestState.expanded = true;
const toolLifecycleStatus = toolLifecycleStatusForItemStatus(itemStatus);

Posted via Macroscope — UI Consistency

@macroscopeapp

macroscopeapp Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Macroscope skipped reviewing this pull request. Per-review cost limit exceeded (workspace setting).

This review would cost an estimated $248.57, which exceeds your per-review limit of $10.00.

The top 3 files driving up this estimate:

File Diff Size Estimate
apps/server/src/orchestration-v2/Orchestrator.ts 277.03KB $13.85
apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.ts 272.17KB $13.61
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts 230.26KB $11.51

Tip

To get this pull request reviewed, you can:

  1. Comment @macroscope-app on this PR to request a manual review (monthly spend limits still apply).
  2. Exclude the file(s) above from review by adding a pattern to your .macroscope/ignore.md — note that creating this file replaces Macroscope's built-in default ignores rather than extending them.
  3. Raise your cost limit in your workspace billing settings.

Turn off this reminder going forward

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants