VSCode: area-header roll-up icons in Backlog & Builders views#959
Merged
Conversation
…rve green for live builders)
… (drop nested ternaries)
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.
PIR Review: VSCode area-header roll-up icons (Backlog & Builders views)
Fixes #926
Summary
Adds a roll-up status icon to the
area/*group headers in the VSCode sidebar'sBacklog and Builders trees, so an engineer can triage at a glance without
expanding each group. Both rollups are computed client-side from the overview
cache (no server / payload change). The Backlog header is binary — filled
vs. outline grey for "area has a builder" vs. "open to spawn"; the Builders
header is a worst-of-three —
bell(any blocked) →comment-discussion(any idle) →
circle-filled(all active), reusing the builder-row iconvocabulary. Counts live in the tooltip.
Files Changed
Code (anchored at merge-base
b6059d5b):packages/vscode/src/views/backlog-filter.ts(+24 / -0) —activeBuilderCountByArea(pure)packages/vscode/src/views/backlog-tree-item.ts(+28 / -... ) —BacklogGroupTreeItemicon/tooltippackages/vscode/src/views/backlog.ts(+5 / -...) — wire intorootChildren()packages/vscode/src/views/builder-row.ts(+70 / -0) —rollupGroupState,BUILDER_STATE_GLYPH,worstBuilderState,GroupRollup/BuilderStatepackages/vscode/src/views/builder-tree-item.ts(+21 / -...) —BuilderGroupTreeItemicon/tooltippackages/vscode/src/views/builders.ts(+49 / -...) — wire rollup intorootChildren(); row icon/contextValue now sourced from the shared glyphpackages/vscode/src/__tests__/backlog-filter.test.ts(+38 / -0) —activeBuilderCountByAreatestspackages/vscode/src/__tests__/builder-row.test.ts(+53 / -0) —rollupGroupState+worstBuilderStatetests8 files, +265 / -23.
Commits
git log main..HEAD --oneline(implementation commits; porch chore commits omitted):3d07ae01[PIR VSCode: area-header roll-up icons in backlog & builders views #926] Add area-header roll-up icons to Backlog & Builders viewsf846f6aa[PIR VSCode: area-header roll-up icons in backlog & builders views #926] Unit-test activeBuilderCountByArea + rollupGroupStateb6092ab8[PIR VSCode: area-header roll-up icons in backlog & builders views #926] Backlog header: filled/outline grey instead of green (reserve green for live builders)845c0a45[PIR VSCode: area-header roll-up icons in backlog & builders views #926] Centralize builder-state glyphs + worstBuilderState helper (drop nested ternaries)Test Results
pnpm check-types: ✓ passpnpm lint: ✓ passpnpm test:unit: ✓ pass (211 tests, 14 new across the two helper suites)node esbuild.js: ✓ pass (extension bundles)build+testschecks: ✓ pass (at dev-approval)dev-approvalgate (VSCode Extension Host) — confirmed the Backlogfilled/outline-grey headers and the Builders worst-of-three headers render and
their tooltips carry the counts.
Architecture Updates
No
arch.mdchanges needed. This adds two pure helpers and setsiconPathontwo existing
AreaGroupTreeItemsubclasses — no new module boundary, service,or data-flow. It stays within the established VSCode-view pattern (pure,
vscode-free helpers in
backlog-filter.ts/builder-row.tstested under thevitest
__tests__/harness;ThemeIconconstruction at the tree-item callsite). The one mild structural improvement —
BUILDER_STATE_GLYPHas the singlesource of truth for the three builder-state glyphs shared by the row and the
header — is a local DRY consolidation, not an architectural change.
Lessons Learned Updates
No
lessons-learned.mdchange — the insights here are PR-specific rather thandurable cross-cutting wisdom, and are captured in this review:
file:lineicon vocabulary can go stale across arebase. VSCode: area-header roll-up icons in backlog & builders views #926 specced the Builders blocked rollup as a static
bell"reusingthe row icons." Between issue authoring and implementation, the row's blocked
icon became gate-specific (
gateIconFor→book/checklist/code/…), sobellis now only an unmapped-gate fallback. The rebase-time accuracy passcaught this; the header keeps a generic
bellas a deliberate group-level"attention" glyph (a group can hold builders at different gates), documented at
builder-tree-item.ts.on builder rows; using a green dot in the Backlog overloaded it. The Backlog
rollup ships as filled/outline grey so green stays exclusive to live
builders and the Backlog reads as a calm "where can I spawn" surface.
3-Way Consultation (single advisory pass — PIR does not re-review)
plan, not the code. The grey was an explicit reviewer request at the
dev-approvalgate (reserve green for the Builders "live agent" signal),and the gate was approved with grey in place — reverting would contradict
the human decision. The plan's Backlog section is updated to match what
shipped, removing the drift. No code change, so no regression test applies.
approved/validatedfrontmatter. Rebutted. Thatfrontmatter is the architect-pre-approval convention (e.g. plan vscode: 'Open Builder Terminal' and 'Send Message' Quick Picks show internal builder id instead of issue # + title #925);
PIR builder-created plans approved via the porch
plan-approvalgate don'tcarry it (siblings vscode: editor-tab webview for rich backlog search #920, vscode: mark recently-created backlog rows (created within last 24h) #930, vscode: move Pull Requests section below Backlog in the sidebar default order #932 have none), the approval record lives
in
status.yaml, andvalidated: [gemini, codex, claude]would befactually false — PIR's plan phase runs no consultation.
and exited without emitting a verdict file (infra issue, not a code finding).
Net: one APPROVE, one REQUEST_CHANGES whose two findings are a plan-doc sync
(done) and a frontmatter-convention rebut. Escalated to the human at the
prgate since PIR will not independently re-review.
Things to Look At During PR Review
activeBuilderCountByAreacountsany builder in the area (including one blocked at a gate) as "active" — the
Backlog question is "is anyone working this area?". A consequence worth a
conscious nod: the same area can show a filled-grey Backlog header (has a
builder) while its Builders header is
bell/yellow (that builder is blocked).That's intended — the two views answer different questions.
has that issue filtered out of the backlog (
spawnableBacklog), so it rendersno Backlog header at all and can't show "working" there. Fine for the "where
do I spawn?" goal; a follow-up (VSCode: keep in-progress issues in the Backlog with the builder's state icon #948) tracks optionally keeping in-progress
issues in the Backlog with the builder's state icon.
glyph can't convey a mixed group; the full
{blocked, idle, active}breakdownis in the tooltip. This was discussed at the gate and kept deliberately.
builders.tsmakeBuilderRow): the row now classifies once into aBuilderStatedrivingboth
contextValuefamily (CONTEXT_FAMILY) and icon (BUILDER_STATE_GLYPH),with the blocked row still overriding the glyph via
gateIconForwhilereusing the shared color. Behavior is identical; worth a glance to confirm
the contextValue strings (
blocked-builder/awaiting-builder/builder) areunchanged so menu
when-clauses still match.How to Test Locally
For reviewers pulling the branch:
pir-926→ View Diffafx dev pir-926dot; an area with only spawnable issues → outline grey dot. Hover → builder
count.
bell;worst-idle group → blue
comment-discussion; all-active → greencircle-filled. Hover → "b blocked · i waiting · a active".Uncategorizedrepo renders flatrows with no header (unchanged).
cd packages/vscode && pnpm test:unit.