fix(staged): show pending state for diff comment sessions - #847
Merged
Conversation
Sessions linked to code review comments in the diff viewer collapsed the `queued` status into `running`, so a queued note/commit session showed a spinner. The branch card timeline rows instead show a Clock icon for queued sessions. Add a distinct `queued` state to `CommentSessionState` and stop mapping it to `running` in `sessionStateFor`, then render a Clock icon (matching the timeline) in both the comment list badges and the review action buttons. Session routing treats `queued` like `running` so clicking an already-launched session opens it rather than starting a new one. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
matt2e
force-pushed
the
diffs-comment-list-should-show-pending-state
branch
from
July 2, 2026 11:19
074a0e4 to
ac3e588
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The diff comment list and comment action buttons collapsed the
queuedsession status intorunning, so a queued Note/Commit session showed the same spinner as an in-progress one. This surfacesqueuedas a distinct state that renders the Clock icon used elsewhere for queued timeline rows, giving the comment list a proper pending state.Changes
queuedtoCommentSessionStateso it is no longer folded intorunning.sessionStateFornow maps a queued session status toqueued; routing inhandleNewNote/handleNewCommittreats bothqueuedandrunningas "open the session".getCommentSessionDisplayhelper (commentSessionDisplay.ts) that maps kind/state/context to an icon + title, and use it from bothDiffCommentsSection.svelte(badges) andReviewCommentActions.svelte(action buttons) to keep the icon/title logic in one place.scrollTopinprojectsSidebarState, restore it on mount (falling back to scrolling the active row into view when no saved position exists), and only auto-scroll the active row once restoration has completed.