feat: add sentry conversation command group#1020
4 issues
find-bugs: Found 4 issues (4 medium)
Medium
Pagination hint drops `--query` filter, causing next/prev to show unfiltered results - `src/commands/ai-conversations/list.ts:196-208`
When --query is active, the pagination hint omits -q "..." so following the hint silently shows a different (unfiltered) result set.
`org` positional is required and never resolved via `resolveOrg`, silently ignoring `SENTRY_ORG` and config - `src/commands/ai-conversations/view.ts:42-55`
The org positional is required with no optional: true and the func never calls resolveOrg, so SENTRY_ORG env vars, .sentryclirc config, and DSN auto-detection are all silently ignored — the command always requires an explicit org argument, unlike every other command in the same group.
getConversationSpans silently truncates results when 10-page limit is hit - `src/lib/api/ai-conversations.ts:89-112`
When a conversation has more than 10,000 spans, getConversationSpans silently returns incomplete data with no warning — unlike the existing autoPaginate helper which logs a warning and respects the configurable MAX_PAGINATION_PAGES limit.
`formatTimestamp` omits `* 1000` conversion, displaying 1970-era dates for conversation list timestamps - `src/lib/formatters/ai-conversations.ts:27-31`
The startTimestamp field (and all timestamps from Sentry APIs in this codebase) is a Unix epoch in seconds, but formatTimestamp passes it directly to new Date(ms) without multiplying by 1000, resulting in dates shown as January 1970.
⏱ 8m 22s · 2.5M in / 90.6k out · $3.37
Annotations
Check warning on line 208 in src/commands/ai-conversations/list.ts
sentry-warden / warden: find-bugs
Pagination hint drops `--query` filter, causing next/prev to show unfiltered results
When `--query` is active, the pagination hint omits `-q "..."` so following the hint silently shows a different (unfiltered) result set.
Check warning on line 55 in src/commands/ai-conversations/view.ts
sentry-warden / warden: find-bugs
`org` positional is required and never resolved via `resolveOrg`, silently ignoring `SENTRY_ORG` and config
The `org` positional is required with no `optional: true` and the `func` never calls `resolveOrg`, so `SENTRY_ORG` env vars, `.sentryclirc` config, and DSN auto-detection are all silently ignored — the command always requires an explicit org argument, unlike every other command in the same group.
Check warning on line 112 in src/lib/api/ai-conversations.ts
sentry-warden / warden: find-bugs
getConversationSpans silently truncates results when 10-page limit is hit
When a conversation has more than 10,000 spans, `getConversationSpans` silently returns incomplete data with no warning — unlike the existing `autoPaginate` helper which logs a warning and respects the configurable `MAX_PAGINATION_PAGES` limit.
Check warning on line 31 in src/lib/formatters/ai-conversations.ts
sentry-warden / warden: find-bugs
`formatTimestamp` omits `* 1000` conversion, displaying 1970-era dates for conversation list timestamps
The `startTimestamp` field (and all timestamps from Sentry APIs in this codebase) is a Unix epoch in **seconds**, but `formatTimestamp` passes it directly to `new Date(ms)` without multiplying by 1000, resulting in dates shown as January 1970.