Skip to content
MSO CloudDocumentation

ADR 0024 — Org-editable dashboard tabs + the audience widget family

On this page
  • Status: Accepted (2026-07-31) — operator directive, after Fable review (D1–D5/D7/D8 Landed incl. live constraint probes; D6's generator half rides the V2 wave). Originally Phase 0 and the merge gate for WP6 (the dashboard-surface work package). Approved by Fable review 2026-07-30 after a chaired 15-agent debate whose chair verified the shipped tab model against the repo; rulings F4 (escape hatch) and F5 (base bands) are transcribed here, not re-litigated. Nothing merges into dashboard_widgets, widget-config.ts or WIDGET_REGISTRY under this programme before acceptance.
  • Date: 2026-07-30
  • Context owner: Platform
  • Related: ADR 0015 (every dashboard/report a config, not code — the strategy this ADR extends), ADR 0019 (D5 editor out of the bundle + the ratcheted route budget, D6 the ONE WIDGET_REGISTRY, D7 the date-semantics gate and operatorConfirmedDateSemantics), ADR 0022 (pillar audience + family content_intel), ADR 0023 (taxonomy catalog — the schema merge gate), ADR 0025 (proof-carrying numbers and quotes — companion, drafted the same day). CLAUDE.md §12, §21, §47, §51, §53, §67, §70, §71, §76. The programme's evidence bundle private/mso-content-intelligence/** is operator-local (gitignored); the quotations in this ADR are the durable record.

Implementation status (declared 2026-07-30)#

Nothing here is implemented. dashboard_tabs and dashboard_widgets.tab_id exist nowhere in live code (grep: 0 hits; the only tab_id occurrences in the tree are two lines of a stale planning document, refs/yng-insight-dashboard-prd-v2.md:353 and :385), pending_widget_kind has 0 hits, and the widgetConfigSchema union still carries its .passthrough() insight member. This ledger is filled decision-by-decision as work lands, per the ADR 0017 convention — an ADR that claims more than the code does is how a reader concludes the opposite of the decision.

Decision Status Evidence that will count when it lands
D1 — tabs become data, NULL = first tab Landed (2026-07-30) dashboard_tabs (packages/schema/src/tables/dashboard-tabs.ts) + RLS (rls-policies.sql org cohort, inventory green); dashboard_widgets.tab_id NULLABLE (tables/dashboards.ts:73-85); migrations 0130 (purely additive) + 0131 (constraints), both applied on a fresh PG16 with verify:rls 145 PASS; updateLayout input shape unchanged (diff hunks exclude :517-581); out-of-band idempotent backfill scripts/dashboards/backfill-template-tabs.ts.
D2 — compiled cap .min(1).max(12) + 8 Landed (2026-07-30) dashboard-templates/registry.ts:96-119 reads .min(1).max(TAB_MAX_PARENTS) importing the shared constant; dashboard-template-tabs.test.ts extended (1 parses, 12 parse, 13 rejected).
D3 — partition re-guarded at 3 layers Landed (2026-07-30) (a) 0131: UNIQUE (dashboard_id,id) + two composite FKs incl. PG15+ column-list ON DELETE SET NULL ("tab_id") — live-probed: cross-dashboard insert rejected, tab delete drops widgets to NULL; (b) apps/web/src/__tests__/dashboards-router-tabs.test.ts (web suite 140 files/1450 green); (c) scripts/audit/dashboard-tab-partition.py in audit:all, 9 negative controls via --self-test.
D4 — one typed audience widget config Landed (2026-07-30) audienceWidgetConfigSchema fifth union member (widget-config.ts:310-385): tailBucket: z.literal(true), discriminated topN (fixed 1–50 / coverage bp), required denominator+coverageBasis, filterScope with the "Toàn kỳ" badge; insight variant now a typed STRIP object (:374-377), backcompat proven (+12 cases).
D5 — new kinds only in WIDGET_REGISTRY Landed (2026-07-30) taxonomy_glossary, evidence_table, audience_distribution, data_receipt registered (20 kinds total); derived lists regenerated; widget-registry-single-source.py green (20 types / 23 dims / 21 breakdown dims); tables ride the existing dataset renderer, distribution the existing chart builders (§73 exact exports).
D6 — base bands, structural not captions Partial (2026-07-30) LANDED: renderer half — pure apps/web/src/server/audience-widgets.ts bands by (datasetKey, eligibleOnly, denominator), base labelled once per band (16 tests); archetype templates keep one base per row. OWED: blueprint-GENERATOR emission (V2, the deterministic generator) + a Tier-A band assertion once org-authored audience layouts exist.
D7 — bounded, tagged, ratcheted hatch Landed (2026-07-30) pendingWidgetKind literal tag in the typed config; scripts/audit/pending-widget-kind-ratchet.py in audit:all — compiled templates hard-fail at any hit, repo inventory ratchets against .pending-widget-kind-baseline.json ({}; shrink-only), non-vacuity proven by planted tags; 12 self-test controls.
D8 — deck = saved dashboard, in budget Landed (2026-07-30) Decks are saved dashboards: four ci-* archetype templates in the ONE registry, installed by the content-intelligence blueprint; no new FilterBar consumer (filterbar-scope.py unchanged: 8 core + 12 grandfathered); tab render = rows-else-template with active-tab-only mounting + ?tab= URL state; Studio page carries surface.ts + requirePlugin (§47); /dashboards/[slug] inside its unchanged caps (performance:budget green).

Context#

A Content Intelligence deliverable is a multi-tab deck: the five reverse-engineered client cases run 4–10 tabs each (glossary → overview → segment drill-down → entity focus → cross-dimension → actionable → evidence; architecture doc §1). The platform already has tabs — but as a compiled template affordance, declared in code by widget key and capped at two to four (apps/web/src/server/dashboard-templates/registry.ts:94-104, .min(2).max(4)). An org cannot create one, rename one, or move a widget between them, and no row anywhere records which tab a widget belongs to: dashboard_widgets has no tab_id column (packages/schema/src/tables/dashboards.ts:47-77) and positions live in the dashboards.layout jsonb as react-grid-layout coordinates (:31).

The shipped model is deliberately narrow, and its narrowness carries a safety property that is worth more than the feature. The registry comment states it verbatim (dashboard-templates/registry.ts:83-93):

Membership is declared here, by widget key, and NOTHING else changes: positions stay in the one shared coordinate space, edit mode keeps showing the flat canvas, and updateLayout is untouched. Widgets the org added itself (no templateWidgetKey) always fall into the FIRST tab, so a tab can never hide someone's own widget.

Stated plainly, because it is the whole reason D1 takes the shape it does: that property is today a comment plus a compile-time check, and nothing else. The superRefine partition validation (:107-151) runs when a TEMPLATE is parsed, over template-authored widget keys only; it cannot run for database rows and knows nothing about a widget an org added. All three debate proposals specified tab_id NOT NULL, which would replace a property enforced by absence with one that has to be enforced by a backfill — and in the one-step form, would leave existing tenants' dashboards unrenderable. This ADR turns tabs into data without giving that property up, and replaces the compile-time guard with guards that can see rows.

Fact Evidence
Tabs are a READ-MODE grouping over ONE shared coordinate space; edit mode keeps the flat canvas and updateLayout is untouched apps/web/src/server/dashboard-templates/registry.ts:83-93
Org-added widgets (no templateWidgetKey) always fall into the FIRST tab — "a tab can never hide someone's own widget" dashboard-templates/registry.ts:88-92
Template tabs are capped at 2–4, declared by widget key dashboard-templates/registry.ts:94-104 (.min(2).max(4), widgetKeys array)
The partition invariant (every key real, none twice, none left out) is enforced at COMPILE TIME, over TEMPLATE-authored keys only dashboard-templates/registry.ts:107-151 (superRefine; comment at :108-110 — "an unlisted widget would render on NO tab")
dashboard_widgets has no tab_id column; lineage is templateWidgetKey + origin packages/schema/src/tables/dashboards.ts:47-77 (:63 template_widget_key, :67 origin default 'custom')
Positions are react-grid-layout coordinates on the dashboard row packages/schema/src/tables/dashboards.ts:31 (layout jsonb, // react-grid-layout positions)
The DB identifiers dashboard_tabs / tab_id exist NOWHERE in live code grep: 0 hits outside this ADR; the only other occurrences are refs/yng-insight-dashboard-prd-v2.md:353 and :385 — a stale planning document. (The camelCase tabId exists for the shipped read-mode tab STRIP and the AI tab-summary prompts — a different concern, no persistence)
A read-mode tab STRIP already ships — ARIA tab pattern, roving tabindex, keyboard-operable — restating the safety property in its own docstring apps/web/src/app/(dashboard)/dashboards/[slug]/_components/dashboard-tabs.tsx:1-16, :103-108 ("so a tab can never move or hide a widget in the editor")
updateLayout entries are { widgetId, position } — no tab field, and the write is one CASE-expression UPDATE apps/web/src/server/routers/dashboards.ts:517-523 (input), :535-568 (transaction)
addWidget takes no tab field either apps/web/src/server/routers/dashboards.ts:827-836
There is NO router-level tRPC spec file for dashboards.ts today. The closest guards checked: dashboard-template-tabs.test.ts (template schema), dashboard-layout-rls.test.ts (text-scans layout.tsx), widget-registry.test.ts (type lists) — none instantiates the router apps/web/src/__tests__/dashboard-template-tabs.test.ts:1-8 tests dashboardTemplateSchema, not the router
widgetConfigSchema is a 4-member union, and the insight variant is the ONLY .passthrough() member apps/web/src/server/widget-config.ts:240-253
WIDGET_REGISTRY carries 16 kinds today apps/web/src/server/widget-registry.ts:239-511: kpi, time-series, bar, table, heatmap, insight, price-conflict, stacked-bar, pie, gauge, funnel, scatter, combo, treemap, time-period, dataset
§71's FROZEN core FilterBar consumer list already includes Saved Dashboards scripts/audit/filterbar-scope.py:32-41 — dashboards/[slug]/_components/dashboard-view.tsx and …/widget-renderer.tsx are CORE rows
ADR 0019 D7 makes a page-local picker a reason a surface stays pending absent operatorConfirmedDateSemantics docs/adr/0019-universal-report-surface.md:45-48
ADR 0019 D6 — ONE WIDGET_REGISTRY; the old lists became derived views and an audit fails on drift docs/adr/0019-universal-report-surface.md:44
ADR 0019 D5 measured −68.6 KB raw / −17.6 KB gzip on these routes and ratcheted the gzip cap 380k → 360k docs/adr/0019-universal-report-surface.md:43 (decision), :94 (measured result + ratchet)
The ACTUAL shipped caps for /dashboard and /dashboards/[slug] are raw 1,300,000 / gzip 360,000 apps/web/scripts/check-route-bundle-budget.mjs:37-38, with the D5 measurement recorded in the comment block at :31-36
pending_widget_kind exists nowhere yet grep: 0 hits outside this ADR
audit:all is the ONE place static audits are enumerated; performance:budget runs inside verify package.json:40, :45-46

Correction stated plainly. The architecture doc §3.6 and the handoff WP6 both describe the budget as "the existing ratcheted 360k raw route budget", and the judge record repeats the same 360k-raw figure, attributing the 380k→360k ratchet to ADR 0019 D5. That is a unit error: 360,000 is the gzip cap, and ADR 0019 D5's 380k→360k ratchet was a gzip ratchet (0019:94). The raw cap on those routes is 1,300,000 (check-route-bundle-budget.mjs:37-38). The settled decision is unchanged — the deck lands inside the EXISTING caps, both raw and gzip, with no cap raise — but the numbers in this ADR are the true ones.

Decision#

D1 — Tabs become DATA, and the shipped safety property is preserved verbatim

A new dashboard_tabs table holds rows per dashboard (parent_tab_id self-FK, depth ≤ 2 — a tab may have child tabs, a child tab may not), and dashboard_widgets gains a NULLABLE tab_id where NULL means the FIRST tab.

NULL-means-first-tab is the load-bearing choice, not an implementation convenience. It reproduces the shipped guarantee — "Widgets the org added itself (no templateWidgetKey) always fall into the FIRST tab, so a tab can never hide someone's own widget" (dashboard-templates/registry.ts:88-92) — as the default behaviour of an unset column. Every existing dashboard_widgets row is therefore already correct on the day the column is added, and every future org-added widget is correct without the writer having to remember anything: addWidget (routers/dashboards.ts:827-836) can stay tab-unaware and still be safe. tab_id NOT NULL would convert that from a property of the schema into a property of a backfill plus every future writer — the strictly weaker arrangement, dressed as the stricter one.

Everything else about the shipped model is preserved, deliberately:

  • Positions stay in the ONE shared coordinate space. A tab is a read-mode grouping over that space, not a coordinate namespace per tab.
  • Edit mode keeps the flat canvas. An operator editing a deck sees every widget, so a tab cannot hide a widget from the person rearranging it either.
  • updateLayout is untouched in shape: its input stays { widgetId, position }[] (routers/dashboards.ts:517-523). Tab membership is a separate, explicit mutation; it never rides along inside a drag-and-drop payload.

The migration is two steps, and one-step is FORBIDDEN (handoff §4.6):

  1. Add the nullable column and the dashboard_tabs table (purely additive, safe against live data); backfill tab_id for TEMPLATE-BOUND widgets from their template's declared tab membership; verify against real org data.
  2. Tighten only what can be tightened without breaking the NULL semantics — the same-dashboard constraints of D3. tab_id NOT NULL is not on this list and never becomes available: NULL is the semantics, not a temporary state.

D2 — The compiled template cap goes .min(2).max(4) → .min(1).max(12), plus up to 8 child tabs

The current bound (dashboard-templates/registry.ts:94-104) was sized for the one shipped case — a page whose widgets answer two questions. The evidence for the new bound is the real deliverable: the five reverse-engineered client decks run 4–10 tabs (architecture doc §1), so 4 is below the floor of the corpus, not near its ceiling. Twelve leaves headroom above the largest observed deck without becoming an invitation; child tabs are capped at 8 per parent, consistent with depth ≤ 2.

.min(1) rather than .min(2): once tabs are data an org can delete tabs down to one, and a single-tab deck is a legal state the schema must be able to express. A minimum of 2 would make the compiled template disagree with a shape the database can hold — the kind of disagreement that surfaces as a parse error on a customer's dashboard.

D3 — The partition invariant is re-guarded at THREE layers, because superRefine cannot see rows

Today the invariant — every widget on exactly one tab, no unknown keys, no duplicates — is enforced by superRefine at dashboard-templates/registry.ts:107-151. That check is compile-time and template-scoped: it runs when a template literal is parsed, over tpl.widgets keys. It can never run for dashboard_widgets rows, and an org-editable tab model is exactly rows. Three replacements, each at a layer that can actually see the data:

  • (a) DB layer. A same-dashboard CHECK plus a partial unique constraint: a widget's tab_id must reference a tab belonging to the SAME dashboard, and a widget may be attached to at most one tab. Plus a per-dashboard ROW cap, enforced in the DB and in the tab-create mutation, identical to the compiled bound: ≤12 parent tabs, ≤8 children per parent, ≤96 total — once tabs are org-editable rows, D2's compiled cap binds only templates, and an uncapped row table is §1's unbounded-growth class in a new place. The formal DDL is owned by the implementing work package (see Non-goals); what is fixed here is the boundary condition it must satisfy. This is the only layer that holds under a direct write.
  • (b) Behavioural test. A new router-level spec, apps/web/src/__tests__/dashboards-router-tabs.test.ts. Stated plainly: no router-level spec file for dashboards.ts exists today — the closest guard, apps/web/src/__tests__/dashboard-template-tabs.test.ts, tests dashboardTemplateSchema at the template layer (:1-8) and would pass unchanged while every row-level rule was violated. The new spec asserts the row-level behaviour a constraint cannot express: a NULL-tab_id widget renders on the first tab, deleting a tab never orphans a widget out of view, a cross-dashboard tab_id is rejected, and a re-ordered tab list never changes which widgets are reachable.
  • (c) Static audit. scripts/audit/dashboard-tab-partition.py, registered in audit:all (package.json:40 — the ONE registry; never inlined into a hook or workflow).

This triple is the class-of-bug contract applied as written: the strongest proportional guard at the owning layer (DB constraint > behavioural test > static audit), wired into the canonical gate — not a rule restated in a comment.

D4 — ONE audienceWidgetConfigSchema joins the union, and the last untyped widget config dies

A single new member is added to the widgetConfigSchema union (apps/web/src/server/widget-config.ts:248-253, four members today) — §21: widget config is a typed discriminated union, never z.record. Its shape encodes the corpus's numeric defects as type errors:

  • tailBucket: z.literal(true) — anti-pattern §12 ("Top-N bars carry the tail") at the type level, which is also what keeps §51 (headline == SUM of rendered rows, "Khác" carrying the rest) satisfiable on a truncated chart. A Top-N audience widget that drops its tail cannot typecheck. Tail-less Top-N charts are one of the numeric defects in the corpus — at least three of five legacy decks carry defects of this class (architecture doc §1); a runtime default would have been overridable, a literal is not.
  • topN as a discriminated union — { mode: 'fixed', n } | { mode: 'coverage', bp }. Coverage in basis points (§2 integer semantics), because a deck cut at "top 10" and a deck cut at "enough rows to cover 80%" are different decisions and must not share a number field.
  • REQUIRED denominator + coverageBasis — ADR 0022 D4 made coverageBasis a required property of every share-style metric; here it becomes a required property of the widget that renders one, so a share cannot be configured without declaring what it is a share of (§32/§35).
  • filterScope: 'window' | 'dataset_wide' — a widget that deliberately ignores the active date window (a whole-corpus glossary, a dataset-level receipt) declares it, and dataset_wide forces a "Toàn kỳ" badge in the render. The alternative is the Client B Tab-5 defect: a panel that silently ignores the filter beside panels that honour it.

In the same change, the .passthrough() insight variant is replaced with a typed one. Quoted because it is the last one (widget-config.ts:240-245):

/** Insight widgets are rendered by their bespoke component; config is empty. */
export const insightWidgetConfigSchema = z
  .object({
    dataSource: z.literal('insight').default('insight'),
  })
  .passthrough();

.passthrough() is how a union stays typed on paper while accepting anything in practice. Adding a strict member beside a permissive one leaves the permissive one as the path of least resistance for the next writer; typing it here means the union is actually closed when the audience family lands.

D5 — New widget kinds go in the ONE WIDGET_REGISTRY, never a parallel list

ADR 0019 D6 (:44) collapsed five hand-synchronized widget lists into one registry with the old lists as derived views and an audit failing on drift. The audience family extends that registry and nothing else (16 kinds today, widget-registry.ts:239-513).

  • MVP adds 4: taxonomy_glossary, evidence_table, audience_distribution (bar / pie / stacked through the EXISTING chart renderers, parameterized — not a new renderer), data_receipt.
  • V2 adds 5: segment_selector, entity_card_grid, cross_tab_heatmap, narrative_block, record_sampler.

Two corrections to architecture doc §3.6, stated rather than silently applied: it lists 8 kinds, omitting audience_distribution — which the handoff WP6 and the judge phasing record both name as an MVP kind, so the 9-kind set above is the settled one; and it says "the shipped 15 kinds" while the registry holds 16 today (widget-registry.ts:239-511).

Every new kind's title and label comes through t() (§70/§5 — vi is the source of truth), and the dataset_wide badge of D4 is an i18n key whose vi value is "Toàn kỳ", not a hardcoded literal in JSX.

Everything else the decks need reuses a shipped kind (16 today, widget-registry.ts:239-511). Adding a kind means one registry entry plus regenerated derived lists; a second list anywhere is the drift ADR 0019 D6 exists to prevent, and widget-registry-single-source.py (package.json:40) is what catches it.

D6 — Base bands are a STRUCTURAL fix (Fable ruling F5), not captions

Two adjacent widgets computed over different eligibility bases read as comparable and are not. This is a real, repeated corpus defect: Client B Tab-4 and Client A place inconsistent base populations side-by-side in one tab, and Client D's own lessons-learned records that captions failed as the mitigation. Shipping a known-failed control as the primary control is not an option. Three mandates:

  • The blueprint generator never emits a row that mixes eligibility bases. It emits base bands — a visually distinct section per base population, with the base labelled once per band rather than repeated per widget.
  • The renderer re-derives bands at render time, so a human-edited layout is covered too. When a row mixes bases, its widgets are regrouped into bands deterministically. This is a presentation regroup with no data change: no number moves, no widget disappears.
  • A Tier-A reconciliation assertion (§53, scripts/audit/data-reconciliation.ts) checks that no rendered row mixes bases without band separation — so the guarantee survives a refactor of either producer.

The base is part of the number (ADR 0022 D4), and a band is how a layout says so once instead of hoping a caption is read.

Amendment (2026-11-15). An authored row stays one band: when a row holds an audience widget and every member declares a width with the widths summing to 12 or less, the renderer keeps it side by side, whatever its card classes (KPI strip, stat tile, chart, note card) or bases. Each card still states its own unit. The base regroup above applies only to undeclared rows and rows that overflow the grid. Enforcement: planAudienceBaseBands (apps/web/src/server/audience-widgets.ts), tests in audience-widget-bands.test.ts.

D7 — The escape hatch is bounded, tagged, and ratcheted (Fable ruling F4)

An analyst will meet a chart shape the registry does not have, mid-delivery. The chair proposed no escape hatch; the ruling overrules that, with a control attached, because the failure mode of "no hatch" is a silent return to static HTML.

  • Same-day answer: compose two shipped kinds — evidence_table + narrative_block — and tag the INSTANCE pending_widget_kind (0 hits in the tree today, so the tag is genuinely new surface).
  • The tag is load-bearing, not a TODO. A per-org ratchet audit lists open instances and the count may only SHRINK — the §67 design-token-baseline pattern, where the baseline file only ever moves down. Decay becomes visible and counted instead of silent.
  • Each tag auto-files the widget-kind request, so the queue is a consequence of the workaround rather than a separate discipline someone has to remember.
  • The real shape ships as a product release with a one-sprint SLA, owned by the platform team. Expected volume early is roughly one new shape per two clients; if the open count grows two sprints running, the SLA is being violated — the ratchet is the detector, not the cause.

D8 — The deck is a SAVED DASHBOARD, and it lands inside the shipped route budget

Delivery surface. CI decks render as saved dashboards. This is not a convenience: §71's frozen CORE FilterBar consumer list already includes Saved Dashboards (scripts/audit/filterbar-scope.py:38-39 — dashboards/[slug]/_components/dashboard-view.tsx and …/widget-renderer.tsx), so a deck inherits the shared FilterBar's date semantics legitimately: no new consumer row, no page-local picker, and no ADR 0019 D7 waiver (:45-48 — a page-local picker is precisely what keeps a surface pending absent operatorConfirmedDateSemantics). All three debate proposals built a page-local filter bar citing §71; that argument inverts both rules at once. Taxonomy facets are widget-level segment_selector controls (D5), never a second filter bar — a facet is a property of the widget that uses it, not of the page. The tab strip itself is the SHIPPED read-mode component — dashboards/[slug]/_components/dashboard-tabs.tsx (ARIA tab pattern, keyboard-operable, :1-16, :103-108) — extended for data-backed tabs, never forked (§49). Deck pages sit behind requirePlugin('content-intelligence') (§47 — nav hiding is not enforcement), like every page of the plugin.

Performance (§76). Per-tab code-split with URL-addressable tab segments: only the active tab's bundle loads. A 12-tab deck on one route with one QueryClient would otherwise make every large client an operator-review event — the exact cost this programme exists to remove. The budget claim must hold at the WORST case D3's row cap admits — 12 parents × 8 children = up to 96 tab panels — not the nominal 12; per-tab splitting is what makes that a per-tab cost instead of a route cost. The deck lands inside the EXISTING caps for /dashboards/[slug]: raw 1,300,000 / gzip 360,000 (apps/web/scripts/check-route-bundle-budget.mjs:37-38), the gzip figure already ratcheted down from 380k by ADR 0019 D5 (0019:94). No cap raise. A cap change requires before/after next build route stats plus operator review (§76) — never a dev impression, and never as a side effect of landing a feature. Supporting constraints, all shipped rules rather than new ones: charts through exact exports via packages/charts/src/runtime.ts (§73), no @yng/metrics or @yng/connectors-core barrel in a client bundle (§73), one tRPC/QueryClient provider per route tree (§74), evidence tables cursor-paginated.

Non-goals

  • No DDL in this ADR. Tables, columns, keys, indexes and constraint syntax are owned by the implementing work package (WP1 schema / WP6 surface). Where this ADR names a constraint — the nullable tab_id, depth ≤ 2, the same-dashboard CHECK and partial unique of D3 — that constraint is a boundary condition the WP must satisfy, not an optional suggestion.
  • No change to updateLayout semantics or the shared coordinate space. Its input shape stays { widgetId, position }[] (routers/dashboards.ts:517-523), positions stay in one space, and edit mode stays flat. A diff that moves tab membership into the layout payload is out of scope by construction (D1).
  • No new FilterBar consumer and no page-local date picker for any audience surface — a new row in filterbar-scope.py or a local picker on a deck route contradicts D8, §71 and ADR 0019 D7 simultaneously.
  • No widget kinds beyond the named sets (D5's 4 MVP + 5 V2). A shape outside them goes through D7's hatch and then through a product release — never through a per-client kind (ADR 0023's no-per-client-anything rule applies unchanged).
  • Nothing about Tier-2 narrative content — proof-carrying numbers and quotes, publication approval, edit-and-lock and the grounding gates are ADR 0025's scope. This ADR decides only that narrative_block is a registered widget kind.
  • No tab-level permissions, no per-tab sharing, no tab-scoped filters. A tab is a read-mode grouping; making it an authorization or filtering boundary would re-create, in a new place, the "a tab can hide something" failure D1 exists to prevent.

Consequences#

  • A deck becomes org-editable without a new report surface. Tabs, widgets and layout are the shipped Layout Editor primitives (ADR 0015 strategy, ADR 0019 mechanism); the audience programme adds rows and registry entries, not a parallel renderer. That is the whole reason to extend rather than fork.
  • NULL becomes semantically load-bearing, and that must be documented at the column. tab_id IS NULL means "first tab", not "unassigned" and not "missing data". A future reader who "cleans up" the nullable column by backfilling and adding NOT NULL removes the safety property in a diff that looks like hygiene. The column comment, D3's behavioural spec and this ADR are the three places that say so.
  • The partition invariant now costs three artifacts instead of one superRefine. A DB constraint, a router-level spec that does not exist yet, and an audit in audit:all — all three are standing obligations. If any is deleted or allowlisted away, tabs can hide widgets again and the compile-time check will still be green, because it was never watching rows.
  • Typing the insight config may break persisted widget configs. .passthrough() (widget-config.ts:241-245) has been accepting arbitrary jsonb; a strict variant will reject whatever drifted in. The implementing change owes a read of the live shapes and a migration or a tolerated-field list — this is a known cost of D4, accepted, not a surprise to discover in production.
  • The route budget becomes a design constraint on deck size, not a review afterthought. Per-tab splitting means a 12-tab deck is affordable; it does not mean a tab may import anything. Every new audience widget is measured against pnpm run performance:budget (package.json:45-46) at unchanged caps, and the honest consequence is that some chart libraries will simply not be available to this family.
  • The escape hatch will be used, and the ratchet is the only thing that makes that safe. A growing pending_widget_kind count is a signal about the widget-kind SLA, not about the ratchet. Reading it the other way — raising the baseline because the count grew — converts F4's bounded hatch into the silent decay the chair feared.
  • Base bands change how layouts look, including hand-made ones. The renderer regroups mixed-base rows deterministically (D6), so an analyst's deliberate side-by-side arrangement of two different bases will be re-laid-out. That is intended: the arrangement was the defect.

Alternatives considered#

  • tab_id NOT NULL (what all three debate proposals specified). Rejected on the verified property: the shipped model guarantees that an org's own widgets always land on the first tab "so a tab can never hide someone's own widget" (dashboard-templates/registry.ts:88-92). NOT NULL replaces a guarantee held by the schema's default with one held by a backfill plus every future writer, and in the one-step form (one proposal's) it can leave existing tenants' dashboards unrenderable. NULL-means-first-tab costs one sentence of documentation and zero backfill risk.
  • A bespoke multi-tab report surface for decks. Rejected: it forks the renderer ADR 0019 D6 unified, needs its own widget list, its own editability model and its own date semantics, and ends as the static-HTML workflow with a login. Extending dashboard_widgets + WIDGET_REGISTRY is strictly less code and inherits every gate already pointed at those.
  • A page-local filter bar / date picker for decks (all three proposals, citing §71). Rejected on both rules at once: §71's frozen list already contains Saved Dashboards (filterbar-scope.py:38-39), so no new consumer is needed, and ADR 0019 D7 (:45-48) makes a page-local picker a reason a surface stays pending — the proposals would have made every deck non-editable to gain a control they already had.
  • Extending superRefine to cover DB rows. Rejected as impossible rather than unwise: it is a Zod refinement over a parsed template literal (registry.ts:107-151) with no database access, and a template it never sees cannot constrain a row an org wrote. Attempting it would produce a guard that looks like coverage and is not.
  • No escape hatch (the chair's position). Overruled by Fable ruling F4. The chair's concern — silent decay into tables — is real, and is answered by making the workaround tagged and counted (pending_widget_kind + a shrink-only ratchet) rather than by forbidding it. Forbidding it does not remove the mid-delivery chart shape; it removes it from the platform's view.
  • Captions for adjacent-base mismatch. Rejected on the client's own evidence: Client D's lessons-learned records that captions failed, and the same defect recurs in Client B Tab-4 and Client A. F5's structural fix (generator emits bands, renderer re-derives them, Tier-A asserts it) is the only version that survives a human editing the layout afterwards.
  • Raise the /dashboards/[slug] cap for a 12-tab deck. Rejected: the caps (check-route-bundle-budget.mjs:37-38) were RATCHETED DOWN by ADR 0019 D5 on measured evidence (0019:94), and per-tab code-splitting removes the reason to raise them. §76 admits a cap change only with before/after next build stats and operator review — a bar this feature has no need to clear.
  • topN as a plain number with an optional tail flag. Rejected: an optional tail is an optional bug. tailBucket: z.literal(true) makes §12 unrepresentable-if-violated, and the fixed | coverage discrimination keeps two different editorial decisions from sharing one field.