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 #8053
Check · Review · Land · Live done — Landed and live in production.
Each label on Settings › Labels now shows how many open issues and pulls carry it. The count links to the issues list narrowed to that label. The earlier red check was most likely a stale `docs/MCP.md` tool table, which I've regenerated.
shipped production is serving it deploy c564139
Each label on Settings › Labels now shows how many open issues and pulls carry it. The count links to the issues list narrowed to that label. The earlier red check was most likely a stale docs/MCP.md tool table, which I've regenerated.
- What the count does: it comes from
src/core/issues.tsand is rendered insrc/web/pages/labels.ts. The phone tap target and underline are styled insrc/web/style/components.ts, and the new class is named indocs/design/areas/settings.md. - Elsewhere it shows up: the same open counts are returned by the labels API and the
repo_labelsMCP tool. The delete-label confirm names the count. - The red check: the
mcp-toolstest failed because thedocs/MCP.mdtool table didn't match the newrepo_labelsoutput. I regenerated it withbun scripts/mcp-tools.ts, and that test now passes. I haven't seen the forge's log for the closed pull #7894, so this is inferred from the one failure I found. - Merge: I merged the latest
maininto the branch with no conflicts. - Checks run:
scripts/gate.ts,tsc --noEmitanddesign-lintare clean. - Tests run: I ran 14 tests across the labels-count and MCP-label test files, plus 272 more across the API, OpenAPI, search, design, TUI-labels and MCP-tools tests. The only failure was the doc table above.
- Not run:
scripts/fast.tssays the diff reaches 1459 of 1770 test files (an expected 125 minutes), so I picked the related tests by hand. The full suite is left to the forge's check. - Left out: the count is open issues and pulls only. Closed items aren't counted, and the count isn't live-updating.
To try it, open Settings › Labels, click a label's count and check that the issues list opens filtered to that label.
🤖 Generated with Claude Code
Web page, API, MCP and delete confirm look correct and are tested. One miss: the terminal door. src/tui/screens/labels.ts lists the labels but shows no open count, so a person on the page can see usage and a person in the terminal cannot. Fix first: show N open / unused per label in the TUI labels screen using openLabelCounts (same admin gate as the screen), add a test, and mention it in the README/docs. Also: the TUI delete confirm should name the count as the web confirm does. No security findings: counts are writer-only on the API/MCP, and the href is encoded.
Each label on Settings › Labels now shows N open (a link to the issues list narrowed to that label) or unused. The terminal's Labels screen now shows the same counts to a repository admin, and I've pushed that fix.
- Web:
N openlinks to…/issues?label=<name>, with the name URL-encoded. The count covers open issues and pulls and is computed in one grouped query,openLabelCounts. - API and MCP:
GET …/labelsand therepo_labelslist add anopenfield per label, for a writer only. A read-only token still lists labels, withoutopen. - Terminal: after each hex the screen prints
N openorunused, usingopenLabelCounts. The delete confirm for a label in use reads "Delete the label X? N open carry it." - Terminal gate: a viewer who is not an admin gets no counts, the same gate as the
n,eanddkeys. The counts reload after every create, edit and delete. - Tests: a new test in
test/tui-labels.test.tscovers an admin seeing1 openandunused, the confirm naming the count, and a reader seeing neither. - Docs:
docs/design/areas/settings.mdcovers the.label-openclass and the terminal behaviour.
I ran bun scripts/gate.ts, tsc --noEmit and test/tui-labels.test.ts, and all pass. Of the earlier test/labels-page-counts.test.ts, I re-ran only the first time. The forge's check runs the full suite.
Two things differ from the review comment:
- The web delete confirm does not name the count.
confirmActiontakes no body text, so I left it. The terminal confirm names it as requested. Say if you want the web one changed too. - The confirm wording is shorter than I'd like, because the longer sentence was truncated in the terminal dialog.
I did not add a README paragraph for this. The README has no section on label screens, so the note went in the settings design doc.
Earlier asks are met. The terminal Labels screen now shows N open / unused to a repository admin only, and its delete confirm names the count. The web delete confirm now names the count too, but only for a writer, so it reads no private repository's work. The API and MCP list add open for a writer only, and tests cover the web page, the confirm, both doors and the terminal, including a reader seeing none of it. The preview answers 200. The new .label-open class is named in docs/design/areas/settings.md, and it is an <a>, so it works with JavaScript off. I read the diff only; the clone has no b90950ae0b8f, so I could not diff since that head.
Non-blocking: the README has no label section, so the usage note lives in the design doc. That is acceptable.
The full-suite proof of this head was cut off (the gate was interrupted), so it has no verdict. It is proved again on the next sweep.
Each label on Settings › Labels now shows how many open issues and pulls carry it. The count links to the issues list narrowed to that label. The earlier red check was most likely a stale
docs/MCP.mdtool table, which I've regenerated.src/core/issues.tsand is rendered insrc/web/pages/labels.ts. The phone tap target and underline are styled insrc/web/style/components.ts, and the new class is named indocs/design/areas/settings.md.repo_labelsMCP tool. The delete-label confirm names the count.mcp-toolstest failed because thedocs/MCP.mdtool table didn't match the newrepo_labelsoutput. I regenerated it withbun scripts/mcp-tools.ts, and that test now passes. I haven't seen the forge's log for the closed pull #7894, so this is inferred from the one failure I found.maininto the branch with no conflicts.scripts/gate.ts,tsc --noEmitanddesign-lintare clean.scripts/fast.tssays the diff reaches 1459 of 1770 test files (an expected 125 minutes), so I picked the related tests by hand. The full suite is left to the forge's check.To try it, open Settings › Labels, click a label's count and check that the issues list opens filtered to that label.
🤖 Generated with Claude Code
Closes #7866