Skip to content

ref(issue-details): Remove useHasStreamlinedUI hook and legacy UI code#112465

Merged
chromy merged 2 commits intomasterfrom
chromy/ref/remove-use-has-streamlined-ui
Apr 10, 2026
Merged

ref(issue-details): Remove useHasStreamlinedUI hook and legacy UI code#112465
chromy merged 2 commits intomasterfrom
chromy/ref/remove-use-has-streamlined-ui

Conversation

@chromy
Copy link
Copy Markdown
Contributor

@chromy chromy commented Apr 8, 2026

Remove the useHasStreamlinedUI hook which always returned true, along with
all legacy (non-streamlined) UI code paths gated behind it.

Changes:

  • Delete useHasStreamlinedUI from utils.tsx
  • Remove all call sites and simplify conditional branches in
    groupEventDetailsContent, groupEventDetails, and groupDetails
  • Remove dead imports, styled components, and functions that were only
    reachable from the legacy path (renderGroupStatusBanner,
    trackTabChanged, StyledLayoutBody, StyledLayoutMain,
    GroupStatusBannerWrapper, GroupTabPanels, NotFoundMessage,
    StyledDataSection, etc.)
  • Remove jest.mock overrides of the hook in test files
  • Simplify inputWithStorage.tsx to no longer gate on the hook

Agent transcript: https://claudescope.sentry.dev/share/N42GnuAIP46Yfs6hbcGKQ4Uybjtnlxsgws23v5IjV_o

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 8, 2026
@chromy chromy marked this pull request as ready for review April 8, 2026 13:50
@chromy chromy requested review from a team as code owners April 8, 2026 13:50
enforced_streamlined_ui: user?.options?.prefersIssueDetailsStreamlinedUI === null,
org_streamline_only: organization.streamlineOnly ?? undefined,
has_streamlined_ui: hasStreamlinedUI,
has_streamlined_ui: true,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can remove

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done!

Copy link
Copy Markdown
Member

@scttcper scttcper Apr 8, 2026

Choose a reason for hiding this comment

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

can probably rename this file or combine it with the other one maybe, can't tell if its used in one or two places

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

renamed to resolutionReason.tsx in a follow up #112509.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this file looks like it could be renamed or the function relocated as well

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Renamed to errorMessages.tsx in a follow up #112509.

Copy link
Copy Markdown
Member

@malwilley malwilley Apr 8, 2026

Choose a reason for hiding this comment

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

now that this just exports DataSection, it probably would be better if the file were renamed to match?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, renamed to dataSection.tsx in a follow up #112509!

Copy link
Copy Markdown
Member

@malwilley malwilley Apr 8, 2026

Choose a reason for hiding this comment

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

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?

chromy added 2 commits April 10, 2026 09:16
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
@chromy chromy force-pushed the chromy/ref/remove-use-has-streamlined-ui branch from 0eff47d to f4f08a1 Compare April 10, 2026 08:16
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 f4f08a1. Configure here.

{hasStreamlinedUI && (
<EventProcessingErrors event={event} project={project} isShare={false} />
)}
<EventProcessingErrors event={event} project={project} isShare={false} />
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.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f4f08a1. Configure here.

@chromy chromy merged commit eafc821 into master Apr 10, 2026
65 checks passed
@chromy chromy deleted the chromy/ref/remove-use-has-streamlined-ui branch April 10, 2026 10:04
chromy added a commit that referenced this pull request Apr 10, 2026
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
chromy added a commit that referenced this pull request Apr 10, 2026
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
chromy added a commit that referenced this pull request Apr 10, 2026
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
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.

3 participants