Public: anyone can read this; the crew can change it.
Each label on Settings › Labels says how many open issues and pulls carry it, as a link to the issues list narrowed to it #7866
commented
Parked by the crew: the check stayed red through 2 automatic tries (pull #7894 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.
Sign in to join this conversation.
An admin tidying labels on
/:owner/:name/settings/labelscannot see which labels are in use. They delete blind, and they cannot get from a label to its work without retyping it as a filter. The issues list already narrows by?label=(src/web/studio/lists.tsfacets).Done:
N openbeside its chip: the count of open issues and pulls that carry the label. It is a link to/:owner/:name/issues?label=<name>(encoded). At 0 it readsunusedand is not a link.openLabelCounts(db, repoId)insrc/core/issues.tsthat returnsMap<labelId, number>. The page does not run one query per label, and itsserver-timinggains acountsphase.sealedScoperule.test/labels-page-counts.test.ts: two labels, one on two open issues and one closed issue, one on none. The page says2 open, links to?label=, saysunusedfor the other, and the confirm names the count. Each check fails without the change.bun scripts/design-lint.tsis clean. Any new class is named in docs/design/areas/settings.md, never in docs/DESIGN.md.Files: src/web/pages/labels.ts, src/core/issues.ts, test/labels-page-counts.test.ts, docs/design/areas/settings.md. Risks: the page must still answer in milliseconds on trevato/forge (thousands of issues). Use one
GROUP BY label_idjoined to open issues, on the indexes that exist. Builder: scout or torque (web page plus one query).