Skip to content

ref(gsAdmin): migrate relocation modals to scraps#115363

Open
priscilawebdev wants to merge 1 commit into
masterfrom
priscila/ref/migrate-gsadmin-relocation-modals
Open

ref(gsAdmin): migrate relocation modals to scraps#115363
priscilawebdev wants to merge 1 commit into
masterfrom
priscila/ref/migrate-gsadmin-relocation-modals

Conversation

@priscilawebdev
Copy link
Copy Markdown
Member

@priscilawebdev priscilawebdev commented May 12, 2026

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

📊 Type Coverage Diff

Metric Before After Delta
Coverage 93.49% 93.49% ±0%
Typed 135,133 135,184 🟢 +51
Untyped 9,417 9,409 🟢 -8
🔍 3 new type safety issues introduced

Type assertions (as) (3 new)

File Line Detail
static/gsAdmin/components/relocationCancelModal.tsx 36 as keyof typeof RelocationStepsstep as keyof typeof RelocationSteps
static/gsAdmin/components/relocationPauseModal.tsx 36 as keyof typeof RelocationStepsstep as keyof typeof RelocationSteps
static/gsAdmin/components/relocationUnpauseModal.tsx 36 as keyof typeof RelocationStepsstep as keyof typeof RelocationSteps

This is informational only and does not block the PR.

@priscilawebdev priscilawebdev force-pushed the priscila/ref/migrate-gsadmin-relocation-modals branch from c31c05f to 70200a2 Compare May 12, 2026 08:55
@priscilawebdev priscilawebdev force-pushed the priscila/ref/migrate-gsadmin-relocation-modals branch from 70200a2 to 9c383ad Compare May 12, 2026 09:08
@priscilawebdev priscilawebdev force-pushed the priscila/ref/migrate-gsadmin-relocation-modals branch from 9c383ad to 2b6eec4 Compare May 12, 2026 09:14
@priscilawebdev priscilawebdev force-pushed the priscila/ref/migrate-gsadmin-relocation-modals branch 2 times, most recently from c88280b to 83ccb78 Compare May 12, 2026 09:22
@priscilawebdev priscilawebdev force-pushed the priscila/ref/migrate-gsadmin-relocation-modals branch from 83ccb78 to d30f95b Compare May 12, 2026 09:38
@priscilawebdev priscilawebdev force-pushed the priscila/ref/migrate-gsadmin-relocation-modals branch from d30f95b to 0030dc9 Compare May 12, 2026 09:43
@priscilawebdev priscilawebdev force-pushed the priscila/ref/migrate-gsadmin-relocation-modals branch from 0030dc9 to 1eaea9f Compare May 12, 2026 10:00
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 12, 2026

DE-1240

Convert the 5 relocation action modals (abort, retry, cancel, pause,
unpause) off the legacy ApiForm system. The two no-field confirmation
modals (abort, retry) use useMutation directly with a scraps Button.
The three select-based modals (cancel, pause, unpause) use useScrapsForm
with a Zod schema and a single field.Select.

Behavior matches the legacy form exactly:
- ASAP/NONE sentinels strip the field from the payload
- hostOverride flows through fetchMutation's options.host
- The select starts empty (legacy relied on the fact that initialData
  spread the relocation object, which has no atStep/untilStep field);
  required fields (cancel, pause) block submit via the Zod schema, same
  as legacy SelectField required=true
- onError handlers gate responseJSON access on `error instanceof
  RequestError` for runtime safety
- onSuccess order: addSuccessMessage -> parent onSuccess -> closeModal
@priscilawebdev priscilawebdev force-pushed the priscila/ref/migrate-gsadmin-relocation-modals branch from 1eaea9f to e00e99a Compare May 12, 2026 10:07
@priscilawebdev priscilawebdev marked this pull request as ready for review May 12, 2026 10:17
@priscilawebdev priscilawebdev requested a review from a team as a code owner May 12, 2026 10:17
@priscilawebdev priscilawebdev requested a review from a team May 12, 2026 10:17
Copy link
Copy Markdown
Member

@markstory markstory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants