Problem
dispatch stats can print long repository, branch, and host breakdowns for users with a large session history. That makes the command noisy in a status pane, README snippet, or quick daily check.
Proposed solution
Add --top <n> to cap each breakdown list to the first N entries after the existing count sort. Apply the same cap to text and JSON output. Leave totals and the activity calendar unchanged.
Acceptance criteria
dispatch stats --top 5 prints at most five rows in each breakdown section.
dispatch stats --json --top 5 caps by_repository, by_branch, and by_host_type arrays.
--top 0 or a negative value returns a clear error.
- Calendar output still covers the full filtered session set.
- Tests cover parsing, text output, JSON output, and invalid values.
Complexity
S
Priority
Medium
Problem
dispatch statscan print long repository, branch, and host breakdowns for users with a large session history. That makes the command noisy in a status pane, README snippet, or quick daily check.Proposed solution
Add
--top <n>to cap each breakdown list to the first N entries after the existing count sort. Apply the same cap to text and JSON output. Leave totals and the activity calendar unchanged.Acceptance criteria
dispatch stats --top 5prints at most five rows in each breakdown section.dispatch stats --json --top 5capsby_repository,by_branch, andby_host_typearrays.--top 0or a negative value returns a clear error.Complexity
S
Priority
Medium