Push custom values (signup date, subscription, stages) to Lobbyside#3867
Merged
Conversation
Surface host-pushed custom columns on the Lobbyside live-visitor table by passing three derived fields through `setVisitor`: - signed_up_date — user.createdAt (ISO calendar date) - subscription_type — lifetime > individual > team > vip > free - stages_completed — summed completedStageSlugs across course participations stages_completed needs course-participations on the current-user payload, so add it to the syncCurrentUser include. Derivation is extracted to a pure, unit-tested helper. Co-authored-by: Cursor <cursoragent@cursor.com>
Bundle ReportChanges will increase total bundle size by 640 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: client-array-pushAssets Changed:
Files in
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
rohitpaulk
approved these changes
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Surfaces host-pushed custom columns on the Lobbyside live-visitor table for CodeCrafters, validating the new custom-values feature end-to-end in prod. The widget already encrypts any non-reserved
setVisitorkey into a custom column on the dashboard; this wires three derived fields throughLobbysideWidgetComponent.syncVisitorData:signed_up_date—user.createdAtas an ISO calendar date (YYYY-MM-DD).subscription_type— derived label with precedencelifetime → individual → team → vip → free.stages_completed— sum ofcompletedStageSlugsacross the user's course participations.stages_completedneedscourse-participationson the current-user payload (it wasn't in the include), so it's added tosyncCurrentUser'sincludedResources(one flat collection, no nested expansion). The derivation is extracted into a pure, unit-testedlobbysideCustomFieldshelper, and the three fields are tracked in thedid-updatedeps so a late-hydrating subscription/participation re-syncs the visitor stash.Test plan
bun run lintis green (eslint / tsc / glint / prettier / template-lint all pass locally).http://localhost:4200/tests?filter=lobbyside-widget— covers signup-date formatting, stage-slug summing, and subscription_type precedence/fallback.signed_up_date,subscription_type, andstages_completedappear as columns + in the detail drawer, and that values render decrypted/correct.Made with Cursor
Note
Low Risk
Third-party widget enrichment and a small addition to the current-user include list; no auth or payment logic changes.
Overview
Lobbyside live-visitor sync now sends three extra custom columns through
setVisitor:signed_up_date(ISO date fromcreatedAt),subscription_type(precedencelifetime → individual → team → vip → free), andstages_completed(total count of completed stage slugs across participations).The values are computed in a new pure
lobbysideCustomFieldshelper (with unit tests) and merged insyncVisitorData. The templatedid-updatedeps include each custom field so late-hydrating user/subscription/participation data triggers a re-sync.syncCurrentUsernow includescourse-participationsin the current-user payload so stage counts are available when the widget runs.Reviewed by Cursor Bugbot for commit 1b3a193. Bugbot is set up for automated code reviews on this repo. Configure here.