Skip to content

feat: favorite squads#3909

Draft
AmarTrebinjac wants to merge 3 commits into
mainfrom
favorite-squads
Draft

feat: favorite squads#3909
AmarTrebinjac wants to merge 3 commits into
mainfrom
favorite-squads

Conversation

@AmarTrebinjac
Copy link
Copy Markdown
Contributor

No description provided.

@pulumi
Copy link
Copy Markdown

pulumi Bot commented May 26, 2026

🍹 The Update (preview) for dailydotdev/api/prod (at c4d0f1b) was successful.

✨ Neo Explanation

Routine feature deployment adding squad-favoriting capability: a safe additive DB migration adds a nullable `favoritedAt` column to `source_member`, and all services are rolled to the new image. ✅ Low Risk.

This deployment introduces the toggleFavoriteSource GraphQL mutation, which adds a favoritedAt nullable timestamp column to the source_member table and re-orders the squad list to surface favorited squads first (favorites sorted by favoritedAt DESC, then alphabetically).

The DB migration job (vpc-native-api-db-migration-a1b30a02) will run ALTER TABLE source_member ADD COLUMN IF NOT EXISTS "favoritedAt" TIMESTAMP WITH TIME ZONE — an additive, non-blocking operation on PostgreSQL that will not lock the table or cause downtime. All existing rows will have NULL for the new column, which is the correct default behavior.

🔵 Info — The squad ordering query in boot.ts now sorts by favoritedAt IS NULL ASC first, ensuring users with no favorites see no behavioral change (all NULLs sort together, then alphabetically as before). This is backward-compatible.

Resource Changes

    Name                                                       Type                           Operation
~   vpc-native-update-source-public-threshold-cron             kubernetes:batch/v1:CronJob    update
~   vpc-native-post-analytics-history-day-clickhouse-cron      kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-analytics-history-clickhouse-cron  kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-old-notifications-cron                    kubernetes:batch/v1:CronJob    update
~   vpc-native-generate-search-invites-cron                    kubernetes:batch/v1:CronJob    update
~   vpc-native-update-tags-str-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-update-current-streak-cron                      kubernetes:batch/v1:CronJob    update
~   vpc-native-deployment                                      kubernetes:apps/v1:Deployment  update
~   vpc-native-materialize-monthly-best-post-archives-cron     kubernetes:batch/v1:CronJob    update
~   vpc-native-update-trending-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-personalized-digest-deployment                  kubernetes:apps/v1:Deployment  update
~   vpc-native-private-deployment                              kubernetes:apps/v1:Deployment  update
~   vpc-native-clean-expired-better-auth-sessions-cron         kubernetes:batch/v1:CronJob    update
-   vpc-native-api-db-migration-8065efa8                       kubernetes:batch/v1:Job        delete
~   vpc-native-validate-active-users-cron                      kubernetes:batch/v1:CronJob    update
~   vpc-native-update-highlighted-views-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-bg-deployment                                   kubernetes:apps/v1:Deployment  update
~   vpc-native-materialize-yearly-best-post-archives-cron      kubernetes:batch/v1:CronJob    update
~   vpc-native-sync-subscription-with-cio-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-channel-highlights-cron                         kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-stale-user-transactions-cron              kubernetes:batch/v1:CronJob    update
+   vpc-native-api-clickhouse-migration-a1b30a02               kubernetes:batch/v1:Job        create
~   vpc-native-hourly-notification-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-post-analytics-clickhouse-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-gifted-plus-cron                          kubernetes:batch/v1:CronJob    update
~   vpc-native-temporal-deployment                             kubernetes:apps/v1:Deployment  update
~   vpc-native-clean-zombie-users-cron                         kubernetes:batch/v1:CronJob    update
~   vpc-native-rotate-weekly-quests-cron                       kubernetes:batch/v1:CronJob    update
~   vpc-native-channel-digests-cron                            kubernetes:batch/v1:CronJob    update
+   vpc-native-api-db-migration-a1b30a02                       kubernetes:batch/v1:Job        create
~   vpc-native-check-analytics-report-cron                     kubernetes:batch/v1:CronJob    update
~   vpc-native-update-tag-materialized-views-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-updated-sync-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-update-views-cron                               kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-channel-highlights-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-rotate-daily-quests-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-expire-super-agent-trial-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-analytics-clickhouse-cron          kubernetes:batch/v1:CronJob    update
~   vpc-native-update-achievement-rarity-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-squad-posts-analytics-refresh-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-generic-referral-reminder-cron                  kubernetes:batch/v1:CronJob    update
... and 12 other changes

@AmarTrebinjac
Copy link
Copy Markdown
Contributor Author

@claude please fix the failing tests

@claude
Copy link
Copy Markdown

claude Bot commented May 26, 2026

Claude finished @AmarTrebinjac's task in 4m 35s —— View job


Fixing Failing Tests

  • Check CI status — ci/circleci: test failed
  • Read PR changes
  • Identify root cause — boot tests use toEqual for squads, but the new code adds a favoritedAt field to each squad in the boot payload (src/routes/boot.ts:444), so the existing assertions fail with the extra property
  • Fix __tests__/boot.ts to include favoritedAt: null in expected squad objects (both the "should return the user squads" and "should not return squads users blocked from" tests)
  • Commit and push

Summary

Pushed commit c4d0f1b updating both squad assertions in __tests__/boot.ts so they include favoritedAt: null in each expected entry. The newly added boot field (src/routes/boot.ts:406-444) is always present in the response, so the prior toEqual assertions failed with an unexpected favoritedAt key. Nothing else in the test suite asserts on the boot squad payload shape, and no snapshot tests reference SourceMember.favoritedAt.

I couldn't run pnpm install / pnpm test locally in this environment (no node_modules, mismatched Node version), so CI on the new commit is the final confirmation.
• Branch: favorite-squads

Co-authored-by: Amar Trebinjac <AmarTrebinjac@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant