You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While scoping #11895, research turned up a much larger, adjacent gap than that issue's own scope: across nearly the entire signup/moderation/schedule frontend, Signup/SignupRequest/SignupRankedChoice/SignupChange/GroupedSignupCount are all queried using their deprecated bucket_key/requested_bucket_key scalar fields, even though every one of those types has already been given an id-carrying bucket/requested_bucket object relation as the documented replacement (deprecation_reason: "Use bucket instead" / "Use requestedBucket instead" is already present on all of them -- this is not a missing backend field, it's a frontend migration that hasn't happened yet).
This is a distinct problem from #11895 (which is about RegistrationPolicyBucket#key, the bucket's own identity field) and from #11896's currently-described scope (which assumes the frontend has already stopped reading these deprecated fields). It needs to happen before #11896 can actually remove bucketKey/requestedBucketKey from SignupType/SignupRequestType/SignupRankedChoiceType/SignupChangeType/GroupedSignupCountType -- right now this codebase's own frontend is the reason those fields can't be deleted yet.
Concretely, as of this research:
GraphQL query files still selecting the deprecated scalar fields (need bucket { id ... } / requested_bucket { id ... } selected instead):
app/javascript/queries.graphql (RunBasicSignupData, if it selects grouped_signup_counts)
Frontend consumers whose logic needs to switch from string-key comparison to id comparison:
app/javascript/EventsApp/SignupAdmin/SignupUtils.ts (findBucket/formatBucket -- the most widely-used correlation point in the whole signup UI)
app/javascript/EventsApp/SignupCountData.ts (its entire generic filter mechanism is keyed by bucket_key/requested_bucket_key today; needs to flatten bucket?.id/requested_bucket?.id at construction time so sumSignupCounts can filter by id)
Update each GraphQL query file above to select bucket { id } / requested_bucket { id } (plus whatever else each call site needs, e.g. name) alongside or instead of the deprecated scalar fields.
Rework SignupUtils.ts's findBucket/formatBucket to correlate by id.
Rework SignupCountData.ts to flatten bucket_id/requested_bucket_id at construction time and filter by those instead of bucket_key/requested_bucket_key.
Update every consumer listed above accordingly.
Run bin/rails graphql:update to regenerate the frontend generated files.
Large surface area (~7 GraphQL query files, ~13 consumer files) touching nearly every signup-admin/signup-moderation/event-page/schedule-grid screen in the app. Recommend doing this as its own reviewed PR rather than folding it into Give the registration policy editor real bucket ids (phase 1 of dropping RegistrationPolicyBucket#key) #11895, and possibly splitting further (e.g. SignupUtils.ts/SignupCountData.ts first, since almost everything else depends on them).
SignupCountData.ts's filter mechanism is currently generic over any field of GroupedSignupCount; switching to id-based bucket filtering means flattening a nested bucket/requested_bucket object into synthetic top-level fields at construction time, which is a real (if small) design decision, not a pure rename.
Background
While scoping #11895, research turned up a much larger, adjacent gap than that issue's own scope: across nearly the entire signup/moderation/schedule frontend,
Signup/SignupRequest/SignupRankedChoice/SignupChange/GroupedSignupCountare all queried using their deprecatedbucket_key/requested_bucket_keyscalar fields, even though every one of those types has already been given anid-carryingbucket/requested_bucketobject relation as the documented replacement (deprecation_reason: "Use bucket instead"/"Use requestedBucket instead"is already present on all of them -- this is not a missing backend field, it's a frontend migration that hasn't happened yet).This is a distinct problem from #11895 (which is about
RegistrationPolicyBucket#key, the bucket's own identity field) and from #11896's currently-described scope (which assumes the frontend has already stopped reading these deprecated fields). It needs to happen before #11896 can actually removebucketKey/requestedBucketKeyfromSignupType/SignupRequestType/SignupRankedChoiceType/SignupChangeType/GroupedSignupCountType-- right now this codebase's own frontend is the reason those fields can't be deleted yet.Concretely, as of this research:
GraphQL query files still selecting the deprecated scalar fields (need
bucket { id ... }/requested_bucket { id ... }selected instead):app/javascript/queries.graphql(RunBasicSignupData, if it selectsgrouped_signup_counts)app/javascript/EventsApp/EventPage/queries.graphql(MySignupRequestFields,MySignupRankedChoiceFields,EventPageRunFields.grouped_signup_counts)app/javascript/EventsApp/ScheduleGrid/queries.graphqlapp/javascript/EventsApp/SignupAdmin/queries.graphql(SignupFields,UserConProfileSignupsFragment,RunSignupsTableSignupsQuery,RunSignupSummaryQuery,RunSignupChangesQueryincl.previous_signup_change)app/javascript/SignupModeration/queries.graphql(SignupModerationRunFields.grouped_signup_counts,SignupModerationSignupRequestFields)app/javascript/Reports/queries.graphql(SignupSpySignupChangesQueryincl.previous_signup_change)app/javascript/EventsApp/MySignupQueue/queries.graphql(UserConProfileRankedChoiceQueueFields.signup_ranked_choices)Frontend consumers whose logic needs to switch from string-key comparison to id comparison:
app/javascript/EventsApp/SignupAdmin/SignupUtils.ts(findBucket/formatBucket-- the most widely-used correlation point in the whole signup UI)app/javascript/EventsApp/SignupCountData.ts(its entire generic filter mechanism is keyed bybucket_key/requested_bucket_keytoday; needs to flattenbucket?.id/requested_bucket?.idat construction time sosumSignupCountscan filter by id)app/javascript/EventsApp/SignupAdmin/BucketInput.tsxapp/javascript/EventsApp/SignupAdmin/$id/route.tsx(thebucket/requestedBucketlookups at the top of the file -- not the same as the single already-fixed comparison line from Give the registration policy editor real bucket ids (phase 1 of dropping RegistrationPolicyBucket#key) #11895)app/javascript/EventsApp/SignupAdmin/RunSignupsTable.tsxapp/javascript/EventsApp/SignupAdmin/RunEmailList.tsx(theincludes/includesObjectcorrelation -- not the display-fallback line already fixed by Give the registration policy editor real bucket ids (phase 1 of dropping RegistrationPolicyBucket#key) #11895)app/javascript/EventsApp/SignupAdmin/RunSignupSummary.tsxapp/javascript/EventsApp/ScheduleGrid/AvailabilityUtils.tsxapp/javascript/EventsApp/EventPage/buildSignupOptions.ts(thegrouped_signup_countsand ranked-choice correlations -- not theSignupOption.keyline already fixed by Give the registration policy editor real bucket ids (phase 1 of dropping RegistrationPolicyBucket#key) #11895)app/javascript/EventsApp/EventPage/RunCapacityGraphBucket.tsxapp/javascript/EventsApp/MySignupQueue/UserSignupQueueItem.tsxapp/javascript/SignupModeration/SignupModerationQueue.tsxapp/javascript/Tables/BucketChangeCell.tsxProposed Change
bucket { id }/requested_bucket { id }(plus whatever else each call site needs, e.g.name) alongside or instead of the deprecated scalar fields.SignupUtils.ts'sfindBucket/formatBucketto correlate by id.SignupCountData.tsto flattenbucket_id/requested_bucket_idat construction time and filter by those instead ofbucket_key/requested_bucket_key.bin/rails graphql:updateto regenerate the frontend generated files.Benefits
bucketKey/requestedBucketKeyfrom the schema, rather than just leaving them deprecated indefinitely.Signup's own bucket) approaches.Tradeoffs
SignupUtils.ts/SignupCountData.tsfirst, since almost everything else depends on them).SignupCountData.ts's filter mechanism is currently generic over any field ofGroupedSignupCount; switching to id-based bucket filtering means flattening a nestedbucket/requested_bucketobject into synthetic top-level fields at construction time, which is a real (if small) design decision, not a pure rename.References
Issue drafted by Claude