memos/server/router/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
..
test feat(activity-calendar): aggregate by ViewContext.timeBasis 2026-05-02 00:26:53 +08:00
acl_config.go feat: add link metadata endpoints 2026-04-29 22:38:08 +08:00
acl_config_test.go feat(notification): add smtp email settings 2026-05-01 18:48:21 +08:00
ai_service.go refactor(ai): use official provider SDKs (#5845) 2026-04-16 22:27:57 +08:00
attachment_exif_test.go fix(api): reduce memory pressure in backend paths 2026-04-16 23:08:48 +08:00
attachment_motion.go feat(attachments): add Live Photo and Motion Photo support (#5810) 2026-04-06 10:47:01 +08:00
attachment_service.go fix(auth): harden authorization and username validation (#5890) 2026-04-25 21:24:16 +08:00
auth_service.go fix(auth): harden authorization and username validation (#5890) 2026-04-25 21:24:16 +08:00
auth_service_client_info_test.go fix: fix legacy username auth flows (#5885) 2026-04-23 22:35:38 +08:00
common.go fix(auth): harden authorization and username validation (#5890) 2026-04-25 21:24:16 +08:00
common_test.go fix(api): reduce memory pressure in backend paths 2026-04-16 23:08:48 +08:00
connect_handler.go feat(ai): add instance AI providers and transcription (#5829) 2026-04-12 19:23:34 +08:00
connect_interceptors.go fix: fix legacy username auth flows (#5885) 2026-04-23 22:35:38 +08:00
connect_interceptors_test.go fix(auth): harden authorization and username validation (#5890) 2026-04-25 21:24:16 +08:00
connect_services.go feat(stats): admin instance resource statistics 2026-05-01 23:15:56 +08:00
header_carrier.go fix(backend): correct generic type parameter in withHeaderCarrier helper 2025-12-12 08:06:13 +08:00
health_service.go refactor(store): remove deprecated migration_history table and backward compatibility code 2025-12-01 22:54:30 +08:00
idp_service.go fix(lint): correct goimports struct literal alignment after removing write-only credential fields (#5794) 2026-03-29 20:31:09 +08:00
instance_service.go feat(notification): add smtp email settings 2026-05-01 18:48:21 +08:00
instance_stats.go feat(stats): admin instance resource statistics 2026-05-01 23:15:56 +08:00
instance_stats_test.go feat(stats): admin instance resource statistics 2026-05-01 23:15:56 +08:00
link_metadata_test.go feat: add link metadata endpoints 2026-04-29 22:38:08 +08:00
memo_attachment_service.go fix(security): enforce attachment ownership on memo updates 2026-05-01 18:23:53 +08:00
memo_batch_helpers.go feat(mentions): add memo mention parsing, notifications, and rendering (#5811) 2026-04-06 22:16:53 +08:00
memo_mention_helpers.go feat(notification): add smtp email settings 2026-05-01 18:48:21 +08:00
memo_relation_service.go fix(webhooks): trigger memo updates for attachment and relation changes (#5795) 2026-03-30 20:01:16 +08:00
memo_service.go feat(notification): add smtp email settings 2026-05-01 18:48:21 +08:00
memo_service_converter.go feat(memos): choose created or updated time for memos (#5894) 2026-04-26 11:50:26 +08:00
memo_service_filter.go refactor: deprecate old filter 2025-07-22 21:25:57 +08:00
memo_share_service.go fix: reduce list memo query overhead (#5880) 2026-04-22 09:31:48 +08:00
memo_update_helpers.go fix(webhooks): trigger memo updates for attachment and relation changes (#5795) 2026-03-30 20:01:16 +08:00
notification_email.go feat(notification): add smtp email settings 2026-05-01 18:48:21 +08:00
reaction_service.go fix(api): tolerate missing related users in memo conversions (#5809) 2026-04-06 08:23:18 +08:00
resource_name.go fix: user resource names can be uuidv4 from idp sub claim (#5856) 2026-04-19 13:05:08 +08:00
shortcut_service.go refactor: move plugin packages under internal 2026-04-06 11:10:32 +08:00
sse_event_helpers.go fix(api): improve SSE hub design and fix double-broadcast on comments 2026-03-29 07:33:40 +08:00
sse_handler.go fix(api): improve SSE hub design and fix double-broadcast on comments 2026-03-29 07:33:40 +08:00
sse_hub.go fix(server): close SSE clients during shutdown 2026-04-16 22:49:10 +08:00
sse_hub_test.go fix(server): close SSE clients during shutdown 2026-04-16 22:49:10 +08:00
sse_service_test.go fix(webhooks): trigger memo updates for attachment and relation changes (#5795) 2026-03-30 20:01:16 +08:00
sso_username.go fix(auth): harden authorization and username validation (#5890) 2026-04-25 21:24:16 +08:00
user_resource_name.go fix(auth): harden authorization and username validation (#5890) 2026-04-25 21:24:16 +08:00
user_resource_name_test.go fix(auth): harden authorization and username validation (#5890) 2026-04-25 21:24:16 +08:00
user_service.go fix(security): enforce attachment ownership on memo updates 2026-05-01 18:23:53 +08:00
user_service_stats.go feat(activity-calendar): aggregate by ViewContext.timeBasis 2026-05-02 00:26:53 +08:00
v1.go feat(stats): admin instance resource statistics 2026-05-01 23:15:56 +08:00