Skip to content

fix(event-view): auto-redirect issue short IDs in two-arg form (CLI-MP)#558

Merged
BYK merged 2 commits intomainfrom
byk/fix-event-view-issue-shortid
Mar 25, 2026
Merged

fix(event-view): auto-redirect issue short IDs in two-arg form (CLI-MP)#558
BYK merged 2 commits intomainfrom
byk/fix-event-view-issue-shortid

Conversation

@BYK
Copy link
Copy Markdown
Member

@BYK BYK commented Mar 25, 2026

When a user passes an issue short ID as the first of two positional args
(e.g., sentry event view JAVASCRIPT-NUXT-52 <event-id>), the two-arg
path in parsePositionalArgs treated it as a project slug, which always
failed because issue short IDs are uppercase while project slugs are
lowercase, and they include the issue number suffix.

The one-arg path already handled this correctly via looksLikeIssueShortId
detection, but the two-arg path only set a suggestion warning without
changing the control flow.

Fix: when looksLikeIssueShortId(first) is true in the two-arg path,
set issueShortId and redirect to the issue's latest event (matching
the one-arg behavior). The second argument is ignored with a warning.

Fixes CLI-MP

When a user passes an issue short ID as the first of two positional args
(e.g., `sentry event view JAVASCRIPT-NUXT-52 <event-id>`), the two-arg
path in `parsePositionalArgs` treated it as a project slug, which always
failed because issue short IDs are uppercase while project slugs are
lowercase, and they include the issue number suffix.

The one-arg path already handled this correctly via `looksLikeIssueShortId`
detection, but the two-arg path only set a suggestion warning without
changing the control flow.

Fix: when `looksLikeIssueShortId(first)` is true in the two-arg path,
set `issueShortId` and redirect to the issue's latest event (matching
the one-arg behavior). The second argument is ignored with a warning.

Fixes CLI-MP
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 25, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (dashboard) Rich terminal chart rendering for dashboard view by BYK in #555
  • (formatters) Colorize SQL in DB span descriptions by BYK in #546
  • (init) Treat bare slug as new project name when not found by BYK in #554
  • Add sentry sourcemap inject and sentry sourcemap upload commands by BYK in #547
  • Native debug ID injection and sourcemap upload by BYK in #543

Bug Fixes 🐛

  • (event-view) Auto-redirect issue short IDs in two-arg form (CLI-MP) by BYK in #558
  • Reject @-selectors in parseOrgProjectArg with helpful redirect by BYK in #557

Internal Changes 🔧

Coverage

  • Use informational-patch input instead of sed hack by BYK in #544
  • Make checks informational on release branches by BYK in #541

Other

  • (api) Collapse stats on issue detail endpoints to save 100-300ms by BYK in #551
  • (ci) Upgrade GitHub Actions to Node 24 runtime by BYK in #542
  • (db) DRY up database layer with shared helpers and lint enforcement by BYK in #550
  • (issue-list) Use collapse parameter to skip unused Snuba queries by BYK in #545
  • Bump Bun from 1.3.9 to 1.3.11 by BYK in #552
  • Regenerate skill files by github-actions[bot] in ec1ffe28

🤖 This preview updates automatically when you update the PR.

@BYK BYK marked this pull request as ready for review March 25, 2026 11:37
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 25, 2026

Codecov Results 📊

126 passed | Total: 126 | Pass Rate: 100% | Execution Time: 0ms

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 1277 uncovered lines.
✅ Project coverage is 95.33%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    95.32%    95.33%    +0.01%
==========================================
  Files          194       194         —
  Lines        27300     27343       +43
  Branches         0         0         —
==========================================
+ Hits         26023     26066       +43
- Misses        1277      1277         —
- Partials         0         0         —

Generated by Codecov Action

Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

The `suggestion` field was the only code path setting it (the two-arg
issue-short-ID branch), which was replaced with the `issueShortId`
redirect. No remaining return path in `parsePositionalArgs` or
`parseSingleArg` sets `suggestion`, so the type field, destructuring,
and conditional log were all unreachable dead code.

Addresses Cursor BugBot review comment.
@BYK
Copy link
Copy Markdown
Member Author

BYK commented Mar 25, 2026

Addressed Cursor BugBot's review comment about the dead suggestion field — removed it along with its destructuring and conditional log in c2cb343.

@BYK BYK merged commit ce3cc32 into main Mar 25, 2026
22 checks passed
@BYK BYK deleted the byk/fix-event-view-issue-shortid branch March 25, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant