~bigbes/lethe

ref: 5d910e8263ed5002b4f04c2c3fa3146dec4b6b78 lethe/web/src/features/home/useSessions.ts -rw-r--r-- 1.7 KiB
6971b2d0 — Eugene Blikh a month ago
web: palette — gate prefetch with enabled+staleTime per plan 4.2
346e6a81 — Eugene Blikh a month ago
web: project detail route scoped via ?cwd= sessions filter
b100feee — Eugene Blikh a month ago
web: home route with real session list, filters, keyboard cursor

- api/client.ts: apiFetch with AuthError/APIError, 401 and problem+json handling
- api/adapters.ts: SessionDTO→Session adapter with composite id and epoch conversion
- api/adapters.test.ts: 6 TDD tests covering all specified edge cases
- features/home/useSessions.ts: TanStack Query hook with since/tool/host params
- features/home/FilterChips.tsx: chip-bar with popovers, Esc/outside-click dismiss
- features/home/SessionsTable.tsx: grid table with cursor row highlight, formatStarted/formatTok
- features/home/useHomeCursor.ts: cursor hook with move/activate/jumpTo
- routes/index.tsx: Home route wired to real data, URL-driven filters, keyboard cursor
- routes/__root.tsx: cursorRef + KeyboardCursorContext for route-local cursor registration
- routes/session.$tool.$host.$id.tsx: stub for Phase 6
- styles/home.css: .home-table/.home-thead/.home-row/.home-row.cursor grid rules
- primitives/ToolDot.tsx: widened tool prop to string (Tool type is open-ended)