Skip to content

Dashboard: persist the layout at the site level so it can be shared across users #82006

Open

Description

@retrofox

Part of #79231. Related to #81967 and #81900.

What problem does this address?

The dashboard layout persists as a user preference: core/dashboard.dashboardLayout, written through the preferences store from routes/dashboard/hooks/use-dashboard-layout/use-dashboard-layout.ts. Two consequences:

  • A layout cannot be shared. Every user starts from the default and arranges their own copy; a curated dashboard for a site or for a group of users is not expressible.
  • Interface governance has no data-level counterpart. WidgetDashboard.Policy can lock an instance against removal, but nothing on the server can refuse the write, because users are entitled to write their own preferences.

The engine is agnostic of the data: it consumes the layout through props and reports changes through onLayoutChange. Where the layout lives, and who may write it, is the consumer's decision, so this is a change in the dashboard route, not in the engine.

What is your proposed solution?

Store the layout at the site level, with the user preference as an optional override, and map user capabilities to the route's policy from that model:

  • A site-level layout, as an option or an entity with its own capability checks, that every user reads.
  • Per-user overrides only where the site allows them.
  • Server-side validation of writes against the same rules the policy expresses, so a locked instance cannot be removed at the data level either.

The storage (option or entity) and the capability model are open. A future model with several shareable dashboards would subsume this; a site-level layout is the smallest step that makes sharing and enforcement possible.

Tasks

  • Decide the storage and the capability model.
  • Persist the site-level layout and read it from the route.
  • Map capabilities to the route's policy and validate writes on the server.

Location

  • routes/dashboard/hooks/use-dashboard-layout/use-dashboard-layout.ts
  • routes/dashboard/stage.tsx

Activity

  1. added
    [Type] Enhancement
    [Feature] Dashboard
    on Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Dashboard[Type] Enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions