Commit 2b80896
fix(dashboard): validate only tracked display types in buildReplacement
The previous fix used `if (flags.display || isTrackedDisplay)` which still
triggered validateWidgetEnums when the user passed --display with an untracked
type (e.g. text), causing a spurious ValidationError. Simplify to just
`if (isTrackedDisplay)` — untracked display types carry no dataset constraints
regardless of how the flag was set.
Also adds a test covering --display text to prevent regression.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 6b65f8f commit 2b80896
File tree
2 files changed
+15
-1
lines changed- src/commands/dashboard/widget
- test/commands/dashboard/widget
2 files changed
+15
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
108 | 112 | | |
109 | 113 | | |
110 | 114 | | |
111 | 115 | | |
112 | 116 | | |
113 | | - | |
| 117 | + | |
114 | 118 | | |
115 | 119 | | |
116 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
274 | 284 | | |
275 | 285 | | |
276 | 286 | | |
| |||
0 commit comments