ref(issue-details): Remove useHasStreamlinedUI hook and legacy UI code#112465
ref(issue-details): Remove useHasStreamlinedUI hook and legacy UI code#112465
Conversation
static/app/views/issueDetails/groupEventDetails/groupEventDetailsContent.tsx
Outdated
Show resolved
Hide resolved
static/app/views/issueDetails/groupEventDetails/groupEventDetailsContent.tsx
Show resolved
Hide resolved
| enforced_streamlined_ui: user?.options?.prefersIssueDetailsStreamlinedUI === null, | ||
| org_streamline_only: organization.streamlineOnly ?? undefined, | ||
| has_streamlined_ui: hasStreamlinedUI, | ||
| has_streamlined_ui: true, |
There was a problem hiding this comment.
can probably rename this file or combine it with the other one maybe, can't tell if its used in one or two places
There was a problem hiding this comment.
renamed to resolutionReason.tsx in a follow up #112509.
There was a problem hiding this comment.
this file looks like it could be renamed or the function relocated as well
There was a problem hiding this comment.
Renamed to errorMessages.tsx in a follow up #112509.
d840bc9 to
8c18962
Compare
There was a problem hiding this comment.
now that this just exports DataSection, it probably would be better if the file were renamed to match?
There was a problem hiding this comment.
Thanks, renamed to dataSection.tsx in a follow up #112509!
There was a problem hiding this comment.
this no longer exports GroupStatusBadge so the file name no longer matches, maybe we should just inline the function here where it's being used?
97c35e6 to
0eff47d
Compare
Remove the useHasStreamlinedUI hook which always returned true, and clean up all legacy (non-streamlined) UI code paths that were gated behind it. This removes dead code including unused styled components, the old tab-based layout, and legacy conditional branches across groupEventDetailsContent, groupEventDetails, and groupDetails. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Agent transcript: https://claudescope.sentry.dev/share/GEUTjwTLS-03zoOgJLc4nNOPl6d6kawqWXMe3Bn-fOQ
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Agent transcript: https://claudescope.sentry.dev/share/pxAVht4UjkdydDJ04XfTa8Ow3ZZ8hQtyPe4WbpfpBWs
0eff47d to
f4f08a1
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f4f08a1. Configure here.
| {hasStreamlinedUI && ( | ||
| <EventProcessingErrors event={event} project={project} isShare={false} /> | ||
| )} | ||
| <EventProcessingErrors event={event} project={project} isShare={false} /> |
There was a problem hiding this comment.
Large exported function is now dead code
Medium Severity
EventDetailsContent is a ~300-line exported function that is now completely dead code. GroupEventDetailsContent was the only caller, and it now delegates directly to EventDetails, bypassing EventDetailsContent entirely. This also leaves behind many unused imports (e.g., ClassNames, GuideAnchor, ScreenshotDataSection, EventTagsDataSection, InterimSection, useCopyIssueDetails, InstrumentationFixSection, and many more) that are only referenced within the dead function.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit f4f08a1. Configure here.
Follow-up to #112465. After removing legacy UI components, several files no longer matched their contents. This renames them to reflect what they actually export: resolutionBox.tsx → resolutionReason.tsx (only exports ResolutionReason) events/styles.tsx → events/dataSection.tsx (only exports DataSection) statusBadge.tsx → getBadgeProperties.tsx (only exports getBadgeProperties) actionableItems.tsx → errorMessages.tsx (only exports ErrorMessage type and getErrorMessage) All import paths updated accordingly. Agent transcript: https://claudescope.sentry.dev/share/e2k0R-zMUZqOtcDaAQ4kCZutdhmRwnSTBSqDOHTHtGo
Follow-up to #112465. After removing legacy UI components, several files no longer matched their contents. This renames them to reflect what they actually export: resolutionBox.tsx → resolutionReason.tsx (only exports ResolutionReason) events/styles.tsx → events/dataSection.tsx (only exports DataSection) statusBadge.tsx → getBadgeProperties.tsx (only exports getBadgeProperties) actionableItems.tsx → errorMessages.tsx (only exports ErrorMessage type and getErrorMessage) All import paths updated accordingly. Agent transcript: https://claudescope.sentry.dev/share/e2k0R-zMUZqOtcDaAQ4kCZutdhmRwnSTBSqDOHTHtGo
Follow-up to #112465. After removing legacy UI components, several files no longer matched their contents. This renames them to reflect what they actually export: resolutionBox.tsx → resolutionReason.tsx (only exports ResolutionReason) events/styles.tsx → events/dataSection.tsx (only exports DataSection) statusBadge.tsx → getBadgeProperties.tsx (only exports getBadgeProperties) actionableItems.tsx → errorMessages.tsx (only exports ErrorMessage type and getErrorMessage) All import paths updated accordingly. Agent transcript: https://claudescope.sentry.dev/share/e2k0R-zMUZqOtcDaAQ4kCZutdhmRwnSTBSqDOHTHtGo


Remove the
useHasStreamlinedUIhook which always returnedtrue, along withall legacy (non-streamlined) UI code paths gated behind it.
Changes:
useHasStreamlinedUIfromutils.tsxgroupEventDetailsContent,groupEventDetails, andgroupDetailsreachable from the legacy path (
renderGroupStatusBanner,trackTabChanged,StyledLayoutBody,StyledLayoutMain,GroupStatusBannerWrapper,GroupTabPanels,NotFoundMessage,StyledDataSection, etc.)jest.mockoverrides of the hook in test filesinputWithStorage.tsxto no longer gate on the hookAgent transcript: https://claudescope.sentry.dev/share/N42GnuAIP46Yfs6hbcGKQ4Uybjtnlxsgws23v5IjV_o