ref(settings): migrate integration external mapping form to new form system#110298
ref(settings): migrate integration external mapping form to new form system#110298
Conversation
… submission handling
…rnal-mapping-form
|
@cursoragent review |
|
Perfect! Now let me create a comprehensive code review summary: Code Review SummaryI've completed a thorough review of this form migration PR. All tests pass, linting passes, and TypeScript has no errors. Here's my detailed analysis: ✅ Migration Quality: ExcellentThis is a high-quality migration from the legacy Form/FormModel system to the new TanStack-based form system. The changes properly follow Sentry's form migration guidelines. What ChangedCore Migration:
API Simplification:
Improved UX:
Test CoverageAll 12 tests pass, including new tests for edge cases:
Code QualityStrengths:
Minor Observations:
Integration with Parent ComponentsThe changes to parent components (
Linting & Type Safety
Recommendation: ✅ APPROVEThis PR is ready to merge. The migration is well-executed, maintains backward compatibility at the API level, improves code maintainability, and has comprehensive test coverage. The code quality is high and follows all Sentry development best practices. |
Backend Test FailuresFailures on
|
static/app/views/settings/organizationIntegrations/integrationExternalTeamMappings.tsx
Outdated
Show resolved
Hide resolved
static/app/views/settings/organizationIntegrations/integrationExternalTeamMappings.tsx
Outdated
Show resolved
Hide resolved
…rnal-mapping-form
Backend Test FailuresFailures on
|
static/app/views/settings/organizationIntegrations/integrationExternalMappingForm.tsx
Show resolved
Hide resolved
Backend Test FailuresFailures on
|
static/app/views/settings/organizationIntegrations/integrationExternalMappingForm.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
static/app/views/settings/organizationIntegrations/integrationExternalMappingForm.tsx
Show resolved
Hide resolved
Backend Test FailuresFailures on
|
| for (const key of Object.keys(responseJSON)) { | ||
| if (typeof formValues === 'object' && formValues !== null && key in formValues) { | ||
| const value = responseJSON[key]; | ||
| if (typeof value === 'string') { | ||
| fieldErrors[key] = {message: value}; | ||
| } else if (Array.isArray(value) && value.length > 0) { | ||
| fieldErrors[key] = { | ||
| message: typeof value[0] === 'string' ? value[0] : String(value[0]), | ||
| }; | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Should we have a isJSONResponseError or some type of helper that could assert on the type or perform the extraction for us?
There was a problem hiding this comment.
depends on if there’s a known structure that the backend sends. I know sometimes, it sends detail, which can be a string or an object too:
sentry/static/app/components/issues/groupList.tsx
Lines 256 to 262 in e16fe15
A good solution would be to make sure all backend endpoints return field errors in a standardized format, then we can add our types accordingly directly to RequestError
…rnal-mapping-form


No description provided.