Repository navigation
refactor(site/src/pages/AgentsPage): require always-passed sidebar props - #29889
Closed
DanielleMaywood wants to merge 1 commit into
Closed
DanielleMaywood wants to merge 1 commit into
DanielleMaywood wants to merge 1 commit into
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
DanielleMaywood
force-pushed
the
nullability/sidebar
branch
from
September 29, 2026 14:29
8e30734 to
533b07b
Compare
DanielleMaywood
force-pushed
the
nullability/sidebar
branch
from
October 6, 2026 08:07
533b07b to
cc66702
Compare
AgentsPageLayout is the only production caller of ChatsSidebar and passes every callback and flag, and AgentChatPageView, ChatSummaryPanel, ChatTreeNode and ChatTopBar do the same for SidebarTabView, ChatSummary and ChatActionsMenuItems. The optional props and their guards were dead. Make those props required and delete the guards and defaults. The search, collapse, retry, close and title-generate controls now render unconditionally, as they already did in production. ChatsSidebar drops its uncontrolled rename-dialog fallback since the layout always owns that state. Tests and stories pass the now-required props; the ChatsSidebar stories hold rename state in a small wrapper like the layout does.
DanielleMaywood
force-pushed
the
nullability/sidebar
branch
from
October 6, 2026 11:12
cc66702 to
531a5b5
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.
AgentsPageLayoutis the only production caller ofChatsSidebar, and it passes every callback and flag (onReorderPinnedAgent,onRenameTitle,onProposeTitle,chatPendingRename/onChatPendingRenameChange,onBeforeNewAgent,onRetryLoad,onLoadMore,onCollapse,hasNextPage,isFetchingNextPage,isLoading,isArchiving,isLoadingModelConfigs,canManageAgentSettings).ChatsSidebarpasses them on toChatsPanel,SettingsPanel,LoadMoreSentinel,RenameChatDialogandChatSearchDialog, always with defined values. The same holds forSidebarTabView(chatTitle,onClosefromAgentChatPageView),ChatSummary(isCostLoading,costError,isSubagentfromChatSummaryPanel) andChatActionsMenuItems(isArchiving,isArchiveBlockedfromChatTreeNodeandChatTopBar). The optional types and their guards could never matter.These props are now required and the dead guards and defaults are gone. The Search nav item and button, the collapse buttons, the Retry button, the mobile Close panel button and the rename dialog's Generate button now always render, which is what production already showed.
ChatsSidebarno longer has its uncontrolled rename-dialog fallback, because the layout always owns that state. As a resultChatsPanel/ChatTreeContextonOpenRenameDialogbecame required as well.Tests and stories now pass the required props. The
ChatsSidebarstories keep rename state in a small wrapper, the way the layout does, so the rename stories still open the dialog. Some props stay optional on purpose:SidebarTabViewkeeps itschatTitle &&check because an empty title should still hide the label.ChatActionsMenuItems.onOpenRenameDialogstays optional becauseChatTopBarpassesundefinedfor archived chats. ThechatFamilyAllowsArchive/chatStatusAllowsArchivestatus params stay nullable (documented fail-open).getModelDisplayName.lastModelConfigIDis left for the settings/misc cluster, which ownsmodelDisplayName.Part of the AgentsPage nullability cleanup; see #29888 for the methodology. Dead slots in this cluster: 35 before, 1 after (the
modelDisplayNameslot above).This PR was generated by Coder Agents on behalf of @DanielleMaywood.