feat: add the two-tier dashboard (task 0017) #18
Reference in New Issue
Block a user
Delete Branch "task-0017-dashboard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements
.claude/tasks/0017-dashboard.md.Summary
Wires the bare
gitea-axicommand to the two-tier repository dashboard (ADR 0012):gitea-axi, also what the SessionStart hook runs): up to 3 open issues (number,title,state,author) and up to 3 open PRs (number,title,author,review), fetched in parallel atlimit=3, withreviewcomputed client-side from a parallel per-PR reviews fetch. The help block always hints at--full.gitea-axi --full): the open-PR table (number,title,author,labels,review) capped at 20 rows with acount: 20 of T totalline, plus open issue counts grouped by label — aggregated across every page of open issues (page size 50) up to a 1000-issue cap, suffixing each count with+when the cap is hit. Each issue counts under all its labels; a nonzero-onlyunlabeledbucket collects the rest.prs: 0 open/issues: 0 open. Issue fetches passtype=issues. Outside a Gitea repo the dashboard errors withREPO_NOT_FOUNDand-R/--loginhelp. The SDK prepends thebin:/description:header.Built test-first: 7 fixture-tier tests in
test/dashboard.test.ts, a no-repo case intest/detection.test.ts, and a live-instance tier intest/e2e/dashboard.test.ts. Full suite green (371 fixture tests).Deviations / decisions (see the task's Implementation Notes)
--fullis extracted inrunClibefore SDK dispatch (the SDK rejects pre-command flags), only when it is the sole remaining argument.paginate.ts'sPaginatedResultgained a backward-compatiblecappedflag to drive the+suffix.unlabeledlast); a defensive slice of the PR page to the requested limit; the full-tier count line is always emitted; a short dashboard/--fullnote added to top-level--help.Review
Three-axis
/review-uncommitted(task file as spec source).Risk
Overall: Medium
cli.tsdispatch and adds acappedfield to sharedpaginate.ts, but mostly a self-contained newdashboard.ts.--fullargv extraction.Standards — unaddressed findings (all judgement-call smells; no hard violations)
try/catchacrossfetchOpenPulls/fetchOpenIssues/fetchAllOpenIssues. Left as-is: thisclassifyHttpErrorwrapper is the established house shape (mirrorspr.ts/issue.tsfetch helpers).pr list. Left as-is:pr listalso merges--fieldsextras into the same row, so it is not the same operation; the dashboard's version is localized inprRowsWithReview(ADR 0006).OpenPulls { pulls, total }vsPaginatedResult { items, total }data clump. Left as-is:fetchOpenPullsdoes a single-page fetch, so reusingPaginatedResultwould force a meaninglesscappedfield.--fullbespoke argv parsing outside SDK dispatch. Left as-is: correct and documented; the SDK genuinely rejects pre-command flags, so this is the right place to handle the overload.Spec
Contract fully satisfied — no missing, partial, or wrong requirements. The only unrequested behavior is the deterministic label ordering and the defensive PR slice, both kept (noted above).