memos/proto/api/v1
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
..
ai_service.proto feat(ai): add BYOK audio transcription (#5832) 2026-04-13 22:09:24 +08:00
attachment_service.proto feat(attachments): add Live Photo and Motion Photo support (#5810) 2026-04-06 10:47:01 +08:00
auth_service.proto feat: replace auto-increment ID with UID for identity provider resource names (#5687) 2026-03-05 21:01:22 +08:00
common.proto refactor: renovate list memos endpoint 2025-02-02 18:43:26 +08:00
idp_service.proto chore: standardize and improve API structure (#5224) 2025-11-05 22:36:51 +08:00
instance_service.proto feat(stats): admin instance resource statistics 2026-05-01 23:15:56 +08:00
memo_service.proto feat: add link metadata endpoints 2026-04-29 22:38:08 +08:00
README.md chore: update demo site 2025-02-27 23:05:43 +08:00
shortcut_service.proto fix(api): switch user resource names to usernames (#5779) 2026-03-25 09:11:17 +08:00
user_service.proto feat(activity-calendar): aggregate by ViewContext.timeBasis 2026-05-02 00:26:53 +08:00

Memos API Design

This API design should follow the guidelines and best practices outlined in the Google API Improvement Proposals (AIPs).