Skip to content

feat(site/src/pages/AgentsPage): render fork todo tool calls as checklist cards - #87

Merged
ibetitsmike merged 5 commits into
mainfrom
mike/fork-tool-cards-1-todo-cards
Nov 10, 2026
Merged

ibetitsmike merged 5 commits into
mainfrom
mike/fork-tool-cards-1-todo-cards

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Xum opened this PR on behalf of @ibetitsmike.

Part of #74 (first of three PRs).

With fork-chat-todos on, todo_write and todo_read tool calls rendered as the generic JSON row. They now render as a checklist card that reuses the todo pill's checklist:

  • todo_write: "Updated todos (1/3 done)", expandable to the stored list. While the call runs, "Updating todos…" lists the requested items once its args finish streaming (the stream parser omits a partial array, so the list stays hidden until then). An empty list reads "Cleared todos".
  • todo_read: "Read todos (n/m done)" or "No todos".
  • A failed call reads "Failed to update todos" or "Failed to read todos", with the error as the expandable detail. A failed write hides its requested list, since nothing was stored.
  • A result the card cannot parse falls back to the generic row.

With the experiment off, or when Tool renders without a DashboardProvider (upstream's tool stories), rows look exactly like upstream, including the wrench icon.

Fork hooks

Each upstream file gets one line, so upstream syncs stay clean:

  • Tool.tsx spreads createForkToolRenderers(GenericToolRenderer). forkToolRenderers.ts becomes .tsx: it gates each fork renderer on its experiment through DashboardContext and hands the renderer a fallback for output it cannot parse. Fork renderers now use the real tool names instead of a reserved fork_ prefix; the test checks that no fork name collides with an upstream or subagent renderer name.
  • ToolIcon.tsx spreads forkToolIcons, keyed by a fork icon name (fork_todo), not the tool name, so a flag-off row keeps the upstream icon.
  • Tool.stories.tsx spreads forkToolShowcaseItems, so the every-renderer policy badge story still covers every name.

ChatTodoPill.tsx now exports ChatTodoChecklist and formatChatTodoProgress; the pill uses them unchanged.

Tests

  • ForkTodoTool.stories.tsx: Updated, Updating, Cleared, Read, ReadRunning, ReadEmpty, Failed, ReadFailed, ExperimentOff, UnparsableResult. Visual states only, for Pixel.
  • forkToolRenderers.test.ts: fork renderer names do not collide with upstream renderers.
  • toolIconsCoverage.test.ts: fork renderer names are exempt from the by-tool-name icon lookup, because their cards pass a fork icon name.

Local: pnpm lint, tsc, unit Vitest for ChatElements/tools (301 tests), Storybook Vitest for ForkTodoTool.stories and Tool.stories (166 tests).

UAT

Dev frontend at this head against a local fork server with fork-chat-todos, a member chat on a real model making real todo_write and todo_read calls (no seeded rows). With the flag on, the timeline shows "Updated todos (1/3 done)" expanding to the checklist (done, in progress, pending, cancelled struck through), "No todos" for the read (the model issued it in parallel with the write, so it read the list before the write landed), and "Cleared todos" for a later write of an empty list. A write the server rejects (duplicate todo id) shows "Failed to update todos" with the server error. With the experiment list served without fork-chat-todos, the same chat shows upstream's generic todo_write and todo_read rows with the wrench icon.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T01:25:43.357983Z 8b45544 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike.

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a827716b9f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 8b45544425

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum (AI agent) closed and reopened this on behalf of @ibetitsmike.

Closing and reopening only to make GitHub recompute the merge ref against current main (741fc8a969) and run fork-ci on it. The head is unchanged.

@ibetitsmike ibetitsmike reopened this Nov 10, 2026
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum (AI agent) closed and reopened this again on behalf of @ibetitsmike.

The merge ref now points at current main (741fc8a969), but the run started by the first reopen was queued against the old merge ref. This second reopen starts fork-ci on the recomputed merge. The head is unchanged.

@ibetitsmike ibetitsmike reopened this Nov 10, 2026
@ibetitsmike
ibetitsmike merged commit 54351e1 into main Nov 10, 2026
21 of 28 checks passed
@ibetitsmike
ibetitsmike deleted the mike/fork-tool-cards-1-todo-cards branch November 10, 2026 02:23
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum (AI agent) merged this on behalf of @ibetitsmike.

Merge evidence for head 8b4554442523fa4ab472a6b7175faa7eaea65200:

  • fork-ci pull_request run 42740126213 passed; its build job checked out Merge 8b45544425 into 741fc8a969 (current main, deployed and healthy at 02:21Z). All checks green.
  • Codex review round 2 on this exact head: no major issues. The round 1 finding (streamed partial todo_write arrays) is fixed, replied to and resolved; 0 unresolved review threads. Merge state CLEAN. The change is under site/ only.
  • UAT as described in the PR body: a member chat on a real model made real todo_write and todo_read calls. With fork-chat-todos on, the calls render as checklist cards (updated, read, cleared, and a server-rejected write). With the experiment off, the same chat shows upstream's generic rows.

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