Skip to content

feat: expose live room activity status#3908

Draft
idoshamun wants to merge 1 commit into
mainfrom
codex/community-moderated-rooms
Draft

feat: expose live room activity status#3908
idoshamun wants to merge 1 commit into
mainfrom
codex/community-moderated-rooms

Conversation

@idoshamun
Copy link
Copy Markdown
Member

Summary

  • Add LiveRoom.activityStatus to the GraphQL/API contract
  • Cache Flyting runtime state with participant count and activity status
  • Make activeLiveRooms and boot hasLive use activityStatus for community-moderated rooms

Validation

  • pnpm run build
  • pnpm exec eslint src/schema/liveRooms.ts src/common/liveRoom/participantCount.ts src/integrations/flyting/client.ts src/dataLoaderService.ts src/routes/boot.ts tests/liveRooms.ts tests/boot.ts --max-warnings 0
  • NODE_ENV=test pnpm --ignore-workspace exec jest tests/liveRooms.ts --testEnvironment=node --runInBand
  • NODE_ENV=test pnpm --ignore-workspace exec jest tests/boot.ts --testEnvironment=node --runInBand
  • git diff --check

@pulumi
Copy link
Copy Markdown

pulumi Bot commented May 25, 2026

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

✨ Neo Explanation

Routine application deployment shipping community-moderated live room activity status support, including a Redis cache format migration with backward-compatible fallback and standard DB/Clickhouse migration jobs. ✅ Low Risk

This deployment rolls out the new activityStatus field for community-moderated live rooms. The core changes introduce a LiveRoomActivityStatus enum (pending/live), upgrade the Redis cache format from a plain integer to a JSON object containing both activityStatus and participantCount, and update the boot endpoint to check the Flyting API for community room activity when determining the hasLive flag. The activeLiveRooms GraphQL query now filters community-moderated rooms by their runtime activity status (only showing them when activityStatus === live) rather than relying solely on the stored status column.

🔵 InfoRedis cache format change: The participant count cache key (liveRoom:participantCount:<id>) previously stored a plain integer string; it now stores a JSON-serialized {activityStatus, participantCount} object. The new code includes a backward-compatibility shim (cachedLiveRoomRuntimeStateSchema) that handles legacy numeric values, so existing cache entries will be read correctly and naturally expire (TTL also reduced from 2 minutes to 30 seconds). No cache flush is required.

🔵 InfoMigration jobs: Both the DB and Clickhouse migration jobs are replaced with new versions tied to commit b85e7fb1. The DB migration runs TypeORM migrations, so any pending schema changes in this commit will be applied on deploy.

Resource Changes

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

@idoshamun idoshamun force-pushed the codex/community-moderated-rooms branch from e7cbb2f to 61942a9 Compare May 25, 2026 18:07
@idoshamun idoshamun force-pushed the codex/community-moderated-rooms branch from 61942a9 to 0500e80 Compare May 25, 2026 18:11
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