fix(stack-trace): show full file path in tooltip without truncation#117904
fix(stack-trace): show full file path in tooltip without truncation#117904kitlord wants to merge 9 commits into
Conversation
…runcation using optimized ellipsis css
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 92f91e9. Configure here.
| if (scrollWidthRef.current !== content.scrollWidth) { | ||
| scrollWidthRef.current = content.scrollWidth; | ||
| animationRef.current?.pause(); | ||
| } |
There was a problem hiding this comment.
First mousemove pauses scroll
High Severity
On the first mousemove while hovering, scrollWidthRef starts at 0, so it always differs from content.scrollWidth, triggering animationRef.current?.pause(). A paused Web Animation does not resume when updatePlaybackRate runs, so edge-based scrolling stops working after the first pointer move.
Reviewed by Cursor Bugbot for commit 92f91e9. Configure here.
| if (scrollWidthRef.current !== content.scrollWidth) { | ||
| scrollWidthRef.current = content.scrollWidth; | ||
| animationRef.current?.pause(); | ||
| } |
There was a problem hiding this comment.
Bug: On the first hover, the scroll animation is immediately paused and does not resume because scrollWidthRef is uninitialized, causing an incorrect state check.
Severity: MEDIUM
Suggested Fix
Initialize scrollWidthRef with the actual scrollWidth of the content inside the useLayoutEffect where the animation is created. This ensures the check on onMouseMove does not incorrectly pause the animation on the first interaction.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: static/app/components/HoverScrollable.tsx#L91-L94
Potential issue: On the very first mouse hover, the scroll animation is permanently
paused. This occurs because `scrollWidthRef` is initialized to `0`, causing the
condition `scrollWidthRef.current !== content.scrollWidth` to be true on the first
`onMouseMove` event. This triggers `animationRef.current?.pause()`. A subsequent call to
`updatePlaybackRate()` does not resume a paused animation, so the scroll feature appears
non-functional until the user moves the mouse out and back in.
|
|
||
| setIsTruncated(truncated); |
There was a problem hiding this comment.
Bug: A render loop occurs because SlidingContainer uses box-sizing: content-box with padding, causing it to miscalculate text truncation and oscillate with OverflowText.
Severity: MEDIUM
Suggested Fix
Apply box-sizing: border-box; to the SlidingContainer component. This will ensure that its padding is included within its defined width, leading to accurate truncation calculations and preventing the render loop.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: static/app/components/HoverScrollable.tsx#L44-L45
Potential issue: An infinite render loop can occur when text overflows its container by
a small amount. `OverflowText` detects truncation and renders `SlidingContainer`.
However, `SlidingContainer` uses the default `box-sizing: content-box` and has
horizontal padding, making its `clientWidth` larger than its parent. For text that fits
within this inflated width, `SlidingContainer` reports that the text is not truncated,
switching back to `OverflowText`. This creates a flickering loop as the components
rapidly switch.


This PR fixes the issue in #93362 by using the mouse position to scroll through the filename / path so that it looks as per the sentry theme standards and is usability focused. here is an example video of a hardcoded trace in the new frame:
2026-06-17T08-54-20-946Z.mp4
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.