Skip to content
MSO CloudDocumentation

ADR 0063 — A group of dashboards is a Page with tabs, under a nested filter scope

On this page
  • Status: Accepted (2026-11-15)
  • Date: 2026-11-15
  • Owners: Platform (dashboards, dataset packs).
  • Related: ADR 0043 (Page / Dashboard / Card), ADR 0042 (dataset packs), ADR 0024 (tabs).

Context#

A tenant needs several dashboards over one dataset behind one menu entry: a filter row that applies to all of them, a tab per dashboard, filters inside a tab that apply only there, and chart filters that apply only to one chart. Several such groups may read the same data.

The platform already has the hierarchy: a dashboards row is a Page, its dashboard_tabs rows are its Dashboards, and dashboard_widgets rows are its Cards (ADR 0043 D1). What was missing was the filter law between the levels. A tab's bar replaced the page's selection instead of narrowing it, a tab's picks were page-wide URL state that followed the reader to a sibling tab, and the corpus period select pinned the date window over the page's own date controls.

Decisions#

D1 — A group of dashboards is one Page; each top-level tab is one dashboard

No group table. A pack declares one page with tabs and one menu entry. Two groups over the same data are two pages over the same datasets.

D2 — Nested filter scope is a per-page opt-in

A pack page sets frame.filterScope: "nested" and declares its page filter row in frame.globalFilter (a tab_filter_bar config). Under it:

  • Values conjoin per dimension; date ranges intersect. A pair with no common value, or disjoint ranges, sets empty on the effective state. Every audience card then shows "no data" and mounts no query. A wider scope is never shown in its place. null (no restriction) and []/NONE (nothing) keep their meanings.
  • The page row writes tf*. A tab's own bar writes tt.<tabId>.*, which is read only while that tab is open (?tab=), so it never reaches a sibling tab and survives a switch back.
  • parseAudienceTabFilter returns the intersection, so every existing reader (cards, drilldowns, local-filter scope) gets the nested scope without change. Bars read and write their own namespace through parseAudienceTabFilterRaw.
  • The page row's dates are the only time control: no corpus period select, no period pin, and an unnarrowed card reads its whole corpus (pageDates on the offer).
  • A card that cannot express a leg keeps the existing abstain line, "Toàn kỳ — không theo bộ lọc". A card is never shown unfiltered without that line.

A page without the opt-in carries no tt.* keys. It reads exactly as before.

D3 — Page chrome as frame data

frame.method (the "Nguồn & cách tính" dialog), frame.sectionNav (a section-jump strip per tab) and the control option labelStyle: "count" are frame or control data. They are read from the installed pack row at render time, with no migration.

D4 — Folding pages into tabs

An upgrade already deletes pack pages the new version no longer declares, together with their shares and menu pins. pages[].redirectFrom maps an old page key to a tab of the new page, so the old address opens that tab. Only pack-lineage rows are touched; a user's own dashboard is never matched.

Deleting a page also deletes its deck chat threads. chat_conversations.deck_dashboard_id cascades.

D5 — A tab's declared rows are its layout

A pack row that sets every member's width (summing to 12 or less) renders as declared, even when it mixes card classes, so a tab's KPI strip, tiles and a chart can share one row. This amends ADR 0024 D6 for authored rows; loose rows still regroup by base.

Upgrade path#

A tab belongs to one Page and inherits its permissions. A dashboard may need to sit in two groups at once, or carry its own permission or share identity. At that point, extract shared dashboard definitions plus group placements that reference them, keeping existing Page URLs as placements. That is a schema change (tables, RLS, runtime ACL), and nothing requires it today.

Consequences#

  • Exports and public shares still read the stored bar defaults, not the live nested state.
  • Deck chat scope follows separately; see the chat-scope work.
  • The frame schema is strict: the reading code must deploy before a pack declares these keys, or the whole frame is dropped.