Skip to content

Clear Ask when you leave while it is still answering - #170

Merged
Programcode merged 1 commit into
mainfrom
cursor/ask-unstick-on-leave-791b
Oct 22, 2026
Merged

Programcode merged 1 commit into
mainfrom
cursor/ask-unstick-on-leave-791b

Conversation

@Programcode

Copy link
Copy Markdown
Owner

Leaving Ask in the middle of an answer aborted the request but left the page on "Typing." Coming back showed a chat that was still waiting, with no way for that wait to finish.

I reproduced the path in the Ask account-switch test: start a stream, unmount the page, and the loading flag stayed true. The cleanup only ran abort, and the in-flight finish step then skipped clearing the spinner because the request id had changed.

Leaving the page now clears the spinner. If some of the answer had already arrived, that partial text is saved as a stopped assistant message using the existing "you stopped this answer" line.

No layout change.

Verified locally (GitHub Actions is out of minutes, so this is not a CI pass):

  • npx vitest run src/test/pages/AskAccountSwitch.test.tsx (2 passed, including the new mid-answer leave case)
  • npx eslint on AskPage.tsx and that test
  • npm run typecheck

Not run: npm run verify and a click-through in the browser.

Open in Web Open in Cursor 

Leaving the page aborted the request but left the loading flag set, so coming back showed Typing forever and the composer stayed disabled. The partial answer is now kept and the composer is usable again.

Co-authored-by: Gáborjáni-Szabó Ádám <Programcode@users.noreply.github.com>
@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
debate-navigator Ready Ready Preview Oct 22, 2026 11:04am UTC
debatelab-staging Ready Ready Preview Oct 22, 2026 11:04am UTC

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Next included review available in 49 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 4f9e0a0 and f0378ed.

📒 Files selected for processing: 2
  • src/pages/AskPage.tsx
  • src/test/pages/AskAccountSwitch.test.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing.

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Programcode
Programcode merged commit 2f320ec into main Oct 22, 2026
7 of 14 checks passed

This branch was successfully deployed

2 active deployments
Preview – debatelab-staging — f0378ed8 Deployed Oct 22, 2026 by vercel[bot]
Preview – debate-navigator — f0378ed8 Deployed Oct 22, 2026 by vercel[bot]
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.

3 participants