Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Docker builds report
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 5 potential issues.
Bugbot Free Tier Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Autofix Details
Bugbot Autofix prepared fixes for 4 of the 5 issues found in the latest run.
- ✅ Fixed: Sortable IDs use object coercion instead of segment ID
- Sortable IDs now use a helper that derives a stable primitive identifier from
segment.id/segment.name(or primitive segment value) instead of coercing objects.
- Sortable IDs now use a helper that derives a stable primitive identifier from
- ✅ Fixed: Fragment keys use undefined
value.segment.nameon object- Fragment keys now derive the segment name safely from object or
segment_nameand fall back to the corrected sortable ID for stability.
- Fragment keys now derive the segment name safely from object or
- ✅ Fixed: Variable
useSortableshadows the imported hook- The local boolean was renamed to
isSortableso it no longer shadows the importeduseSortablehook name.
- The local boolean was renamed to
- ✅ Fixed: Drag-and-drop drops outside container may crash
handleDragEndnow returns early whenoveris null and only proceeds when both source and target indices are valid.
Or push these changes by commenting:
@cursor push 594a1e2dc6
Preview (594a1e2dc6)
diff --git a/frontend/web/components/SegmentOverrides.js b/frontend/web/components/SegmentOverrides.js
--- a/frontend/web/components/SegmentOverrides.js
+++ b/frontend/web/components/SegmentOverrides.js
@@ -370,6 +370,16 @@
)
}
+const getSegmentIdentifier = (segment, fallback) => {
+ if (segment && typeof segment === 'object') {
+ return segment.id || segment.name || fallback
+ }
+ return segment ?? fallback
+}
+
+const getSegmentSortId = (value, index) =>
+ `segment-${getSegmentIdentifier(value.segment, index)}-${index}`
+
const SegmentOverrideListInner = ({
confirmRemove,
controlValue,
@@ -392,14 +402,17 @@
showEditSegment,
toggle,
}) => {
- const useSortable = !id && !disabled
+ const isSortable = !id && !disabled
return (
<div>
{items.map((value, index) => {
- const sortId = `segment-${value.segment}-${index}`
- if (useSortable) {
+ const sortId = getSegmentSortId(value, index)
+ const segmentName =
+ (typeof value.segment === 'object' && value.segment?.name) ||
+ value.segment_name
+ if (isSortable) {
return (
- <Fragment key={value.segment.name || sortId}>
+ <Fragment key={segmentName || sortId}>
<SortableSegmentOverride
sortId={sortId}
id={id}
@@ -447,7 +460,7 @@
}
return (
- <Fragment key={value.segment.name || sortId}>
+ <Fragment key={segmentName || sortId}>
<SegmentOverrideInner
id={id}
name={name}
@@ -511,17 +524,19 @@
}),
)
- const sortableIds = items.map(
- (value, index) => `segment-${value.segment}-${index}`,
+ const sortableIds = items.map((value, index) =>
+ getSegmentSortId(value, index),
)
const handleDragEnd = (event) => {
const { active, over } = event
- if (active.id !== over?.id) {
- const oldIndex = sortableIds.indexOf(active.id)
- const newIndex = sortableIds.indexOf(over.id)
- handleSortEnd({ newIndex, oldIndex })
- }
+ if (!over || active.id === over.id) return
+
+ const oldIndex = sortableIds.indexOf(active.id)
+ const newIndex = sortableIds.indexOf(over.id)
+
+ if (oldIndex === -1 || newIndex === -1) return
+ handleSortEnd({ newIndex, oldIndex })
}
return (This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
|
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
|
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
|
frontend/web/components/segments/Rule/components/RuleConditionPropertySelect.tsx
Show resolved
Hide resolved
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.
| }) | ||
| }) | ||
| } | ||
| }, [collapsed]) |
There was a problem hiding this comment.
Missing requestAnimationFrame cleanup in CollapsibleText effect
Medium Severity
The CollapsibleText component's useEffect does not return a cleanup function for requestAnimationFrame calls in the collapsed === true branch. If collapsed toggles rapidly or the component unmounts before the RAF callbacks fire, setHeight(0) will execute on a stale or unmounted component. The AccordionCard component correctly captures and cancels both animation frame IDs in its cleanup, but this component omits that cleanup entirely.



Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Upgrades the frontend from React 16 to React 19, along with all incompatible dependencies.
React 19 migration
Dependency replacements
React 19. Migrated SegmentOverrides to use @dnd-kit with DndContext, SortableContext, and useSortable
react-tooltip v4 → v5 (performance fix)
feature rows
listeners firing synchronously per resize frame
Other fixes
How did you test this code?
Please describe.