Skip to content

Keep composer interactive and preserve superseded in-flight turns - #858

Draft
govindavashishtha wants to merge 2 commits into
mainfrom
composer-interactive-supersede-turns
Draft

govindavashishtha wants to merge 2 commits into
mainfrom
composer-interactive-supersede-turns

Conversation

@govindavashishtha

Copy link
Copy Markdown
Contributor

Summary

  • Keep the composer mounted and interactive during running and paused turns; Cancel only when busy and empty, Send when there is content (including attachments).
  • A new user send aborts the prior client stream without cancelSession (backend supersedes) and force-commits any half-baked pending user / incomplete assistant as a cancelled turn so it stays in the transcript.
  • Stack pause chrome (ask-user / approvals / MCP) above the composer; abandon interactive pause UI after a later user message. Hosts overriding ComposerSendButton should use hasContent, not only isRunning.

Test plan

  • pnpm --filter @truefoundry/trueforge-assistant-ui-runtime test
  • pnpm --filter @truefoundry/trueforge-ui test (composer container/shell/sections)
  • Mid-stream: send while assistant is streaming — prior user + partial assistant remain (cancelled), new turn continues; Cancel button not used; cancelSession not called
  • Pre-token: second send before any assistant token — first user bubble remains
  • During ask-user / approval pause: composer stays editable; Send supersedes and drops pause chrome; empty busy composer shows Cancel only
  • Enter does not cancel a running turn when the composer is empty

Made with Cursor

Send during running/pauses supersedes the prior client stream without cancelSession, stacks pause chrome above the composer, and commits half-baked turns as cancelled so they stay in the transcript.

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fb30c05

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@truefoundry/trueforge-ui Patch
@truefoundry/trueforge-assistant-ui-runtime Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

- Introduced lettered options (A/B/C) for Ask User prompts, enhancing user interaction.
- Updated button labels to "Continue" for clarity.
- Added new color variable `--color-gray-850` for improved styling.
- Adjusted layout for better alignment of components in the MCP auth and Ask User prompts.

This update aims to enhance the user experience by providing clearer options and a more polished interface.

This branch has not been deployed

No deployments
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