Skip to content

fix(dashboard): resolve dashboard by ID/slug in addition to title#559

Merged
BYK merged 1 commit intomainfrom
byk/fix-dashboard-slug-resolution
Mar 25, 2026
Merged

fix(dashboard): resolve dashboard by ID/slug in addition to title#559
BYK merged 1 commit intomainfrom
byk/fix-dashboard-slug-resolution

Conversation

@BYK
Copy link
Copy Markdown
Member

@BYK BYK commented Mar 25, 2026

Fixes CLI-MK

resolveDashboardId() only matched non-numeric references against dashboard
titles. Sentry's built-in dashboard has id: "default-overview" but
title: "General", so sentry dashboard view default-overview threw a
ValidationError despite listing the dashboard as available in the error.

Changes

  • ID-first matching: resolveDashboardId() now tries d.id before
    falling back to d.title (both case-insensitive). ID match takes priority
    when a value collides with a different dashboard's title.
  • Clearer error message: Says "matching" instead of "with title" and
    labels the available list columns as (ID Title).
  • Tests: 5 new cases covering slug match, case-insensitivity, ID vs title
    priority, title fallback, and improved error wording.

Fixes CLI-MK

resolveDashboardId() only matched non-numeric references against
dashboard titles. Sentry's built-in dashboard has id "default-overview"
but title "General", so `sentry dashboard view default-overview` threw
a ValidationError despite listing the dashboard as available.

Now matches against d.id first, then falls back to d.title. Also
improves the error message to label the ID/Title columns and says
"matching" instead of "with title".
@github-actions
Copy link
Copy Markdown
Contributor

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 🐛

  • (dashboard) Resolve dashboard by ID/slug in addition to title by BYK in #559
  • 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.

@github-actions
Copy link
Copy Markdown
Contributor

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.32%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    95.32%    95.32%        —%
==========================================
  Files          194       194         —
  Lines        27300     27302        +2
  Branches         0         0         —
==========================================
+ Hits         26023     26025        +2
- Misses        1277      1277         —
- Partials         0         0         —

Generated by Codecov Action

@BYK BYK marked this pull request as ready for review March 25, 2026 15:12
@BYK BYK merged commit 131003b into main Mar 25, 2026
22 checks passed
@BYK BYK deleted the byk/fix-dashboard-slug-resolution branch March 25, 2026 15:19
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