Skip to content

ref(forms): Migrate project performance settings off JsonForm to scraps form - #119187

Draft
priscilawebdev wants to merge 1 commit into
masterfrom
pri/ref-forms-migrate-project-performance
Draft

ref(forms): Migrate project performance settings off JsonForm to scraps form#119187
priscilawebdev wants to merge 1 commit into
masterfrom
pri/ref-forms-migrate-project-performance

Conversation

@priscilawebdev

Copy link
Copy Markdown
Member

Summary

Migrates several sections of the Project Performance settings page from the legacy JsonForm/FormModel system to the new scraps form system (@sentry/scraps/form). Part of the ongoing JsonForm → scraps forms migration effort.

Migrated sections

  • General (enable_images) → AutoSaveForm + Switch
  • Threshold Settings (metric select + threshold input, plus the "Reset All" footer button) → two AutoSaveForm fields
  • ### INTERNAL ONLY ### admin regression toggles (superuser-only: transaction/function duration regression) → AutoSaveForm + Switch

All behavior preserved: saveOnBlur semantics (auto-save on blur/change), analytics tracking, query-cache updates on success, disabled when the user lacks project:write, and the superuser 403 error message (now handled in the mutation onError). Mutations use fetchMutation<T> with typed mutationFn payloads — no call-site generics on useMutation/mutationOptions.

Intentionally left on JsonForm (documented for a follow-up)

  • Sampling Priorities (dynamic-sampling) — uses a getData transform that reconstructs the full dynamicSamplingBiases array from all fields; not a clean per-field mapping. Untested/feature-gated, deferred to reduce risk.
  • Performance Issues – Detector Threshold Settings — the large collapsible section with range sliders, per-panel admin toggles, and initiallyCollapsed behavior. This relies on JsonForm's forms/collapsible infrastructure and is heavily exercised by tests; left as-is.

This form is not registered for SettingsSearch (no data/forms entry, no generatedFieldRegistry entry), so no FormSearch wrapper or registry regeneration was needed.

Testing

  • pnpm run typecheck (whole project) — pass
  • pnpm run lint:js on the file — pass
  • pnpm test-ci projectPerformance.spec.tsx — 42/42 pass (spec unchanged)

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 8, 2026
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.

1 participant