Summary
Read-only Dashboard views should not expose the Dashboard File menu.
Detached current-workspace views and one-time session-bundle views currently still show Export Dashboard…. After #341/#344, Dashboard export resolves the latest committed primary workspace through workspace.loadCurrent(). In a read-only view, that primary workspace may be unrelated to the Dashboard currently displayed.
The result is misleading and potentially exposes unrelated local content: clicking Export from a shared or preview Dashboard can download the user's primary editable Dashboard and query dependencies rather than the visible read-only Dashboard.
Required behavior
Hide the entire File button/menu whenever the Dashboard is opened read-only.
This applies to:
- detached
current-workspace Dashboard views resolved in view mode;
- one-time
session-bundle Dashboard views;
- any future Dashboard source whose resolved mode is read-only.
Editable Dashboard mode must retain the complete File menu:
- Export Dashboard…
- Import Dashboard…
- Open for viewing…
Implementation notes
renderDashboard() already resolves a readOnly boolean before building the header. Do not construct or mount buildDashboardFileMenu() when readOnly === true.
Prefer omitting the control from the DOM rather than rendering it disabled or visually hidden. This keeps keyboard navigation and the accessibility tree consistent with the available operations.
This issue intentionally removes read-only export rather than making export route-aware. A future route-local read-only export could be introduced separately if required.
Acceptance criteria
Tests
Add Dashboard header tests covering:
- editable current-workspace mode includes the File button;
- detached view mode omits the File button;
- session-bundle mode omits the File button;
- a different primary workspace may exist without exposing any export action on the read-only page.
Related
Summary
Read-only Dashboard views should not expose the Dashboard File menu.
Detached current-workspace views and one-time session-bundle views currently still show Export Dashboard…. After #341/#344, Dashboard export resolves the latest committed primary workspace through
workspace.loadCurrent(). In a read-only view, that primary workspace may be unrelated to the Dashboard currently displayed.The result is misleading and potentially exposes unrelated local content: clicking Export from a shared or preview Dashboard can download the user's primary editable Dashboard and query dependencies rather than the visible read-only Dashboard.
Required behavior
Hide the entire File button/menu whenever the Dashboard is opened read-only.
This applies to:
current-workspaceDashboard views resolved in view mode;session-bundleDashboard views;Editable Dashboard mode must retain the complete File menu:
Implementation notes
renderDashboard()already resolves areadOnlyboolean before building the header. Do not construct or mountbuildDashboardFileMenu()whenreadOnly === true.Prefer omitting the control from the DOM rather than rendering it disabled or visually hidden. This keeps keyboard navigation and the accessibility tree consistent with the available operations.
This issue intentionally removes read-only export rather than making export route-aware. A future route-local read-only export could be introduced separately if required.
Acceptance criteria
.dash-file-btnor.dash-file-menu..dash-file-btnor.dash-file-menu.Tests
Add Dashboard header tests covering:
Related