Skip to content

Render task checklists with update diffs and a composer progress panel - #19230

Merged
brennanb2025 merged 10 commits into
mainfrom
brennanb2025/nc-task-lists
Sep 9, 2026
Merged

brennanb2025 merged 10 commits into
mainfrom
brennanb2025/nc-task-lists

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​693 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​693
Prod 10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​659 $\color{#cf222e}{\Huge{\mathbf{−}}}$​116 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​543

Agent task updates render as inline checklists in the transcript, alongside a collapsible current-progress panel above the composer. The first list shows every task; later updates show added, removed, started, completed, and changed tasks with a full-list disclosure.

Claude TodoWrite, Codex update_plan, and live Codex turn/plan/updated notifications use the same normalizer. Historical baselines are scoped by tool name, task identity uses content plus occurrence, and prepending history updates memoized predecessor props. The composer keeps the latest successful snapshot across follow-up turns and pagination, preserves its disclosure during updates, and clears on an explicit empty list. Failed and malformed calls retain their transcript diagnostics.

Merged origin/main while preserving transcript caching, resolution receipts, and diff navigation. Validation: 154 tests passed across 14 focused suites, and changed-file oxlint passed. Hidden macOS Electron CDP captures show the first inline checklist, a subsequent update diff, and the expanded composer panel together in light and dark themes using a seeded on-disk Claude transcript in a folder workspace. Typecheck remains with the coordinator; live provider delivery, SSH, Windows, and Linux were not exercised.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds shared normalization for Claude TodoWrite and Codex update_plan task lists. Projects eligible Codex plan frames into task-list state while preserving unrelated transcript content. Updates native chat rendering to show a collapsible checklist with progress, statuses, explanations, and localization. Adds shared, renderer, and Codex tests for normalization, projection, state handling, and rendering.

Merge Risk: 🟡 Moderate · up to cc5d6

Task-list updates show only the latest checklist rather than the required per-tool change summary before the full list. This visible feature regression should be fixed before merge.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 17.39% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 18 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description explains the feature and reports validation, but it omits most required template sections and checklist items. Rewrite the description using the repository template. Add ELI5, What Changed, Why, Linked Issue with a valid issue number, Visual Proof with the required attachments or an explicit N/A reason, Testing details and platform coverage, AI Disc…
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main changes: task checklist rendering, update diffs, and the composer progress panel.
Full details: Docstring Coverage

Explanation

Docstring coverage is 17.39% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 18 files. (1 skipped: 1 unsupported.)

Full details: Description check

Resolution

Rewrite the description using the repository template. Add ELI5, What Changed, Why, Linked Issue with a valid issue number, Visual Proof with the required attachments or an explicit N/A reason, Testing details and platform coverage, AI Disclosure, Review, Agent skill upstream boundary, Notes, and the required Checklist status.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch brennanb2025/nc-task-lists

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.

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: bf0cd4ff-e8d8-4377-ac02-de302c0323fb

📥 Commits

Reviewing files that changed from the base of the PR and between 2ccf35b and 77cdcb9.

📒 Files selected for processing (15)
  • PLAN.md
  • src/renderer/src/components/native-chat/NativeChatMessageList.test.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageRow.tsx
  • src/renderer/src/components/native-chat/NativeChatTaskList.test.tsx
  • src/renderer/src/components/native-chat/NativeChatTaskList.tsx
  • src/renderer/src/components/native-chat/NativeChatToolRun.test.tsx
  • src/renderer/src/components/native-chat/NativeChatToolRun.tsx
  • src/renderer/src/components/native-chat/native-chat-task-list-history.test.ts
  • src/renderer/src/components/native-chat/native-chat-task-list-history.ts
  • src/renderer/src/i18n/locales/en.json
  • src/shared/native-chat-task-list.test.ts
  • src/shared/native-chat-task-list.ts
  • src/shared/native-chat-tool-icon.test.ts
  • src/shared/native-chat-tool-icon.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review.

for (const task of current.tasks) {
const occurrence = occurrences.get(task.content) ?? 0
occurrences.set(task.content, occurrence + 1)
const before = byContent.get(task.content)?.[occurrence]

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Match duplicate tasks by visible state before reporting changes.

Line 92 pairs duplicate content strictly by position. A reorder from [A pending, A completed] to [A completed, A pending] reports a false completion and reset, although the task list did not change.

Line 108 also reports updated when only activeForm changes on a pending or completed task. Those edits do not change nativeChatTaskLabel.

First match semantically identical same-content entries. Then compare unmatched entries by occurrence. Compare activeForm only when both tasks are in_progress. Add regressions for both cases. The design requires reorder-only changes to be omitted.

Also applies to: 108-108

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

ℹ️ No critical issues — a couple of minor suggestions inline.

Reviewed changes
A renderer-only change that renders TodoWrite and update_plan tool calls as inline checklists, diffing each tool family against its previous valid call across message and turn boundaries.

  • Pure shared model — native-chat-task-list.ts normalizes both tool families and computes a deterministic content+occurrence diff with three task states.
  • History threading — native-chat-task-list-history.ts derives per-message predecessors in one transcript pass and rebuilds tool rows on the existing FIFO pairToolBlocks pairing.
  • Rendering — NativeChatTaskList draws tri-state glyphs, progress, and a diff-then-disclosure layout; NativeChatToolRun swaps valid list calls in and folds successful results while leaving malformed/failed calls in the generic view.
  • Icon + i18n — update_plan maps to the todoList glyph; new English strings land under components.native-chat.taskList.

The normalizer/diff logic is sound and the test suite is tight — exact toEqual arrays and toBeNull checks rather than loose assertions. The memoization-through-pagination design (predecessor prop flips a memoized row from full list to diff) is verified end-to-end.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Comment thread src/shared/native-chat-task-list.ts Resolved
Comment thread PLAN.md Resolved

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

ℹ️ Delta reviewed — the planning artifact was removed; two prior minor suggestions remain open.

Reviewed changes
Delta since the prior pullfrog review: PLAN.md was removed from the repository root (resolving that thread), and main was merged in to resync. The remaining 14 files are byte-identical to the previously reviewed version, so no new issues were introduced.

Two minor suggestions from the prior review are still open and unaddressed:

  • NativeChatTaskList.tsx:54 — the sr-only status prefix duplicates the change label in diff rows (Completed: Completed Read).
  • native-chat-task-list.ts:108 — activeForm is compared for non-in_progress tasks, producing an updated diff with no visible change.

Neither blocks merge; both are follow-up nits.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

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

ℹ️ No new issues in this delta. The live Codex turn/plan/updated path projects cleanly through the same checklist/diff pipeline with solid frame-level coverage. The two minor threads from the prior review remain open and unchanged, so this is not a clean approval.

Reviewed changes
Delta since the prior pullfrog review: live Codex plan notifications now render as checklists.

  • Notification projection — projectNativeChatTaskListFrames maps a Codex notification:turn/plan/updated system message to a settled update_plan tool-call block client-side, running after tool folding so a notification never consumes another call's result.
  • CamelCase status normalization — normalizeNativeChatTaskList now accepts Codex's inProgress status for the update_plan family, so the notification and tool-call paths share one status model.
  • Wiring + tests — NativeChatMessageList projects frames before computing predecessors; new tests cover pagination-driven diff refresh, tool-family independence, malformed/truncated/other-provider/plan-document passthrough, and byte-identical plan-document translation.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Manual UI validation — task lists render as checklists

Driven in the real Orca Electron app (dev build of this branch, fresh isolated profile, hidden renderer over CDP). Both providers were exercised through the real transcript decoder and the real native-chat pane — no component harness.

Claude TodoWrite — first list, then a second update (dark)
01-dark-checklist-and-diff.png
The first list (no predecessor) renders in full at Tasks 1/5 with three distinct states — completed struck through, in-progress bold using its activeForm, pending muted — and the second update leads with only what changed (Completed…, Started…, Added…) at Tasks 2/6 instead of reprinting the list.

The same second update with "Full task list" expanded (dark)
02-dark-full-list-expanded.png
The disclosure under the diff opens the complete current list, so the full state is still one click away after a diff.

Same two updates in light theme
03-light-checklist-and-diff.png
Status colour, weight and strikethrough all stay legible on the light palette; nothing is hard-coded to the dark tokens.

Codex update_plan — first plan, then a revision (light)
04-light-codex-update-plan.png
Codex plans go through the same renderer: Tasks 1/4 full list then Tasks 2/5 change-led, inProgress maps onto the in-progress state, and the plan explanation renders under each list.

Codex update_plan in dark theme
05-dark-codex-update-plan.png
Same Codex run on the dark palette, for parity with the Claude shots.

Verdict

All five checks pass: checklist rendering with distinct states rather than a generic tool line, a visible completed/total progress indicator, change-led second updates, a full (not bogus-diff) first list, and correct treatment in both themes. No regression seen in the surrounding transcript — prose turns, tool-run folding and the composer all render as before.

Not covered

I could not exercise the live notification:turn/plan/updated projection end to end. I did launch a real structured Codex session on this branch, but update_plan was not offered in that app-server session (one model replied that the tool "isn't available in this session"; another completed the task without planning), so no plan notification was ever emitted to project. That is an environment limitation, not a signal about this PR — the update_plan rendering it feeds into is proven by the two Codex shots above, and the projection itself has renderer-level coverage in NativeChatMessageList.task-list-frames.test.tsx.

@brennanb2025

brennanb2025 commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor Author

Status: ready for review

Plan review

Reviewed before any code was written. APPROVE WITH AMENDMENTS, all applied. The one that mattered: predecessor lookup had to be scoped by tool name, or a subagent or MCP call interleaving a differently-shaped list could become a bogus diff baseline and produce a confidently wrong "Completed X". Also pinned: identity is content+occurrence, the memoized predecessor prop must change referentially when pagination prepends history, and update_plan needed adding to the icon vocabulary so the two providers don't diverge visually.

The find that mattered most

The reviewer noticed the checklist rendered only when update_plan arrived as a tool call — but on a live session it arrives as a turn/plan/updated notification. I verified this against the provider protocol directly: that notification carries plan: Vec<TurnPlanStep>, the checklist itself. Shipping as planned would have rendered correctly in every test and shown nothing in a real session. Both paths now converge on one normalizer, with the plan-document path pinned byte-identical by a test so this change cannot capture a parallel lane's territory.

Code review loop

Same-model subagent review returned clean. readiness-checklist at start and end, both passing for scoped code review including the mobile compatibility skill. 1221 tests across 114 suites, plus 22 final focused tests.

Verification

  • Central typecheck: exit 0. This required fixing a layering violation: a renderer test imported unhandled-provider-frame.ts from src/main, and that single import dragged the whole main-process dependency tree into the web tsconfig project, cascading into 11 errors. Fixed by constructing the fixture from shared types — not by widening tsconfig.tc.web.json, which would have silently permitted every future violation.
  • Merged with origin/main, two parents verified.

Manual UI validation

Real Orca dev build, hidden renderer over CDP. 5 screenshots attached above. Checklist renders with distinct pending / in-progress / completed states; progress indicator present; a second update leads with only what changed; a first list with no predecessor shows the full list rather than a fabricated diff; both themes correct.

Known gap, reported rather than papered over: the live turn/plan/updated projection could not be exercised end to end. A real structured session was launched, but the provider never offered update_plan in it, so no notification was emitted to project. That is an environment limitation, not a signal about this PR — the rendering it feeds is proven by the two screenshots above, and the projection itself has renderer-level coverage in NativeChatMessageList.task-list-frames.test.tsx.

Process deviations, stated plainly

  • The review loop's $orchestration arm was not used. Nested worker depth is 1 in this install, so a dispatched worker cannot dispatch its own workers (nested_worker_depth_exceeded). The UI validation lane was run directly by the coordinator at depth 0. The substance of the loop — subagent review to clean, readiness bookends, independent UI validation with visual evidence — was carried out in full.
  • readiness-checklist's severity-counsel step was unavailable for the same depth reason, and is recorded as unavailable rather than reported as a verdict.
  • Validation ran on Claude, not the originally-planned agent, which ran out of quota mid-programme.

Known-red, not caused by this PR

structured-agent-session-adoption-replay.test.ts:188 fails on a clean detached origin/main checkout — reproduced independently by two lanes, byte-identical failure. It is a pre-existing break on main and was deliberately not touched.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@brennanb2025 brennanb2025 changed the title Render native chat task lists as checklists with update diffs Keep native chat task progress above the composer Sep 8, 2026

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: b77115bc-f853-4539-b9a7-e3b9d1b5d39c

📥 Commits

Reviewing files that changed from the base of the PR and between d0506bf and cc5d6f1.

📒 Files selected for processing (13)
  • src/main/codex/codex-structured-item-translation.test.ts
  • src/renderer/src/components/native-chat/NativeChatMessageList.task-list-frames.test.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.tsx
  • src/renderer/src/components/native-chat/NativeChatTaskList.test.tsx
  • src/renderer/src/components/native-chat/NativeChatTaskList.tsx
  • src/renderer/src/components/native-chat/native-chat-task-list-frames.ts
  • src/renderer/src/components/native-chat/native-chat-task-list-state.test.ts
  • src/renderer/src/components/native-chat/native-chat-task-list-state.ts
  • src/renderer/src/i18n/locales/en.json
  • src/shared/native-chat-task-list.test.ts
  • src/shared/native-chat-task-list.ts
  • src/shared/native-chat-tool-icon.test.ts
  • src/shared/native-chat-tool-icon.ts
🚧 Files skipped from review as they are similar to previous changes (5)
  • src/shared/native-chat-tool-icon.test.ts
  • src/shared/native-chat-tool-icon.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/components/native-chat/native-chat-task-list-frames.ts
  • src/main/codex/codex-structured-item-translation.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review.

for (const message of messages) {
const projection = projectMessage(message)
if (projection.list) {
list = projection.list

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.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Preserve the preceding snapshot and its tool family.

Line 59 overwrites the prior valid list. The returned state then contains only the final tool-agnostic list. projectMessage also removes the source tool blocks from the transcript.

The renderer cannot compare successive TodoWrite or update_plan lists, scope comparisons by tool family, or render updates before the full current checklist. Return task-list history or an explicit previous/current update model with the originating tool family. Update the renderer and tests to consume that model.

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

✅ No new issues found.

Reviewed changes — delta since the prior pullfrog review (commit cc5d6f1).

  • Pinned panel replaces diffed checklists — NativeChatTaskList is now a single uncontrolled Collapsible ("Tasks" + completed/total + chevron) pinned above the composer, rendering the full checklist directly with no per-call diff rows.
  • State projection — native-chat-task-list-state.ts replaces the predecessors/history module with one pass over the transcript that keeps the latest valid snapshot and strips consumed task-call/result blocks, leaving prose and other tools intact.
  • Dead code removed — diffNativeChatTaskLists, NativeChatTaskChange, the change-label i18n strings, and the previousTodoWrite/previousUpdatePlan prop threading through NativeChatMessageRow/NativeChatToolRun are all gone; update_plan now shares the todoList glyph.
  • Both prior nits resolved — the sr-only status-prefix duplication and the non-in_progress activeForm diff were anchored to the removed diff feature and no longer apply.

The projection keeps transcript length/order 1:1, so the pre-computed turnKeys/latestUserIndex indices stay aligned; failed/isError/malformed calls remain in the transcript with diagnostics; and MessageRow already returns null for empty rows, so consumed notification frames render no ghost bubble.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@brennanb2025 brennanb2025 changed the title Keep native chat task progress above the composer Render task checklists with update diffs and a composer progress panel Sep 9, 2026
@brennanb2025

Copy link
Copy Markdown
Contributor Author

This supersedes the earlier composer-only screenshots. Both surfaces now coexist: the transcript shows the initial full checklist and subsequent update diff, while the composer shows the latest 1/3-complete snapshot.

Light theme — initial checklist, historical update diff, and expanded composer panel:
Both task checklist surfaces, light theme

Dark theme — the same two surfaces and task state:
Both task checklist surfaces, dark theme

Captured through CDP from a fresh hidden macOS Electron build with an isolated profile and a seeded on-disk Claude transcript in a folder workspace. Expanded both transcript runs and the composer panel through the actual UI. The 154 focused tests cover tool-scoped baselines, duplicate task identity, pagination, first-list rendering, composer state, and Codex notification normalization; changed-file oxlint passed. Live provider delivery and remote/platform validation were not exercised.

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

ℹ️ No critical issues — the restored diff feature re-introduces the two minor nits that were previously resolved by its removal.

Reviewed changes — delta since the prior pullfrog review (commit cc5d6f1).

  • Restored inline diff checklists — diffNativeChatTaskLists/NativeChatTaskChange and native-chat-task-list-history.ts (nativeChatTaskListPredecessors + buildNativeChatTaskListRows) are back: the first TodoWrite/update_plan call renders the full list, later updates render added/removed/started/completed/changed rows with a full-list disclosure.
  • Dual-surface rendering — NativeChatTaskList gains previous and presentation props: inline rows diff against predecessors, while the pinned panel uses presentation="composer" for the latest snapshot.
  • State projection no longer consumes blocks — native-chat-task-list-state.ts now returns messages unchanged and only selects the latest snapshot, so task calls/results stay in the transcript for the inline renderer.
  • Merged origin/main — reconciled the transcript projection, resolution receipts, and diff navigation with the task-list wiring.

The restored diff/normalizer logic is byte-for-byte the code reviewed and approved earlier, and the composer-panel presentation is a clean addition. The two nits below are the same observations raised on the original diff design; they went away when the feature was removed and have returned verbatim with this restoration.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

)}
>
<Icon aria-hidden className="mt-0.5 size-3.5 shrink-0" />
<span className="sr-only">{statusLabel(task)}: </span>

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.

In diff mode label already carries the change verb (e.g. Completed Read), so this unconditional sr-only prefix makes screen readers announce redundant text like Completed: Completed Read. Skip the {statusLabel(task)}: prefix when a label is passed.

: 'pending',
task
})
} else if (before.activeForm !== task.activeForm) {

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.

activeForm is stored on every todowrite task regardless of status, but nativeChatTaskLabel only surfaces it while in_progress. This branch therefore reports an updated diff when a completed or pending task's activeForm changes, even though changeLabel collapses the label back to the plain content with no visible difference. Compare activeForm only when task.status === 'in_progress'.

@brennanb2025
brennanb2025 merged commit d15a6df into main Sep 9, 2026
26 of 28 checks passed
Jinwoo-H added a commit that referenced this pull request Sep 9, 2026
#19230 added a second import of the same module, and the focused
code-quality gate (import/no-duplicates, --deny-warnings) fails every PR
opened on main since it merged.

Claude-Session: 1fec75fd-224b-46ab-95fe-d88e0f3d9ff9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant