Skip to content

fix(dashboard): guard against undefined titles in list and resolve#1097

Merged
jared-outpost[bot] merged 1 commit into
mainfrom
issue-1094-fix-dashboard-list-undefined-title
Jun 12, 2026
Merged

fix(dashboard): guard against undefined titles in list and resolve#1097
jared-outpost[bot] merged 1 commit into
mainfrom
issue-1094-fix-dashboard-list-undefined-title

Conversation

@jared-outpost

@jared-outpost jared-outpost Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Add null-coalescing fallbacks at all unguarded d.title / w.title accesses across the dashboard domain. Self-hosted Sentry instances can return dashboards with null/undefined titles, bypassing the Zod schema (which is never used for runtime validation), causing TypeError: Cannot read properties of undefined (reading 'replace') crashes.

7 call sites fixed across list.ts and resolve.ts, plus 8 new tests covering undefined title handling in human output, JSON output, glob filtering, title resolution, and widget index resolution.

Testing

npx vitest run test/commands/dashboard/list.test.ts test/commands/dashboard/resolve.test.ts
# 108 tests passed

Closes #1094

Add null-coalescing fallbacks at all unguarded `d.title` / `w.title`
accesses across the dashboard domain. The Zod schema marks title as
required but is never used for runtime validation — self-hosted Sentry
instances can return dashboards with null/undefined titles, causing
TypeError crashes in escapeMarkdownCell and toLowerCase calls.

Fixes #1094
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/_preview/pr-1097/

Built to branch gh-pages at 2026-06-12 08:06 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

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

Files with missing lines (1)
File Patch % Lines
src/commands/dashboard/resolve.ts 100.00% ⚠️ 1 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    81.19%    81.19%        —%
==========================================
  Files          383       383         —
  Lines        26649     26651        +2
  Branches     17340     17354       +14
==========================================
+ Hits         21636     21638        +2
- Misses        5013      5013         —
- Partials      1798      1800        +2

Generated by Codecov Action

@jared-outpost jared-outpost Bot marked this pull request as ready for review June 12, 2026 08:14
@jared-outpost

jared-outpost Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

all checks green — unit tests, lint, typecheck, builds, e2e, and security scans passed. self-review looks clean: the changes are minimal null-coalescing guards at 7 call sites with 100% patch coverage. ready for review.

Comment thread src/commands/dashboard/resolve.ts
@jared-outpost jared-outpost Bot merged commit 8f9fd0c into main Jun 12, 2026
26 checks passed
@jared-outpost jared-outpost Bot deleted the issue-1094-fix-dashboard-list-undefined-title branch June 12, 2026 08:25
@jared-outpost

jared-outpost Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

auto-merge enabled — 136 lines changed across 4 files, all checks passing, no reviewer objections after the quiet period. the sentry bot's titleToId overwrite note is a pre-existing edge case in the suggestion path, not introduced by this fix.

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.

Fix: dashboard list crash when dashboard title is undefined (CLI-20D)

0 participants