Repository navigation
refactor(site/src/pages/AgentsPage): extract composer options into compound parts - #30634
Closed
DanielleMaywood wants to merge 1 commit into
Closed
DanielleMaywood wants to merge 1 commit into
DanielleMaywood wants to merge 1 commit into
Conversation
Collaborator
Author
|
Closing stack until can be re-prioritized |
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.
Part 6 of the stack splitting #30545. Depends on #30633.
Moves the composer options UI out of
AgentChatInputinto compound parts:AgentComposerOptions(Provider,Frame,Menu,Model,PlanningBadge,Badges) with its context inAgentComposerOptionsContext.tsAgentComposerOptionsMenu,AgentComposerMCPMenu,AgentComposerWorkspacePicker,AgentComposerBadgesAgentComposerLayout(Container,SetupNotice,ContextIndicator,needsAgentSetup)AgentChatInputkeeps the same props and now assembles these parts underAgentComposer.RuntimeProvider. No behavior change is intended. The existingAgentChatInputtests and stories pass without changes, which shows behavior is preserved.Key decisions
changeWorkspacecapability is left out. The base gating stays on each control. The plus button and the workspace entry useonChange && !isLoading. Selecting or removing callsonChangedirectly. The dismiss X buttons stay disabled byisDisabled.mcp.onSelectionChangeand theworkspaceSelectionfields are optional.setMCPServerSelecteddoes nothing without a handler, the same as the basehandleMcpToggle.AgentChatInputpassesonSelectionChangeonly whenselectedMCPServerIdsis set.isViewOnlyflag (set fromreadOnlyNotice). It hides the menu trigger, renders the static model pill, and removes the badge, planning, and workspace pill dismiss actions, as the base does.p-0wrapper. The file input keeps itsacceptattribute.ConfirmDialognow renders inside the frame. A newFrameEventBoundary(also reused byAttachments) stops Escape and drag events, as when the dialog sat outside the frame. I checked this with a throwaway test against the previous PR: Escape and drop inside the dialog produced no interrupt, history-edit cancel, or attach on either branch, and dropping the boundary made the test fail. The boundary ishidden, so it adds no flex gap.workspace-pillandworkspace-pill-overflow, the overflow trigger withouttabIndex, and the controlledMCPGroupBadgewith the lucide chevron. The shared MCP predicates are pure equivalents of the inline checks.{!overflow && <PlanningBadge />}<Badges includePlanning={overflow} />keeps the badge row at a stable position.{" "}text node inside the plusPopoveris dropped (collapsed whitespace in a flex row, not rendered). The hidden file input moves from the frame into the options row. The planning badge's class order changes but its classes are the same.Generated by Coder Agents on behalf of @DanielleMaywood.