refactor: move calendar feed token storage #395

Merged
barrettruth merged 2 commits from issue-386-calendar-feed-token-storage into main 2026-05-12 13:45:07 +00:00
Owner

Problem

Calendar feed tokens were stored on users, coupling a calendar feed secret to user identity storage and making feed-token ownership/migration unclear.

Solution

  • Add dedicated calendar_feed_tokens storage with per-user ownership and token lookup.
  • Migrate existing users.calendar_feed_token values into calendar_feed_tokens and drop the old user column.
  • Keep the feed URL shape and generate/read/revoke semantics unchanged.

Verification

  • direnv exec . pnpm vitest run tests/core/calendar-feed.test.ts tests/api/calendar-feed.test.ts tests/core/schema.test.ts tests/server/dashboard-data.test.ts tests/lib/calendar-actions-popover.test.ts --reporter=verbose
  • direnv exec . pnpm biome check src/core/calendar-feed.ts src/db/schema.ts tests/core/schema.test.ts tests/core/calendar-feed.test.ts tests/api/calendar-feed.test.ts tests/lib/calendar-actions-popover.test.ts
  • nix develop --command just ci

Closes #386

## Problem Calendar feed tokens were stored on `users`, coupling a calendar feed secret to user identity storage and making feed-token ownership/migration unclear. ## Solution - Add dedicated `calendar_feed_tokens` storage with per-user ownership and token lookup. - Migrate existing `users.calendar_feed_token` values into `calendar_feed_tokens` and drop the old user column. - Keep the feed URL shape and generate/read/revoke semantics unchanged. ## Verification - `direnv exec . pnpm vitest run tests/core/calendar-feed.test.ts tests/api/calendar-feed.test.ts tests/core/schema.test.ts tests/server/dashboard-data.test.ts tests/lib/calendar-actions-popover.test.ts --reporter=verbose` - `direnv exec . pnpm biome check src/core/calendar-feed.ts src/db/schema.ts tests/core/schema.test.ts tests/core/calendar-feed.test.ts tests/api/calendar-feed.test.ts tests/lib/calendar-actions-popover.test.ts` - `nix develop --command just ci` Closes #386
Retire stale version bump wrappers
All checks were successful
quality / Test (pull_request) Successful in 16s
quality / Lint (pull_request) Successful in 21s
quality / Build (pull_request) Successful in 44s
4c28436ea8
refactor: move calendar feed tokens to dedicated storage
All checks were successful
quality / Test (pull_request) Successful in 16s
quality / Lint (pull_request) Successful in 20s
quality / Build (pull_request) Successful in 42s
c248434b37
barrettruth deleted branch issue-386-calendar-feed-token-storage 2026-05-12 13:45:07 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/delta!395
No description provided.