ref(forms): Migrate project performance settings off JsonForm to scraps form - #119187
Draft
priscilawebdev wants to merge 1 commit into
Draft
ref(forms): Migrate project performance settings off JsonForm to scraps form#119187priscilawebdev wants to merge 1 commit into
priscilawebdev wants to merge 1 commit into
Conversation
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
Migrates several sections of the Project Performance settings page from the legacy
JsonForm/FormModelsystem to the new scraps form system (@sentry/scraps/form). Part of the ongoing JsonForm → scraps forms migration effort.Migrated sections
enable_images) →AutoSaveForm+Switchmetricselect +thresholdinput, plus the "Reset All" footer button) → twoAutoSaveFormfieldsAutoSaveForm+SwitchAll behavior preserved:
saveOnBlursemantics (auto-save on blur/change), analytics tracking, query-cache updates on success,disabledwhen the user lacksproject:write, and the superuser 403 error message (now handled in the mutationonError). Mutations usefetchMutation<T>with typedmutationFnpayloads — no call-site generics onuseMutation/mutationOptions.Intentionally left on JsonForm (documented for a follow-up)
getDatatransform that reconstructs the fulldynamicSamplingBiasesarray from all fields; not a clean per-field mapping. Untested/feature-gated, deferred to reduce risk.initiallyCollapsedbehavior. This relies on JsonForm'sforms/collapsibleinfrastructure and is heavily exercised by tests; left as-is.This form is not registered for SettingsSearch (no
data/formsentry, nogeneratedFieldRegistryentry), so noFormSearchwrapper or registry regeneration was needed.Testing
pnpm run typecheck(whole project) — passpnpm run lint:json the file — passpnpm test-ci projectPerformance.spec.tsx— 42/42 pass (spec unchanged)