Skip to content

refactor(site/src/pages/AgentsPage): move chat pages to ChatComposer - #30638

Closed
DanielleMaywood wants to merge 1 commit into
refactor/agents-new-composerfrom
refactor/agents-chat-composer
Closed

DanielleMaywood wants to merge 1 commit into
refactor/agents-new-composerfrom
refactor/agents-chat-composer

Conversation

@DanielleMaywood

Copy link
Copy Markdown
Collaborator

Part 8 of the stack splitting #30545. Depends on #30636.

Adds ChatComposer to AgentComposers.tsx and moves the chat page onto it. AgentChatPage now builds the composer (ChatPageInput for a loaded chat, LoadingChatComposer while loading) and passes it to AgentChatPageView and AgentChatPageLoadingView as a composer node, so the views no longer forward composer props.

There is no intended behavior change. The existing tests and stories pass unchanged apart from edits forced by the new prop shapes.

Key decisions
  • Composer as a node. The views take composer: React.ReactNode plus canSubmitChatTurn (still used to gate plan implementation and question responses in the timeline). The composer still renders inside the view's context providers.
  • ChatPageInput derives its own read-only state. isReadOnly, readOnlyNotice (owner label wording unchanged), and attachedWorkspace were computed in the view from chat, the current user, workspace, and workspaceAgent. They now come from the same inputs inside ChatPageInput, so those props are gone. preferredFolder moved to AgentChatPage with the same logic.
  • Kept existing behavior where the reference changes it. ChatComposer keeps readOnlyNotice and isViewOnly (not the reference's owner-warning banner), always renders Submit (no SaveEdit swap), and hides slash commands while editing history. ChatPageInput keeps the active-upload guard and hasModelOptions. Its props stay flat instead of being regrouped as in the reference.
  • Story and test edits. The AgentChatPageView stories wrapper builds ChatPageInput from the same defaults the view used to receive, and the loading stories share a small LoadingChatComposer helper. The removed isReadOnly={false} props in the ChatPageContent story and test are now derived, and they resolve to the same value because the fixture chat belongs to the story user.

Generated by Coder Agents on behalf of @DanielleMaywood.

@linear-code

linear-code Bot commented Oct 13, 2026

Copy link
Copy Markdown

CODAGT-1405

@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

Closing stack until can be re-prioritized

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant