memos/web/tests
Steven 8daef1dc89 feat(activity-calendar): aggregate by ViewContext.timeBasis
Fixes the inconsistency where switching the memo list to update_time
left the activity heatmap aggregating by created_time. The heatmap
now follows the same time basis as the list it sits next to.

Backend
- UserStats gains memo_updated_timestamps (additive proto field, tag 8).
- GetUserStats and ListAllUserStats populate it alongside the existing
  memo_created_timestamps. No DB migration; memo.updated_ts already
  exists on every row.

Frontend
- useFilteredMemoStats reads timeBasis from ViewContext and selects
  the matching timestamp source.
- StatisticsView and MonthNavigator forward timeBasis through to
  MonthCalendar / YearCalendar so tooltip text matches the basis
  ("X memos in DATE" vs "X memos updated on DATE").
- Falls back to memoCreatedTimestamps when an old server returns an
  empty memoUpdatedTimestamps array (detected by length divergence,
  since protobuf-es deserializes missing repeated fields as []).

Tests
- Backend: TestGetUserStats_MemoUpdatedTimestamps verifies the field
  is populated and reflects post-creation updates.
- Frontend: filtered-memo-stats covers create/update source switching
  and the old-server fallback path; activity-calendar-tooltip covers
  basis-aware label selection.

Spec and implementation plan committed under docs/superpowers/.
2026-05-02 00:26:53 +08:00
..
activity-calendar-tooltip.test.ts feat(activity-calendar): aggregate by ViewContext.timeBasis 2026-05-02 00:26:53 +08:00
auth-redirect.test.ts refactor(web/routing): guard-based auth flow, migrate tests to Vitest (#5848) 2026-04-18 01:06:54 +08:00
filtered-memo-stats.test.ts feat(activity-calendar): aggregate by ViewContext.timeBasis 2026-05-02 00:26:53 +08:00
guards.test.tsx refactor(web/routing): guard-based auth flow, migrate tests to Vitest (#5848) 2026-04-18 01:06:54 +08:00
memo-content-list.test.tsx chore: bump pnpm to 11.0.1 and align list test assertions 2026-04-30 20:05:39 +08:00
memo-content-security.test.tsx fix(web): preserve task checkbox state (#5867) 2026-04-20 23:27:00 +08:00
memo-editor-cache.test.ts fix(web): preserve task checkbox state (#5867) 2026-04-20 23:27:00 +08:00
memo-share-image.test.ts chore: remove duplicate tags from share image preview 2026-04-25 22:22:49 +08:00
oauth.test.ts feat(auth): add SSO user identity linkage (#5883) 2026-04-23 08:51:45 +08:00
redirect-safety.test.ts refactor(web/routing): guard-based auth flow, migrate tests to Vitest (#5848) 2026-04-18 01:06:54 +08:00
router-config.test.tsx refactor(web/routing): guard-based auth flow, migrate tests to Vitest (#5848) 2026-04-18 01:06:54 +08:00
setup.ts refactor(web/routing): guard-based auth flow, migrate tests to Vitest (#5848) 2026-04-18 01:06:54 +08:00