revert: drop By Date sidebar node and supporting code
Tried it, didn't add value beyond what the date-grouped timeline already gives. The grouped, sticky-headered timeline (which kicks in by default whenever sortBy is taken_at) is the better affordance for date navigation — duplicating that as a sidebar drilldown was just clutter. Removes the full stack: - LeftSidebar: by-date tree node, byDateChildren computation, date-year-/date-month- handlers in applyLibraryNode, isItemActive branches that matched a date-range filter, the now-unused setDateFrom/setDateTo/filterDateFrom/filterDateTo selectors, and the Calendar icon import. - frontend/src/hooks/useDateBucketsQuery.ts deleted entirely. - api.ts: library.dateBuckets helper and DateBucketYear/Month types. - backend/app/routers/library.py: GET /library/date_buckets endpoint and its strftime aggregation query. The dateFrom/dateTo filter state stays in filterStore — the FilterBar still uses it for the "Date" range inputs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -113,16 +113,6 @@ export const photos = {
|
||||
}
|
||||
|
||||
// Library API
|
||||
export interface DateBucketMonth {
|
||||
month: number
|
||||
count: number
|
||||
}
|
||||
export interface DateBucketYear {
|
||||
year: number
|
||||
count: number
|
||||
months: DateBucketMonth[]
|
||||
}
|
||||
|
||||
export const library = {
|
||||
scan: async () => {
|
||||
const response = await api.post('/library/scan')
|
||||
@@ -138,12 +128,6 @@ export const library = {
|
||||
const response = await api.get('/library/stats')
|
||||
return response.data
|
||||
},
|
||||
|
||||
/** Year/month aggregation for the sidebar By Date drilldown. */
|
||||
dateBuckets: async (): Promise<DateBucketYear[]> => {
|
||||
const response = await api.get('/library/date_buckets')
|
||||
return response.data
|
||||
},
|
||||
}
|
||||
|
||||
// Heaps API
|
||||
|
||||
Reference in New Issue
Block a user