Skip to content

vscode: Backlog tree title-count should reflect the active view mode, not the total spawnable set #911

@amrmelsayed

Description

@amrmelsayed

Background

Surfaced as a non-blocking nit by both Codex (COMMENT MEDIUM) and Claude (HIGH but non-blocking) during CMAP-2 on #910 / PIR #809 (Backlog mine/all toggle). Architect explicitly deferred to a follow-up to keep #910 scoped to the toggle itself.

Problem

packages/vscode/src/extension.ts:184 computes the Backlog view's title as Backlog (<count>) where count is the total spawnable issue count from OverviewData. The Backlog view now has two view modes (mine-only / show-all, toggled via the eye icon — added in #809), and the tree below the title shows only the current view mode's rows — but the count in the title still reflects the unfiltered total in both modes.

Concrete UX confusion:

  • Open Backlog (default: mine-only mode). Title reads Backlog (47). Tree shows 3 rows. User wonders: "where are the other 44?"
  • The eye icon hints at the mode, but the title-count is the most prominent integer on the view and currently disagrees with what's visible.

There is no separate "filter" UI on this view — the mine/all toggle is the only mechanism that changes the visible row set. The title-count should agree with whichever set is currently rendered.

Proposed fix

Three reasonable shapes — plan-approval gate will lock one in:

  1. Backlog (3) when mine-only, Backlog (47) when show-all. Title always matches the row count. Simple, no extra info.
  2. Backlog (3 of 47) when mine-only, Backlog (47) when show-all. Surfaces both numbers; the "of 47" signals "there are more, click the eye to see them." Self-explanatory.
  3. Backlog · Mine (3) when mine-only, Backlog · All (47) when show-all. Title names the mode alongside the count; the icon and the title both label the same state.

Mild preference for option 2 — it makes the toggle's effect self-explanatory without needing to click the eye icon to confirm, and it doesn't add a mode-label that's already conveyed by the icon.

Implementation notes

Acceptance

  • Title count matches the visible row count in both mine-only and show-all modes.
  • Title updates immediately when the eye-icon toggle is flipped (no stale count until the next overview refresh).
  • No regression when currentUser is null (mine-only mode falls through to show-all per vscode: backlog view — toggle between 'mine only' (default) and 'all' #809's safety branch — title shows the full count, matching the visible rows).
  • Unit test or fixture pin for the count-computation path.

Out of scope

  • Anything else about the Backlog view's rendering, ordering, or icons — this is purely a count/title-string fix.
  • Changing the eye-icon visuals or the toggle mechanism.

Closes the documented gap in #809's review.

Metadata

Metadata

Assignees

Labels

area/vscodeArea: VS Code extension

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions