Skip to content

chore(autofix): Refactor seer drawer into shared components#109854

Open
Zylphrex wants to merge 11 commits intomasterfrom
txiao/chore/refactor-seer-drawer-into-shared-components
Open

chore(autofix): Refactor seer drawer into shared components#109854
Zylphrex wants to merge 11 commits intomasterfrom
txiao/chore/refactor-seer-drawer-into-shared-components

Conversation

@Zylphrex
Copy link
Member

@Zylphrex Zylphrex commented Mar 4, 2026

The seer drawer component has a lot of duplicate custom components. This change refactors it to

  1. share components
  2. use scraps where possible

The seer drawer component has a lot of duplicate custom components. This change
refactors it to
1. share components
2. use scraps where possible
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 4, 2026
@Zylphrex Zylphrex changed the title chore(autorix): Refactor seer drawer into shared components chore(autofix): Refactor seer drawer into shared components Mar 4, 2026
@Zylphrex Zylphrex marked this pull request as ready for review March 4, 2026 21:24
@Zylphrex Zylphrex requested review from a team as code owners March 4, 2026 21:24
Copy link
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.

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Auto-scroll initial value inverted from original behavior
    • Changed shouldAutoScrollRef initial value from true to false to match original behavior where auto-scroll was disabled by default.

Create PR

Or push these changes by commenting:

@cursor push 2a63f68b07
Preview (2a63f68b07)
diff --git a/static/app/components/events/autofix/v1/body.tsx b/static/app/components/events/autofix/v1/body.tsx
--- a/static/app/components/events/autofix/v1/body.tsx
+++ b/static/app/components/events/autofix/v1/body.tsx
@@ -100,7 +100,7 @@
   const scrollContainerRef = useRef<HTMLDivElement>(null);
 
   const lastScrollTopRef = useRef(0);
-  const shouldAutoScrollRef = useRef(true);
+  const shouldAutoScrollRef = useRef(false);
 
   const handleScroll = useCallback(() => {
     const container = scrollContainerRef.current;
This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

const scrollContainerRef = useRef<HTMLDivElement>(null);

const lastScrollTopRef = useRef(0);
const shouldAutoScrollRef = useRef(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

Auto-scroll initial value inverted from original behavior

Medium Severity

shouldAutoScrollRef is initialized to true, but the old code initialized userScrolledRef to true which meant auto-scroll was disabled by default (the effect checked !userScrolledRef.current). When renaming and inverting the semantics, the handler logic and effect condition were correctly inverted, but the initial value was not — it needs to be false to match the original behavior. This causes the drawer to aggressively scroll to the bottom on every data change as soon as it opens, rather than letting the user read content from the top.

Fix in Cursor Fix in Web

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