feat(issue-list): add --period flag, pagination progress, and count abbreviation#289
Open
feat(issue-list): add --period flag, pagination progress, and count abbreviation#289
Conversation
Contributor
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
Contributor
Codecov Results 📊✅ Patch coverage is 84.35%. Project has 3657 uncovered lines. Files with missing lines (3)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 75.35% 75.37% +0.02%
==========================================
Files 115 115 —
Lines 14760 14845 +85
Branches 0 0 —
==========================================
+ Hits 11121 11188 +67
- Misses 3639 3657 +18
- Partials 0 0 —Generated by Codecov Action |
36f5c6e to
8dad881
Compare
BYK
commented
Feb 24, 2026
…bbreviation - Add --period flag (default 90d) so the CLI matches the UI time window instead of the API's implicit 14d default; alias -p - Show an animated spinner on stderr (⠋⠙⠹… braille frames, 50ms / 20fps) when auto-paginating beyond 100 issues, updating with Fetching issues... N/limit; suppressed in JSON mode - Abbreviate large event counts (≥10k) with K/M/B suffixes so the COUNT column stays at 5 chars and never causes a layout shift - Add withProgress<T>() to polling.ts, sharing spinner infrastructure (frames, truncation, interval) with the Seer explain/plan commands - Expose onPage callback in listIssuesAllPages for per-page progress hooks
163e329 to
35d6daa
Compare
BYK
commented
Feb 24, 2026
…st spinner frame immediately - Remove .slice(0, COL_COUNT) from abbreviateCount — the toFixed(1) to Math.round() fallback already guarantees width, and slice would silently corrupt the value if it ever activated - Call scheduleFrame() directly instead of setTimeout(scheduleFrame, ...) in both poll() and withProgress() so the first spinner frame renders immediately
…led < 100 - Extend QUANTIFIERS to include P (peta, 10^15) and E (exa, 10^18) so the output is valid for any realistic input without a slice safety net - Only show the decimal place when scaled < 100, avoiding ugly '100.0M'-style output while still showing '12.3K' and '1.5M' where the decimal adds info
…iod in cursor context key - Fix abbreviateCount: compare rounded1dp (Number(scaled.toFixed(1))) against < 100 instead of raw scaled, preventing '100.0K' when e.g. scaled = 99.95 rounds up - Include period in pagination contextKey so --cursor last doesn't reuse a stale cursor from a query with a different --period value
…t limit - Promote to next tier when Math.round(scaled) reaches 1000 (e.g. 999950 → '1000K' was misleading, now correctly shows '1.0M') - Cap onPage reported count at options.limit so progress never shows '120/100' when the last page overshoots the requested limit
…ER caveat - When at the max (E) tier and rounded >= 1000 with no next tier to promote to, clamp to 999 to guarantee the output always fits within COL_COUNT - Add JSDoc note that Number(raw) loses precision above Number.MAX_SAFE_INTEGER (~9P), which is beyond any realistic Sentry event count
…d of unguarded padStart padStart only pads, never truncates — a non-numeric raw string would pass through at its original width and break column alignment. Return ' ?' instead to keep COL_COUNT width while visually flagging the unexpected input.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
…xtKey - Track per-target fetched counts and sum them so concurrent multi-project fetches show a stable combined total instead of jumping between values - Escape flags.period with escapeContextKeyValue in contextKey (same treatment as flags.query) to prevent pipe chars in user input from corrupting the key; guard with ?? '90d' fallback for test contexts that omit the flag
BYK
commented
Feb 24, 2026
…, report NaN counts - Extract startSpinner() from duplicated spinner code in poll() and withProgress() — eliminates ~30 lines of duplication - Set stopped = true unconditionally in poll() finally block, not just in non-JSON mode - Replace fetchedCounts array + reduce with running total + delta tracking in multi-target progress (onPage reports cumulative, not increments) - Use '?'.padStart(COL_COUNT) for NaN placeholder instead of hardcoded spaces, and report to Sentry as a warning for unexpected non-numeric input
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.
Summary
Three UX improvements to
sentry issue listfollowing the auto-pagination work in #274:--period/-tflag (default90d) so the CLI matches the UI's default time window instead of the Sentry API's implicit 14d cutoff, which was causing the count discrepancy (e.g. 114 vs 240 issues)Fetching issues... 200/500); reuseswithProgress<T>()inpolling.tsso the animation is consistent withsentry issue explain12.3K,150K,1.5M) so the column stays exactly 5 chars wide and never overflowsDetails
--periodalias is-t(time period), not-p(avoids confusion with--platformin other commands)onPagecallback added tolistIssuesAllPagesfor per-page progress hooksscaled < 100(e.g.12.3Kand1.5Mbut not100.0M)