Skip to content

fix(tui): show that an abort is in progress as soon as it is requested - #53655

Open
Nowaker wants to merge 1 commit into
anomalyco:devfrom
Nowaker:abort-feedback
Open

Nowaker wants to merge 1 commit into
anomalyco:devfrom
Nowaker:abort-feedback

Conversation

@Nowaker

@Nowaker Nowaker commented Oct 7, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #53652

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

When the double Escape fires, it now sets an aborting… state for the session before sending the abort request. That state replaces the esc interrupt hint in the footer:

  • It clears when the session status goes idle.
  • If the abort request fails, it clears and shows an error toast.
  • If the session is still running 15s later, it clears and shows a warning toast saying to press again.

The state is keyed by session ID, so switching sessions doesn't carry it over. The change is limited to component/prompt/index.tsx. The first press already had feedback (esc again to interrupt) and is unchanged.

How did you verify your code works?

  • bun typecheck and bun test in packages/tui.

  • Ran the TUI from source with isolated XDG dirs in a throwaway tmux server, against a local fake OpenAI-compatible provider that streams a long reply and logs when the client disconnects. A script sent the keys and polled the pane every 10ms. It ran with and without four CPU hogs pinned to the same cores as the TUI.

    before after
    2nd Esc → first frame showing a change only when idle: 94-299ms aborting…: 54-168ms
    2nd Esc → provider stream closed 38-245ms 63-374ms

Screenshots / recordings

Footer captured on the first frame after the second Escape:

before   ⬝⬝⬝⬝⬝⬝■■  esc interrupt
after    ⬝⬝■■■■■■  aborting…

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

The second Escape reset the footer straight back to "esc interrupt",
and nothing else changed until the server finished cancelling the turn
and the session status went idle. Under load that gap is long enough
that the press looks ignored, so users keep pressing.

The double press now sets an "aborting…" state for the session before
the abort request is sent, shown in place of the interrupt hint. It
clears when the session goes idle. If the request fails it clears with
an error toast, and if the session is still running 15s later it clears
with a warning so the user knows to press again.

AI-Tool: opencode 1.18.34-vt-126-907b3bc518
AI-Model: anthropic/claude-opus-5-5
AI-Variant: high
AI-Platform: linux
AI-Harness: Vibeterm 52e9db3
AI-Session-ID: ses_eec446a24ffebz6buEl7LB2m3O
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

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.

TUI: no feedback between the second Escape and the session going idle

1 participant