Skip to content

ref(settings): Migrate project issue grouping form to scraps form#116465

Draft
priscilawebdev wants to merge 2 commits into
masterfrom
prims/migrate-project-issue-grouping-form
Draft

ref(settings): Migrate project issue grouping form to scraps form#116465
priscilawebdev wants to merge 2 commits into
masterfrom
prims/migrate-project-issue-grouping-form

Conversation

@priscilawebdev
Copy link
Copy Markdown
Member

Migrates the project Issue Grouping settings page (static/app/views/settings/projectIssueGrouping/) from the legacy JsonForm/FormModel system to the new TanStack-based scraps form system.

What changed

  • Fingerprint Rules and Stack Trace Rules were saveOnBlur: false fields, so they migrate to useScrapsForm with an explicit Save/Cancel button and the inline "applies to future events only" info notice — rather than AutoSaveForm.
  • Derived Grouping Enhancements stays read-only/disabled (server-managed).
  • Each form is wrapped in FormSearch and generatedFieldRegistry.ts is regenerated so all three rules remain searchable in SettingsSearch. The now-unused projectIssueGrouping data file is removed.
  • Added the fingerprintingRules, groupingEnhancements, and derivedGroupingEnhancements fields (returned by the project detail API, previously read untyped by JsonForm) to the DetailedProject type.

Why

Part of the ongoing migration off the legacy form system. allowUndo is intentionally dropped per the migration guide (replaced by standard error toasts).

Both existing component tests pass unchanged; full typecheck and lint are clean.

Replace the legacy JsonForm/FormModel implementation of the project Issue
Grouping settings (Fingerprint Rules, Stack Trace Rules, and the read-only
Derived Grouping Enhancements) with the TanStack-based scraps form system.

Each rule was a saveOnBlur:false field, so the migration uses useScrapsForm
with an explicit Save/Cancel button and the 'applies to future events' info
notice, instead of AutoSaveForm. The derived enhancements field stays
read-only.

Wrap each form in FormSearch and regenerate generatedFieldRegistry.ts so the
rules remain searchable in SettingsSearch, and drop the now-unused
projectIssueGrouping data file. Add the fingerprintingRules,
groupingEnhancements, and derivedGroupingEnhancements fields (returned by the
project detail API) to the DetailedProject type.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.59%

The legacy Form displayed server-side validation errors inline. The initial
scraps migration only showed a generic error toast, hiding the specific
message returned for invalid fingerprint or stack trace rule syntax.

Use setFieldErrors in the mutation catch to map API field errors back onto
the form field, falling back to the generic toast when the response has no
field-specific errors. Add interaction tests covering a successful save and
inline error display.

Co-Authored-By: Claude <noreply@anthropic.com>
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