Skip to content

Add shared dashboard saved views and tab filters - #741

Open
tonyalaribe wants to merge 1 commit into
masterfrom
feat/dashboard-saved-views
Open

tonyalaribe wants to merge 1 commit into
masterfrom
feat/dashboard-saved-views

Conversation

@tonyalaribe

Copy link
Copy Markdown
Contributor

Saved filter sets and responsive audience tables were implemented through RUM-specific routes and UI. This adds the missing dashboard capabilities and configures RUM to use them.

  • Save named selections of arbitrary dashboard variables, apply them across tabs while preserving the time range, and delete them. YAML can declare views too.
  • Let each tab choose which dashboard filters it displays; omitted lists preserve existing behavior.
  • Configure minimum widget widths and share table wrapping and compact stat groups across dashboards.

UI-saved views live separately from the dashboard schema, keeping template updates live. Migration 0255 preserves existing RUM segments, including projects without an existing RUM dashboard. Remove Pages.Rum, its segment routes/table, and the unused RUM URL/form serialization helpers. Browser classification and session/cohort queries remain RUM domain logic.

Validation: final local checks passed: build, formatting, HLint, Weeder, 336 unit tests, 1,859 doctests, 1,202 integration examples (2 existing pending), 1,029 frontend tests, and 160 browser tests (1 existing skipped). This includes save/reload/apply/delete on a custom service/region dashboard, tab filter visibility, RUM session drilldown and responsive tables, project permissions, and legacy segment migration. Repeated hs-distill, hs-evasion-review, and hs-lob-review passes and a final simplification pass are complete. make ci-signoff is green, including the native amd64 deploy-image build (normal and profiling builds; image digest f524b6c562575a23c31daa46aa90e2d5e0a30a53c482f4b4adad5cc9cad0b845).

@monoscope-bot

monoscope-bot Bot commented Oct 26, 2026

Copy link
Copy Markdown

Monoscope production impact · Coverage unknown

Project 87576849-4941-49d3-a15d-680fef88a1a8 · reviewed b1f774b46c4bd89fd38c2649b2f2f321c6dcc145 · advisory

Evidence window (UTC): 2026-10-19 20:35:51.276858451 UTC → 2026-10-26 20:35:51.276858451 UTC

Coverage: Evidence is capped at 20 service/environment groups, monitors and dashboard queries. Telemetry describes the mapped service, not a proven changed-path or deployed-revision match. Monitor and dashboard references are project-wide; their relationship to the mapped service is unverified. Diff coverage is incomplete: only the first 30 files and 2000 characters per patch are inspected. The diff is incomplete: only the first 30 files and 2000 characters per patch were inspected. No schema-constraint, migration-success, rollback, or data-volume evidence was provided for the saved-view migration. Telemetry is service-wide and not matched to the changed path or deployed revision. Monitor and dashboard references are project-wide candidates; their relationship to the changed service and emitted attributes is unverified. No performance evidence was provided for dashboard rendering or responsive layout behavior.

Review history and settings

@claude

claude Bot commented Oct 26, 2026

Copy link
Copy Markdown

Review

Good consolidation: net deletion of Pages.Rum, one generic mechanism, atomic per-view SQL. No blocking bugs; mostly trimming.

Correctness / robustness

  • FromForm DashboardViewForm: traverse … parseUnique key over every form key 400s the whole request if any param repeats (e.g. repeated context params from location.search). Non-var- keys are discarded anyway, so only parse var-* keys (or lookup on unForm).
  • dashboardViewPostH validates the name after fetching the dashboard; validate first.
  • Both handlers call getDashAndVM twice. Have updateSavedView/deleteSavedView RETURNING saved_views and drop the refetch.
  • No cap on view count/value length on a JSONB array shared by project members; a small limit (e.g. 50) bounds it.

Succinctness

  • Layout derives Default: use def{x = Just 0, …} in Telemetry.hs and the ~8 doctest literals instead of adding minWidth = Nothing everywhere.
  • dashboardViews_: fromMaybe (fromMaybe "" v.value) … is repeated in selected (and in the POST handler); extract one varValue.
  • availableViews hand-rolls dedupe; use nubOrdOn (.name) (Data.Containers.ListUtils) over saved <> yaml.
  • The hxVals_ "js:{...URLSearchParams…, ...getTimeRange()}" string is duplicated on the delete button and save form; hx-vals inherits, so set it once on #dashboard-views.
  • updateSavedView/deleteSavedView share the same ARRAY-filter fragment and return an unused Int64; use interpExecute_.
  • dashboardTabGetH: _hxTriggerName is now unused; remove the parameter (and its route capture) rather than underscore it.

Tests / docs

  • Missing: YAML view overridden by a same-name saved view, then deleted to reveal the YAML one (promised in the docs). One integration assertion would pin it.
  • min_width scaling (*12 div w, max over children, ≤0 ignored) is only browser-tested; a doctest on gridStackAttrs is cheap.

Security

  • Writes scoped by project_id + id and gated by sessionAndProject; names are Lucid-escaped and toUriStr-encoded. No issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant