ref(gsAdmin): migrate relocation modals to scraps#115363
Open
priscilawebdev wants to merge 1 commit into
Open
Conversation
Contributor
📊 Type Coverage Diff
🔍 3 new type safety issues introducedType assertions (
This is informational only and does not block the PR. |
c31c05f to
70200a2
Compare
70200a2 to
9c383ad
Compare
9c383ad to
2b6eec4
Compare
c88280b to
83ccb78
Compare
83ccb78 to
d30f95b
Compare
d30f95b to
0030dc9
Compare
0030dc9 to
1eaea9f
Compare
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
1eaea9f to
e00e99a
Compare
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.
closes https://linear.app/getsentry/issue/DE-1240/migrate-gsadmin-relocation-modals-from-legacy-form-system