fix(dashboard): guard against undefined titles in list and resolve#1097
Merged
jared-outpost[bot] merged 1 commit intoJun 12, 2026
Merged
Conversation
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
Contributor
|
Contributor
Codecov Results 📊✅ Patch coverage is 100.00%. Project has 5013 uncovered lines. Files with missing lines (1)
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 +2Generated by Codecov Action |
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. |
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. |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add null-coalescing fallbacks at all unguarded
d.title/w.titleaccesses 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), causingTypeError: Cannot read properties of undefined (reading 'replace')crashes.7 call sites fixed across
list.tsandresolve.ts, plus 8 new tests covering undefined title handling in human output, JSON output, glob filtering, title resolution, and widget index resolution.Testing
Closes #1094