Repository navigation
refactor(site/src/pages/AgentsPage): split ChatMessageItem into live and persisted rows - #29900
Closed
DanielleMaywood wants to merge 4 commits into
Closed
DanielleMaywood wants to merge 4 commits into
DanielleMaywood wants to merge 4 commits into
Conversation
DanielleMaywood
force-pushed
the
nullability/conversation-tools
branch
2 times, most recently
from
September 29, 2026 14:29
8fd105a to
68e6991
Compare
DanielleMaywood
force-pushed
the
nullability/chat-message-rows
branch
from
September 29, 2026 14:36
e0c5618 to
59c458a
Compare
DanielleMaywood
force-pushed
the
nullability/conversation-tools
branch
from
October 6, 2026 08:07
75a2e38 to
b074f1b
Compare
DanielleMaywood
force-pushed
the
nullability/chat-message-rows
branch
from
October 6, 2026 09:27
59c458a to
65b3e32
Compare
DanielleMaywood
force-pushed
the
nullability/conversation-tools
branch
from
October 6, 2026 11:12
b074f1b to
15526c0
Compare
DanielleMaywood
force-pushed
the
nullability/chat-message-rows
branch
from
October 6, 2026 11:16
65b3e32 to
b7e4e46
Compare
…nd tool props ChatPageTimeline always passes stream tools, live status, subagent maps and the stream flags to ConversationTimeline, and every hop below it (ChatMessageItem, AssistantOutput, BlockList, Tool, the tool renderers and AttachmentBlock) forwards those values unconditionally. The optional types, defaults and guards along that path were dead. Narrow them to required, drop the defaults and `?.`/`??`/`Boolean()` guards, and remove the `showTextStatus`/`showStatus` attachment props that every caller set to true. `resolveAgentDisplayState` no longer accepts an undefined mode, and `useDeadlineCountdown` no longer accepts an undefined deadline. Stories and tests now pass the values production sends.
DanielleMaywood
force-pushed
the
nullability/conversation-tools
branch
from
October 6, 2026 13:28
15526c0 to
8035d49
Compare
…and persisted rows
…nversationTimeline Rows no longer own preview state. The timeline holds one image and one text preview dialog and passes the setters to both row components.
DanielleMaywood
force-pushed
the
nullability/chat-message-rows
branch
from
October 6, 2026 13:30
b7e4e46 to
8239c76
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #29891.
ChatMessageIteminConversationTimeline.tsxtook one bag of optional props for two modes that never overlap: the live streaming assistant row (liveStatus/liveBlocks/liveTools) and a persisted message row (message/parsed). It is now split into two memoized list items, each with required props for its mode:LiveAssistantRow:liveStatus,liveBlocks,liveToolsandsubagentStatusOverridesare required.PersistedMessageRow:messageandparsedare required, along with the props the callsite always passes (the booleans,editingMessageId,onEditUserMessage,onJumpToUserMessage, the ask-question props).displayStateis always derived, so thedisplayState &&/?.checks,parsed?/&& parsed,message?.,messageId !== undefined, theparsed?.blocks ?? liveBlocksfallbacks and the= false/= []defaults go away.Both rows render the wrapper div through a shared
MessageRowFrame, so the DOM, row keys anddata-testid="chat-message-live-assistant"are unchanged. The image and text preview state moves up toConversationTimeline, which renders oneImageLightboxand oneTextPreviewDialogand passes the setters to both rows. Rows no longer hold state, and an open preview no longer closes if its row re-renders or unmounts. The dialogs are portalled, so where they sit in the tree does not affect the DOM.prevUserMessageKey/nextUserMessageKeystay optional because the first and last user rows have no neighbor.Expect a conflict with #29894 (
nullability/timeline-org-mcp-url), which edits the same props and both callsites to makeorganizationId/urlTransform/mcpServersrequired. This PR leaves those props untouched so the rebase stays mechanical.Verified:
pnpm lint:types,pnpm check,pnpm lint:oxlint,pnpm lint:compiler,pnpm lint:knip,pnpm test src/pages/AgentsPage, andpnpm test:storybookon the ConversationTimeline, LiveStreamTail, TerminalStatusRow, ChatPageContent, AgentChatPage and AgentChatPageView stories. A newUserMessageImageOpensLightboxstory checks that clicking an image opens the timeline-level lightbox.Part of the AgentsPage nullability cleanup; see #29888 for the methodology.
Plan excerpt
Analysed on a local, unpushed merge of all cleanup branches; ranking script
topdown.cjs. After the bottom-up PRs only 43 dead slots remain, so what's left is nullability that is real at its origin. Two read-only agents reviewed the top origins in code. Guard counts from the tool overstate the win: many "guards" are real branches (loading, no workspace, first/last row).ChatMessageItemintoLiveAssistantRowandPersistedMessageRow(the two modes never overlap)displayStatechecks and defaultsmemoon persisted row and the live testidThis PR was generated by Coder Agents on behalf of @DanielleMaywood.