feat(filters): move date picker to sidebar, track visible photo order

Pulls the date range picker out of the filter-bar pill into a
dedicated always-visible section at the top of the left sidebar, and
teaches the timeline to publish its visible photo sequence so "open
first photo" shortcuts respect the on-screen order.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
root
2026-04-15 17:12:34 +02:00
parent 45f1649979
commit eac005109c
8 changed files with 764 additions and 184 deletions

View File

@@ -76,11 +76,18 @@ function MainApp() {
// of what filter key it's stored under.
const { data: allPhotos } = usePhotosQuery()
// Set up global keyboard shortcuts
// Set up global keyboard shortcuts. Prefer the Timeline's published
// visible sequence (which respects per-month ordering) over the raw
// backend list — otherwise "Space on a blank selection" would open
// the globally first photo, which isn't what the user sees at the
// top-left of the grid.
useKeyboardShortcuts({
onToggleLeftSidebar: () => setLeftSidebarOpen(!leftSidebarOpen),
onToggleRightSidebar: toggleRightSidebar,
getFirstPhotoId: () => allPhotos?.[0]?.id ?? null,
getFirstPhotoId: () =>
usePhotoStore.getState().visiblePhotoIds[0] ??
allPhotos?.[0]?.id ??
null,
})
// Settings page is a full-page section — hide filter bar, right sidebar,