Repository navigation
feat(site/src): render fork search_chats and read_chat_transcript calls as cards - #97
Conversation
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d4e684b03f
ℹ️ 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".
…ty transcript page
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Closing and reopening only to make GitHub recompute the merge ref against current main ( |
The merge ref now points at current main ( |
Merge evidence for head
|
Part of #74 (second of three PRs, after #87).
With
fork-chat-todoson,search_chatsandread_chat_transcripttool calls rendered as the generic JSON row. They now render as cards built on the #87 hooks:search_chats: "Found 3 chats" (or "Found 1 chat", "No chats found"), expandable to the query and one link per chat with its title, status and whether it is shared with you. "More chats available" shows when the result has more pages. While the call runs, "Searching chats…" shows the streamed query.read_chat_transcript: "Read 4 messages from ", expandable to a link to that chat and one line per message: its role plus a one-line preview of its first part (text, or the tool name of a tool call or result), with a count of parts the tool omitted. "More messages available" shows when the result has more pages.Links keep the current query string, like the
list_agentscard. With the experiment off, rows look exactly like upstream.This PR touches no upstream file: it adds the two cards, registers them in
forkToolRenderers.tsx, adds their icons (SearchIcon,MessagesSquareIcon) toforkToolIcons.ts, and adds their rows toforkToolShowcaseItems. Both cards render chat links through a newForkChatLink, and all three fork cards (the todo card included) read a failed call's error text throughforkToolErrorMessage. The result shapes matchcoderd/x/chatd/fork_search_chats.goandfork_chat_transcript.go.Tests
ForkSearchChatsTool.stories.tsxandForkChatTranscriptTool.stories.tsx: Found or Read, Running or Reading, Empty, HasMore, Failed, ExperimentOff, UnparsableResult. Visual states only, for Pixel. The results they render areMockSearchChatsResultandMockChatTranscriptResultintestHelpers/forkChatTodos.ts, which the showcase rows reuse.createForkToolRenderers, so they cover the new names.Local:
pnpm lint,tsc, unit Vitest forChatElements/tools(301 tests), Storybook Vitest for both new story files plusForkTodoTool.storiesandTool.stories(180 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 calls (no seeded rows). With the flag on,search_chatswithtitle:W9shows "Found 4 chats" expanding to the query and four chat links, andread_chat_transcriptwith limit 4 shows "Read 4 messages from W9 todo tool cards" expanding to the chat link, four message lines and "More messages available". Checked in dark and light themes. A second chat makes both calls fail: an unknown chat ID shows "Failed to read chat transcript" with the server's "does not exist or your user cannot read it" error, andstatus:bogusshows "Failed to search chats" with the invalid-query error. With the experiment list served withoutfork-chat-todos, the first chat shows upstream's generic rows.