Background
PR #903 (merged 2026-07-12) fixed Android device detection by selecting views at runtime based on bucket presence, but it uses hardcoded androidViews — there's no way for a user to customise or persist the Android view layout separately from the desktop layout.
Problem
Currently, useViewsStore stores a single views array that isn't scoped to device type. When viewing an Android device, #903 returns the hardcoded androidViews instead of consulting the store, so:
- Android users can't edit their default view layout
- A desktop user who has both desktop and Android devices has no way to set different layouts for each device type
- The naming "per-device views" is slightly off — the right granularity is per-devicetype (all Android devices share a view set; all desktop devices share another)
Proposed Solution
Introduce a "views set" concept, analogous to category sets:
- Two built-in sets:
desktop and android (or mobile)
- Each set has its own default views that can be persisted and edited independently
useViewsStore.viewsForHost(host) resolves to the appropriate set based on the host's bucket profile
- Falls back to the bundled defaults if the set has never been customised
- UI to switch/edit views is scoped to the active device-type
This would keep the runtime detection from #903 intact while adding the persistence and editability layer on top.
Acceptance Criteria
Background
PR #903 (merged 2026-07-12) fixed Android device detection by selecting views at runtime based on bucket presence, but it uses hardcoded
androidViews— there's no way for a user to customise or persist the Android view layout separately from the desktop layout.Problem
Currently,
useViewsStorestores a singleviewsarray that isn't scoped to device type. When viewing an Android device, #903 returns the hardcodedandroidViewsinstead of consulting the store, so:Proposed Solution
Introduce a "views set" concept, analogous to category sets:
desktopandandroid(ormobile)useViewsStore.viewsForHost(host)resolves to the appropriate set based on the host's bucket profileThis would keep the runtime detection from #903 intact while adding the persistence and editability layer on top.
Acceptance Criteria
useViewsStorestores views keyed by devicetype (desktop/android)androidViewsdefault)