Skip to content

refactor(site/src/pages/AgentsPage): tighten composer send and file contracts - #30646

Closed
DanielleMaywood wants to merge 1 commit into
refactor/agents-remove-chat-inputfrom
refactor/agents-composer-contracts
Closed

DanielleMaywood wants to merge 1 commit into
refactor/agents-remove-chat-inputfrom
refactor/agents-composer-contracts

Conversation

@DanielleMaywood

Copy link
Copy Markdown
Collaborator

Follow-up in the #30545 composer refactor stack. Depends on #30639.

This tightens the composer binding contracts so the runtime owns send and file readiness, and removes the branches those contracts made dead.

  • onSend is optional, and a composer can send only when onSend is present. The separate hasModelOptions gate is removed. Callers already fold "no models" into isDisabled.
  • LoadingChatComposer passes no send or file callbacks, so it no longer needs the ignoreSend stub or empty files.
  • ComposerFileBindings requires onRemoveAttachment, uploadStates, previewUrls, textContents, and workspaceUploads. Every production caller already supplied them.
  • With workspaceUploads required, the "Unsupported file type" branch, shouldRouteFileToWorkspace, and the file picker accept attribute were dead and are removed.
  • ChatPageInput drops its active-upload guard, because the runtime already blocks submission while uploads are in progress.

User-visible changes:

  • The loading composer's Send button is disabled. It used to be enabled with a draft but did nothing.
  • A dropped file that is neither a chat attachment nor uploadable now gets the "attach a running workspace" toast instead of "Unsupported file type". Production callers always wired workspace uploads, so this only changes paths that had no workspace wiring.
Key decisions
  • Ported from the refactor(site): prototype compound agent composer #30545 reference. Unrelated reference changes are excluded: focus timing, completion promises, automations, owner warnings, the SaveEdit swap, and compaction.
  • isViewOnly stays because readOnlyNotice still drives it.
  • Test and story edits are fixture updates for the required file fields, plus the renamed drop test that asserts the workspace toast. The NoModelOptions composer story now uses isDisabled, matching how production expresses missing models.

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