Let users hide dashboard widgets from a Customize mode
Merged
GA
2mo ago+515+515+012345678901234567890123456789-120-120-012345678901234567890123456789
Problem
The dashboard shows every widget that has data. You can reorder and collapse widgets, but you can't remove one you don't use.
What changes
- Customize mode (
/?customize=true), opened from a new icon button (layout grid) in the dashboard header. It has no visible label: hovering it shows "Customize", and screen readers announce it by that name. Each widget gets a hide button (eye-off). A "Hidden widgets" card lists the hidden ones, and each can be added back with one click. Done leaves the mode. - Per-user preference.
hidden_sectionsis saved next tosection_orderinusers.preferences.PATCH /dashboard/sections/:section_key/hiddenadds or removes a single key under a row lock, so a stale tab can't un-hide a widget hidden in another tab. Unknown keys return 404. - Order is kept. Drag-reordering only sends the widgets on screen. Hidden widgets are put back after the widget they followed, so they return to their old place when added back.
- The view is kept. The Customize and Done links and the hide/add buttons carry the custom date range, the money flow month and accounts, and the spending trend month. After hiding a widget, focus lands on its re-add button. After adding one back, focus lands on the widget itself.
- Empty state. With every widget hidden, the dashboard shows an empty state that links to Customize instead of a blank grid.
- Hidden widgets cost nothing. Each widget now builds its own data inside its section builder, and a hidden widget's builder never runs. Its income statement, money flow and spending trend queries are skipped.
- Keyboard fix. The sortable card's keydown handler took Enter and Space from every control inside a card, which made the hide button unreachable from the keyboard. It now only handles keys pressed on the card itself. Inner controls used to opt out one by one with
stopPropagation.
Dashboard only, per user. No settings page, and Reports is unchanged.
Screenshots
The dashboard header before (left) and after (right), with the new Customize button:
Customize mode, with Outflows and Net Worth hidden (light and dark):

Every widget hidden:
Validation
bin/rails test: 10444 runs, 0 failures, 1 error. The error isReportsControllerTest's third-currency test, which fails on the 1st and 2nd of every month on main as well; #3902 fixes it.- System tests:
test/system/dashboard_customize_test.rb(new: keyboard hide, focus, add back, Done) andtest/system/dashboard_chart_drag_select_test.rb. With the keydown fix reverted, the new test fails. - RuboCop, erb_lint,
biome lintand Brakeman are clean.
No migration. The preference lives in the existing preferences JSONB column.
Summary by CodeRabbit
- New Features
- Added dashboard customization controls to hide and restore sections, with hidden sections listed for easy access.
- Hidden sections retain their order when you rearrange the dashboard, and dashboard view settings are preserved while customizing.
- When all sections are hidden, a prompt offers a way to return to customization.
- Bug Fixes
- Keyboard reordering shortcuts now respond only when the section itself is focused.