Repository navigation
refactor(site/src/pages/AgentsPage): require always-passed chat input props - #29890
Merged
Merged
Conversation
Codex Review SummaryThis 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. |
This was referenced Sep 25, 2026
Closed
DanielleMaywood
force-pushed
the
nullability/chat-input
branch
from
September 29, 2026 14:29
b008dba to
064e2a8
Compare
jaaydenh
approved these changes
Oct 2, 2026
DanielleMaywood
force-pushed
the
nullability/chat-input
branch
from
October 6, 2026 08:07
d8a8364 to
e1401d6
Compare
… props AgentChatPage, AgentChatPageView, ChatPageContent, AgentCreateForm and AgentChatInput always pass the composer, page shell, attachment preview and skills menu props below, but the receiving components still declared them optional and defaulted or guarded them. Make them required and drop the dead defaults and guards: AgentChatPageView and its loading view props, ChatPageTimeline and ChatPageInput editor, MCP and loading props, AgentChatInput initialValue/onContentChange/plan mode/catalog loading, ChatMessageInput, SkillsTriggerMenu and AttachmentPreview callbacks and flags. ChatMessageInput always autofocuses, so its autoFocus prop is removed. Tests and stories now pass the values production sends; the story for plan mode without a toggle handler is removed.
…n the indicator (#29905)
DanielleMaywood
force-pushed
the
nullability/chat-input
branch
from
October 6, 2026 11:13
e1401d6 to
42a5dc8
Compare
DanielleMaywood
added a commit
that referenced
this pull request
Oct 6, 2026
… transform in timeline (#29894) Stacked on #29890, which makes `ChatPageTimelineProps.organizationId`, `urlTransform` and `mcpServers` required. With that in place, every production path into the timeline passes these three values, so this PR narrows them on `ConversationTimeline`, `ChatMessageItem`, `LifecycleHookNotice`, `BlockList`, `ReasoningDisclosure`, `ResponseBlock` and `Tool`. `ToolRendererProps` keeps them optional because renderers are looked up dynamically. Stories and tests now pass `"organization-id"`, an empty MCP server list, and streamdown's `defaultUrlTransform`, which is what they rendered with when the props were omitted. These are the 14 dead slots that #29891 left behind because they depended on #29890. This PR clears all 14. Part of the AgentsPage nullability cleanup; see #29888 for the methodology. --- _This PR was generated by Coder Agents on behalf of @DanielleMaywood._
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
AgentChatPagealways passes every model, plan mode, workspace loading,urlTransformand plan/question handler prop toAgentChatPageViewandAgentChatPageLoadingView, andAgentChatPageViewalways passes the editor, MCP and loading props toChatPageInputandChatPageTimeline.AgentChatInputhas three production callers (AgentCreateForm,ChatPageInput, the loading view), and all of them passinitialValue,onContentChange,planModeEnabled,onPlanModeToggleandisModelCatalogLoading.AgentChatInputis the only renderer ofChatMessageInputandAttachmentPreview, andChatMessageInputis the only renderer ofSkillsTriggerMenu, and it always passes their callbacks and flags. The receiving components still declared all of these optional, so their= falsedefaults,?.()calls,onPlanModeToggle &&/onRemoveMcp &&guards and?? ""fallbacks were dead.These props are now required and the dead handling is gone. The plan mode menu item, the inline planning badge's dismiss button and the MCP badge dismiss button now render unconditionally.
ChatMessageInputalways receivedautoFocus, so that prop is removed andAutoFocusPluginalways renders.ChatPageInputProps.inputRefis narrowed toRefObject, matching the loading view. Tests and stories now pass the values production sends. ThePlanningIndicatorWithoutTogglestory covered a state production cannot reach and is removed, and theChatMessageInputtest that ran withoutonChangeis renamed to describe what it still checks (getValueafterinsertText).Props that stay optional on purpose:
AgentChatInputMCP,inputRef,remountKey,unsupportedProviderNamesandonReasoningEffortChange, which the loading view orAgentCreateFormomit.ChatPageTimelineonImplementPlan/onSendAskUserQuestionResponse/onEditUserMessage, which areundefinedfor read-only viewers.ToolBadge.onRemovePlanning, becauseMCPGroupBadgerendersToolBadgefor MCP servers without it, so the planning badge keeps itsonRemovePlanning &&guard.AgentChatInputmanageAutomationsEnabled/onManageAutomationsToggle, which callers omit when the automations experiment is off or the viewer cannot toggle it.ChatMessageInput.ref, which follows React's optionalrefconvention and has no guard to delete.AttachmentPreviewFrame.hrefmatches the cluster regex but lives inAttachmentBlocks.tsx, which is owned by the timeline cluster.This branch also carries #29905 (non-null context usage in
ContextUsageIndicator) and #29907 (dead chat page null checks), which were merged into it as their own commits.Part of the AgentsPage nullability cleanup; see #29888 for the methodology. Dead slots for this cluster: 59 before, 2 after (both intentional skips).
This PR was generated by Coder Agents on behalf of @DanielleMaywood.