Skip to content

Abort after sending still renders full AI response #115

@Mhidayah19

Description

@Mhidayah19

Description

When composing an issue and sending a prompt, aborting mid-generation appears to stop the stream, but after a few seconds the full AI response still renders. This defeats the abort action and leads to confusing UX and wasted tokens/compute.

  • Impact: Users cannot reliably stop responses; unexpected content appears post-abort.

Steps to reproduce

  1. Open the app and start composing a new issue.
  2. Type any prompt and click Send.
  3. Before the response finishes streaming, click Abort.
  4. Observe that streaming stops initially, then the complete response appears a few seconds later.

Expected behavior

  • Aborting cancels the active request both client- and server-side.
  • No additional tokens or final message should render after abort.
  • UI may show “Generation cancelled,” optionally preserving partial output per product decision.

Actual behavior

  • UI stops initially, but after a short delay the full model response renders as if abort never happened.

Frequency

Consistently reproducible.

Relevant files

  • src/server.ts (uses createUIMessageStream)
  • src/client.tsx (stream handling / Abort UI)
  • src/tools.ts (if tools trigger server streams)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions