Skip to content

vscode: backlog view — toggle between 'mine only' (default) and 'all' #809

@amrmelsayed

Description

@amrmelsayed

Problem

The backlog view today shows every open issue in the repo. The user sees a long list mixing items assigned to themselves with everyone else's work; the only differentiation is an icon swap (account vs issues) per row (packages/vscode/src/views/backlog.ts:43–57). When the backlog is long, finding "what's on my plate" requires scanning the whole list every time.

Current state

  • BacklogProvider (views/backlog.ts:27) reads data.backlog (every open issue) and data.currentUser (already auto-detected via OverviewData.currentUser, overview.ts:122).
  • Items where currentUser is in the assignees list get the account icon; everything else gets the issues icon.
  • No filter / toggle — every row is rendered regardless.
  • View-title toggle pattern already exists in the codebase: codev.enableBuildersAutoCollapse / codev.disableBuildersAutoCollapse and codev.enableBuildersFileTreeMode / codev.disableBuildersFileTreeMode follow the standard "two commands, one config flag, paired when clauses" pattern (extension.ts:542–549).

Proposed behavior

Add a Mine/All toggle to the Backlog view title bar, following the existing toggle-button convention.

1. Config flag

codev.backlogShowAll (boolean). Default: false (mine-only). Persisted via vscode.ConfigurationTarget.Global like the other toggles, so the user's choice survives across VS Code sessions.

2. Two paired commands

Command Title when to show
codev.showBacklogAll Codev: Show All Backlog Items view == codev.backlog && !codev.backlogShowAll
codev.showBacklogMineOnly Codev: Show Only My Backlog Items view == codev.backlog && codev.backlogShowAll

Both registered as view-title actions (view/title menu, navigation group) so they appear as an icon in the Backlog view header. They flip the config flag.

3. Filter predicate

In BacklogProvider.getChildren(), after reading data.backlog, apply:

const showAll = vscode.workspace.getConfiguration('codev').get<boolean>('backlogShowAll', false);
const me = data.currentUser?.toLowerCase();
const items = showAll || !me
  ? data.backlog
  : data.backlog.filter(item => item.assignees?.some(a => a.toLowerCase() === me));

When data.currentUser is null (gh unavailable / not authenticated), fall back to showing all items so the view isn't empty.

4. Empty state

If filtered to mine-only and the result is empty, render a single placeholder tree item: (no backlog items assigned to you — click the eye icon to see all). Avoids the silent-empty-view confusion.

5. "Mine" definition

Assignment only: assignees includes currentUser. Authored-by-me / commented-on-by-me are intentionally out of scope — the backlog is "what to work on next", and only assignments declare that.

Acceptance criteria

  • codev.backlogShowAll config flag exists; default false.
  • Backlog view title shows a single toggle icon that flips between "show all" and "show mine only" based on the current state.
  • First-install / default view shows only items assigned to the current user.
  • Toggle state persists across VS Code restarts.
  • When currentUser is unavailable, view falls back to showing all items.
  • Empty mine-only state shows a placeholder row pointing the user to the toggle.
  • No regression to the existing icon-swap behavior on assigned items (still shows the account icon when in "show all" mode).

Out of scope

  • Author / commenter filters (intentionally — assignment only).
  • Per-user filter (showing items assigned to a teammate). The Team view is the surface for that.
  • Multiple-selection filters (e.g. "mine + unassigned"). Single toggle, two states.

Metadata

Metadata

Assignees

Labels

area/vscodeArea: VS Code extensionprojectNew project or feature

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