You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(lint): flag dead action/route references in dashboard header actions (#3383)
Closes#3367. New validateDashboardActionRefs rule in @objectstack/lint, wired into os validate and os build: script/modal action targets that resolve to no defined action (or, for modal, the <verb>_<object> convention / a real object) fail validation; url targets that name an unregistered in-app route warn. External, interpolated, and opaque routes are skipped. Docs + changeset included.
Flag dead action/route references in dashboard header & widget actions (ADR-0049 for references, #3367).
7
+
8
+
`os validate` / `os build` now run a new `validateDashboardActionRefs` gate over every dashboard `header.actions[]` and widget `actionUrl`:
9
+
10
+
-`actionType: 'script' | 'modal'` — **error** unless `actionUrl` resolves to a defined action (`stack.actions` or an object's `actions`). `modal` also resolves via the runtime `<verb>_<object>` convention (`create_/new_/add_/edit_/update_` + a real object) and bare object names. A dangling target ships a button that renders and silently does nothing on click — a false affordance, exactly the "declared ≠ enforced" gap ADR-0049 closes, applied to references.
11
+
-`actionType: 'url'` — **warning** when a relative in-app path names a `objects/reports/dashboards/pages/views` route whose target does not exist in the stack. External URLs, interpolated (`${…}`) targets, and opaque routes are skipped to keep false positives near zero.
0 commit comments