Skip to content

ref(projectKeys): Migrate forms to scraps form system#116516

Draft
TkDodo wants to merge 20 commits into
masterfrom
tkdodo/ref/de-997-migrate-projectkeyscredentials-forms
Draft

ref(projectKeys): Migrate forms to scraps form system#116516
TkDodo wants to merge 20 commits into
masterfrom
tkdodo/ref/de-997-migrate-projectkeyscredentials-forms

Conversation

@TkDodo
Copy link
Copy Markdown
Collaborator

@TkDodo TkDodo commented May 29, 2026

Migrates all project key settings forms (credentials, key settings, rate limits, loader settings) from the legacy form system (JsonForm, FieldGroup with Panel/PanelBody/PanelHeader, RangeSlider) to the new TanStack-based scraps form system.

Rate limits form refactored to explicit submit

The rate limits form now uses useScrapsForm with Save/Reset buttons instead of auto-save. Cross-field validation ensures count and window are either both set or both empty, preventing partial submissions that the backend would silently discard.

Legacy Panel components replaced with FieldGroup

All Panel/PanelBody/PanelHeader/PanelAlert usage replaced with FieldGroup and Alert. FieldGroup gains a hasButtons prop to support header buttons (used by loader script).

Credentials simplified

Removed unused props (showDsn, showDsnPublic, showOtlpTraces, showOtlpLogs) that were always defaulted or always passed. OTLP tab is now always visible. Read-only fields use TextCopyInput inside field.Layout.Stack.

@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 29, 2026

DE-997

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

TkDodo commented May 29, 2026

bugbot run

@github-actions
Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

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

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 932a49e. Configure here.

!hasAccess || !supportsPerformance
? t('You do not have permission to edit this setting')
: undefined
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Incorrect disabled reason shown for version-incompatible features

Medium Severity

The disabled prop on field.Switch for Performance, Replay, Logs, and Feedback fields uses !hasAccess || !supportsPerformance (or !supportsLogs) as the condition to show "You do not have permission to edit this setting". When hasAccess is true but the SDK version doesn't support the feature, the user sees a misleading permissions message instead of a version-compatibility explanation. The Debug field correctly checks only hasAccess for this message.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 932a49e. Configure here.

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