Convert frontend signup consumers off deprecated bucket_key/requested_bucket_key - #11901
Merged
Conversation
…_bucket_key (#11899) Signup/SignupRequest/SignupRankedChoice/SignupChange/GroupedSignupCount all had id-carrying bucket/requested_bucket relations as the documented replacement for these deprecated scalar fields, but the frontend never switched over. This converts every remaining business-logic correlation across signup-admin, signup-moderation, the event page, schedule grid, and reports: - SignupUtils.ts's findBucket/formatBucket now correlate by id - SignupCountData.ts flattens bucket?.id into a synthetic bucket_id at construction time, since its generic filter mechanism compares plain field values and can't filter on a nested relation directly - AvailabilityUtils.tsx, buildSignupOptions.ts, RunCapacityGraphBucket.tsx, BucketInput.tsx, $id/route.tsx, RunSignupSummary.tsx, RunEmailList.tsx, RunSignupsTable.tsx, UserSignupQueueItem.tsx, SignupModerationQueue.tsx, and BucketChangeCell.tsx all switch their bucket lookups/filters from key to id - $id/change_bucket.tsx derives its seed key from the bucket relation instead of the deprecated scalar, without changing BucketInput's key-based selection/submission mechanism (a separate concern -- that would also require touching change_bucket.tsx/force_confirm.tsx's mutation arguments) - Updated 8 GraphQL query files to select bucket { id }/requested_bucket { id } instead of the deprecated scalars (including EventAdmin's schedule-preview fragments, needed to keep the shared ScheduleEvent type consistent) Left BucketKeyRemappingModal.tsx/useBucketKeyRemapping.tsx and the bucket_keys_with_pending_signups_or_requests field untouched -- that feature is genuinely about renaming key strings, not a lookup identity. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Code Coverage Report: Only Changed Files listed
Minimum allowed coverage is |
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.
Fixes #11899
Summary
Signup/SignupRequest/SignupRankedChoice/SignupChange/GroupedSignupCountall already havedeprecation_reason-markedbucket_key/requested_bucket_keyscalar fields with an id-carryingbucket/requested_bucketrelation as the documented replacement — but the frontend never switched over. This PR does that switch across every remaining business-logic correlation point discovered while scoping #11895:SignupUtils.ts:findBucket/formatBucket/formatSignupStatusnow correlate byidinstead ofkey.SignupCountData.ts: flattensbucket?.idinto a syntheticbucket_idat construction time (its generic filter mechanism compares plain field values, so it can't filter on a nested relation directly).AvailabilityUtils.tsx,buildSignupOptions.ts,RunCapacityGraphBucket.tsx,BucketInput.tsx,$id/route.tsx,RunSignupSummary.tsx,RunEmailList.tsx,RunSignupsTable.tsx,UserSignupQueueItem.tsx,SignupModerationQueue.tsx,BucketChangeCell.tsx: all switch their bucket lookups/filters fromkeytoid.$id/change_bucket.tsx: derives its seed key from thebucketrelation instead of the deprecated scalar, without changingBucketInput's key-based selection/submission mechanism (a separate concern — see below)..graphqlquery files to selectbucket { id }/requested_bucket { id }instead of the deprecated scalars, includingEventAdmin/queries.graphql's schedule-preview fragments (needed to keep the sharedScheduleEventtype consistent — not in the original file list, but a required consequence of the type change).Deliberately out of scope
BucketInput.tsx's actual selectionvalue/onChangeand theChangeSignupBucket/ForceConfirmSignupmutations still use bucketkey. Converting that would mean also touchingchange_bucket.tsx/force_confirm.tsx's mutation arguments — a distinct concern from "stop reading the deprecated field for comparison," so left alone here.BucketKeyRemappingModal.tsx/useBucketKeyRemapping.tsxandbucket_keys_with_pending_signups_or_requests— that feature is genuinely about renaming key strings, not a lookup identity, so it stays key-based by design.Test plan
yarn run tsc --noEmityarn vitest run(187 passed, 1 pre-existing skip)yarn eslinton all changed files (0 errors)bin/rails test(1169 passed, 1 pre-existing skip) — no backend files changed, confirms no regressions from the frontend query changesschema.graphql/schema.jsonhave zero diff (no schema changes, purely frontend query/consumer changes)Not done: a live manual walkthrough of the affected screens (signup admin single-signup view, run signups table/email list/summary, my signup queue, schedule grid, signup moderation queue, reports signup spy table) in a browser. This is a large, mechanical conversion covered thoroughly by TypeScript's structural typing (every changed data shape is checked against its actual GraphQL query result) and the existing test suite, but neither of those substitute for exercising the real UI. Worth a manual pass before merging, especially on the signup admin and moderation screens.
🤖 Generated with Claude Code