Commit 629012c
refactor(list): align all list commands to issue list standards (#453)
## Summary
Aligns all `list` subcommands to the standards established by `sentry
issue list`.
### Key Changes
1. **`sentry log list` — trace-id as positional arg**
- Removed `--trace` flag entirely
- Accept trace-id positionally: `sentry log list <trace-id>`, `sentry
log list <org>/<trace-id>`
- Added `parseLogListArgs()` with `isTraceId()` disambiguation (32-char
hex → trace mode, otherwise project mode)
- Added `--period` / `-t` flag (default `90d`, trace mode auto-uses
`14d`)
- JSON output now returns `{ data, hasMore }` envelope instead of flat
array
2. **`withProgress` spinner in all list commands**
- `trace list`, `span list`, `trace logs`, `org list`, `trial list`,
`project list`
- Added to `org-list.ts` framework so `team list` and `repo list` get
spinners automatically
3. **JSON envelope alignment**
- `trace logs` now returns `{ data, hasMore }` envelope
4. **Test improvements**
- Fixed pre-existing 5s timeout failures in `dispatchOrgScopedList`
tests (missing `resolveEffectiveOrg` mock)
- Complete rewrite of `log/list.test.ts` (49 tests)
- Added `isTraceId()` tests to `trace-id.test.ts`
### New helper
`isTraceId(value: string): boolean` — non-throwing check extracted from
`validateTraceId` core logic. Used by `log list` for positional
disambiguation.
### Files changed (15)
| File | Change |
|------|--------|
| `src/lib/trace-id.ts` | Add `isTraceId()` |
| `src/commands/log/list.ts` | Major: remove --trace, array positional,
--period, withProgress, JSON envelope |
| `src/commands/trace/list.ts` | Add withProgress |
| `src/commands/span/list.ts` | Add withProgress |
| `src/commands/trace/logs.ts` | Add withProgress + JSON envelope |
| `src/commands/org/list.ts` | Add withProgress |
| `src/commands/trial/list.ts` | Add withProgress |
| `src/commands/project/list.ts` | Add withProgress |
| `src/lib/org-list.ts` | Add withProgress to framework |
| `test/` files | Updated/new tests |
---------
Co-authored-by: betegon <miguelbetegongarcia@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>1 parent 4bba476 commit 629012c
20 files changed
Lines changed: 890 additions & 304 deletions
File tree
- plugins/sentry-cli/skills/sentry-cli
- src
- commands
- dashboard
- issue
- log
- org
- project
- span
- trace
- trial
- lib
- test
- commands
- log
- trace
- e2e
- lib
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
602 | | - | |
| 602 | + | |
603 | 603 | | |
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
610 | | - | |
| 610 | + | |
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
814 | 814 | | |
815 | 815 | | |
816 | 816 | | |
817 | | - | |
| 817 | + | |
818 | 818 | | |
819 | 819 | | |
820 | 820 | | |
| |||
954 | 954 | | |
955 | 955 | | |
956 | 956 | | |
957 | | - | |
| 957 | + | |
958 | 958 | | |
959 | 959 | | |
960 | 960 | | |
| |||
0 commit comments