mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-11-10 08:27:35 +00:00
Two issues in the timeline view:
- `now` was captured once with `useState(() => new Date())`, so the relative
date headers ("Today", "Yesterday", weekday names) never updated. A tab left
open across midnight kept labelling the previous day's documents as "Today".
Refresh `now` on a one-minute interval, but only swap the value when the
calendar day actually changes so same-day ticks don't cause re-renders.
- `groupDocuments(documents, now)` (sorts the full list and reparses every
createdAt) ran on every render, including during scroll and selection.
Memoize it on `[documents, now]` so it only recomputes when the data or the
day changes.
The pre-existing type error at timeline-view.tsx:279 is unrelated (present on
main).
|
||
|---|---|---|
| .. | ||
| app | ||
| components | ||
| hooks | ||
| lib | ||
| public | ||
| stores | ||
| .env.example | ||
| .gitignore | ||
| biome.json | ||
| components.json | ||
| globals.css | ||
| instrumentation-client.ts | ||
| middleware.ts | ||
| next.config.ts | ||
| open-next.config.ts | ||
| package.json | ||
| postcss.config.mjs | ||
| README.md | ||
| tsconfig.json | ||
| wrangler.jsonc | ||