Commit 78b74b4
* feat(lint): warn on legacy pre-ADR-0021 dashboard analytics keys (#1878/#1894)
An author — very often an AI — can still write the removed inline-analytics
shape (categoryField/valueField/xAxisField/yAxisFields/aggregate/aggregation/
rowField/columnField) on a dashboard widget. Post-ADR-0021 the renderer routes
dataset-bound widgets through DatasetWidget and never reads these keys, so
authoring one is a silent no-op — exactly the "AI writes a dead property"
failure the liveness audit targets, but on the authoring side.
Add a `widget-legacy-analytics-shape` advisory rule to validateWidgetBindings
(already wired into `objectstack compile`): when a widget carries any legacy
key, emit a warning steering the author to `dataset` + `dimensions` + `values`,
with the fix spelled out. Fires whether or not a dataset is also present (the
keys are dead either way) and closes the gap where a dataset-less legacy
widget was skipped silently. Warning-only, per-widget suppressible via
`suppressWarnings`; never fails the build.
Tests: 4 new cases (dataset-bound legacy key, dataset-less legacy pivot,
clean dataset widget, suppression); full validate-widget-bindings suite green
(37 passed).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LddW4NaQBdf5FTEnBPpnUJ
* feat(lint): error (not warn) when a legacy dashboard widget binds no data source (#1878/#1894)
Escalation of the legacy-analytics-shape rule for the case that is an outright
bug rather than deprecated-but-working: a widget that uses the removed
pre-ADR-0021 inline keys (categoryField/rowField/valueField/…) as its ONLY
data wiring — no `dataset`, no `object`, no inline `data`. The renderer reads
only the dataset path, so such a widget has no data at all and renders
nothing.
New rule `widget-legacy-analytics-unrenderable` (severity error) fires for
exactly that case; the existing `widget-legacy-analytics-shape` stays a
suppressible warning when a data source IS present (the widget still renders,
the legacy keys are just ignored noise).
Rationale (AI-writes / human-reviews): a silently-blank widget is precisely
what a human reviewer misses. Because validateWidgetBindings runs only in the
CLI author path (`objectstack compile`/`validate`/`doctor`/`lint`, never in
Studio's runtime authoring), this fails the AI/code build in CI without
touching Studio. It only fails builds that are already broken (the widget
renders nothing regardless), so it surfaces an existing defect rather than
introducing a new gate. Errors are not suppressible.
Framework examples/fixtures carry no legacy-key dashboards, so nothing
regresses. Tests: 3 new cases (unrenderable→error, object-bound→warning,
error-not-suppressible); full suite 40 passed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LddW4NaQBdf5FTEnBPpnUJ
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1e145eb commit 78b74b4
2 files changed
Lines changed: 181 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
380 | 382 | | |
381 | 383 | | |
382 | 384 | | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
30 | 37 | | |
31 | 38 | | |
32 | 39 | | |
| |||
44 | 51 | | |
45 | 52 | | |
46 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
47 | 60 | | |
48 | 61 | | |
49 | 62 | | |
| |||
57 | 70 | | |
58 | 71 | | |
59 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
60 | 89 | | |
61 | 90 | | |
62 | 91 | | |
| |||
229 | 258 | | |
230 | 259 | | |
231 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
232 | 310 | | |
233 | 311 | | |
234 | 312 | | |
| |||
0 commit comments