Skip to content

vscode: render GitHub labels as colored chips on backlog and builder rows (rendering, not grouping) #816

Open

Description

@amrmelsayed

Problem

GitHub labels carry useful per-issue context (component, area, aspect — e.g. mobile app, vscode, priority:high) but Codev doesn't surface them anywhere in the sidebar. Today they're fetched (for parseLabelDefaults to derive type and priority strings) and then thrown away. Users have to click through to GitHub to see the label set, breaking the "Codev is enough" workflow.

Labels are rendering decoration — they tell the user more about an issue. They are explicitly not the grouping axis (that's GitHub Issue Type, per #811). This issue makes labels visible per-row as colored chips.

Current state

  • Both BacklogItem and the underlying GitHub fetch carry labels: Array<{ name: string }> (packages/codev/src/lib/forge-contracts.ts:36).
  • parseLabelDefaults derives type / priority from type:* / priority:* namespaces but the raw label list isn't rendered anywhere.
  • BuilderOverview doesn't carry labels at all today (the join was de-scoped from vscode: group backlog by area (area/* label namespace, predictable across views) #811's original framing — needs to be re-plumbed here).
  • VS Code's TreeItem description field is the natural surface for compact per-row context — already used on builder rows for phase info.

Proposed behavior

1. Flow raw labels through

  • BacklogItem.labels — already populated; just preserve it on the wire (don't drop it).
  • BuilderOverview.labels: Array<{ name: string; color?: string }> — add. Populated by looking up the builder's issueId in the cached issue list (no new fetch), with the label's color preserved from the GraphQL.

2. Render labels as inline chips

In views/backlog.ts and views/builders.ts, append label chips to each row's description field. Compact format using square-bracket notation since VS Code's TreeItem doesn't support rich HTML:

#773 Flaky Dashboard E2E         [bug] [mobile app] [priority:high]

Where [bug] etc. are styled in the row description (gray, monospace). The leading badge from #810 (e.g. IA) sits before the title; chips sit after.

Cap: show first 3 labels per row to prevent overflow. If more exist, append +N (e.g. [bug] [vscode] [docs] +2).

3. Hover tooltip

Full label list — including any cut by the cap and including the label's GitHub color — surfaces in the row's tooltip alongside the existing tooltip content (protocol / phase / etc.).

4. Color hint

VS Code's TreeItem description doesn't support per-text color, but we can prefix each chip with a unicode dot colored via a ThemeColor-driven decoration. Defer rich color rendering to the existing FileDecorationProvider infrastructure from #810 (which already handles per-row decorations via the codev-backlog:// and codev-builder:// URI schemes — extend its provideFileDecoration to surface up to 2-char label initials as additional badge text where space allows). If that turns out to be too noisy, fall back to monochrome chips with the label's color only in the tooltip.

5. No grouping logic

Labels are pure decoration in this issue. Grouping by label is not added here (intentionally — #811 establishes Issue Type as the sole grouping axis for the backlog; builders don't group at all per #811's "out of scope" note).

Acceptance criteria

  • BuilderOverview.labels: Array<{ name: string; color?: string }> populated from the cached issue list (no new fetch).
  • BacklogItem.labels preserved end-to-end and accessible to the tree view.
  • Backlog rows show up to 3 inline label chips in the description, plus +N overflow indicator when more exist.
  • Builder rows show the same chip rendering.
  • Hover tooltip on each row includes the full label list with GitHub colors.
  • Label rendering does not affect grouping logic (vscode: group backlog by area (area/* label namespace, predictable across views) #811) or row ordering.
  • No regression to the existing parseLabelDefaults-derived type / priority fields.

Dependency / sibling

Out of scope

  • Filtering by label (could be a follow-up if "show only mobile app" becomes a frequent need).
  • Editing labels from the tree (read-only rendering).
  • Custom Codev-only labels (intentionally — GitHub is the source of truth).

Activity

  1. self-assigned this
    on May 21, 2026
  2. added
    type:feature
    area/vscode
    project
    and removed
    type:feature
    on May 21, 2026
  3. amrmelsayed commented on Aug 14, 2026

    @amrmelsayed
    CollaboratorAuthor

    Rescope (architect, 2026-08-14): the premise here is void

    This issue rests on "#811 establishes Issue Type as the sole grouping axis for the backlog", and defers all grouping concerns to it. That is not what shipped. #811 (closed 2026-05-27) shipped grouping by the area/* label namespace, and the project has since settled on GitHub labels rather than Issue Types for classification, precisely because labels are portable across forges and orgs.

    Consequences for this issue, which must be resolved before it is spawned:

    1. The "labels are decoration, not grouping" framing no longer holds cleanly. Labels are already the grouping axis. This issue needs to say what it adds on top of that: rendering the non-area labels per row, presumably, since area/* is already expressed as the group header.
    2. The examples violate the current label convention. [bug], [priority:high] and the type:* / priority:* namespaces in the "Current state" section are not this project's vocabulary. There are no type:* labels, and each issue carries exactly one area/* label (multi-area work uses area/cross-cutting alone).
    3. parseLabelDefaults deriving type / priority should be re-checked against what it actually parses today before the acceptance criterion about "no regression" is trusted.

    Also stale by path: packages/vscode/... references are now apps/vscode/..., and views/builders.ts is now views/agents.ts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/vscodeproject

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions