memos/proto
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
..
api/v1 feat(activity-calendar): aggregate by ViewContext.timeBasis 2026-05-02 00:26:53 +08:00
gen feat(activity-calendar): aggregate by ViewContext.timeBasis 2026-05-02 00:26:53 +08:00
store feat(memos): choose created or updated time for memos (#5894) 2026-04-26 11:50:26 +08:00
buf.gen.yaml fix: openapi generation (#5349) 2025-12-15 10:55:04 +08:00
buf.lock chore(backend): update Go toolchain and dependencies (#5730) 2026-03-16 21:07:52 +08:00
buf.yaml chore: update gitignore 2025-04-17 23:11:36 +08:00
README.md chore: tweak readme 2024-02-23 08:25:54 +08:00

Guide

Prerequisites

Generate

buf generate

Format

buf format -w