Skip to content

fix(web): stop showing unread dots for cancelled or failed sessions - #977

Merged
wbxl2000 merged 1 commit into
mainfrom
fix/web-unread-aborted
Jun 22, 2026
Merged

fix(web): stop showing unread dots for cancelled or failed sessions#977
wbxl2000 merged 1 commit into
mainfrom
fix/web-unread-aborted

Conversation

@wbxl2000

Copy link
Copy Markdown
Collaborator

Related Issue

N/A — reported directly by a user.

Problem

The web sidebar lights up an unread blue dot for any background session whose turn ends, including sessions that were cancelled or failed. Those flags are persisted to localStorage, so after a page refresh the sidebar fills with stale unread dots even though there is no new reply to read.

What changed

Only mark a session as unread when its turn finishes normally (idle). Cancelled / failed turns (aborted) still run their in-flight and queue cleanup, but no longer set the unread flag.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2798fe6

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

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code 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

@pkg-pr-new

pkg-pr-new Bot commented Jun 22, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@2798fe6
npx https://pkg.pr.new/@moonshot-ai/kimi-code@2798fe6

commit: 2798fe6

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2798fe6646

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

} else {
// A background session just finished a turn the user hasn't seen — light up
// its unread dot until they open it.
} else if (status === 'idle') {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Clear persisted unread flags for aborted sessions

When a user already has rawState.unreadBySession[sid] === true for a session that is now cancelled/failed (for example the stale localStorage entries called out in this PR’s refresh scenario), this new status === 'idle' guard only avoids setting another flag; it never removes the existing one. Since unreadBySession is exposed from the stored map without checking the session status, aborted sessions can still render with an unread dot after refresh or after receiving an aborted status. The aborted branch should clear and persist the flag for that session.

Useful? React with 👍 / 👎.

@wbxl2000
wbxl2000 merged commit d521932 into main Jun 22, 2026
9 checks passed
@wbxl2000
wbxl2000 deleted the fix/web-unread-aborted branch June 22, 2026 12:43
@github-actions github-actions Bot mentioned this pull request Jun 22, 2026
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