fix(content-sidebar): add programmatic Resin tracking for sidebar resize - #4722
Conversation
Resin DOM delegation only captures click/mouseup, but the resize handle uses pointer capture, so GA shipped with zero sidebarresizehandle events. Emit recordAction on resizeStart/resizeEnd and forward resin through ContentPreview. Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughAdds optional ChangesSidebar resize instrumentation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Biome (2.5.3)src/elements/content-sidebar/ContentSidebar.jsFile contains syntax errors that prevent linting: Line 12: 'import type' are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 40: 'import type' are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 41: 'import type' are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 42: 'import type' are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 43: 'import type' are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 44: 'import type' are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 45: 'import type' are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 46: 'import type' are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 47: 'import type' ... [truncated 4077 characters] ... remove the syntax.; Line 349: return type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 350: type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 368: return type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 418: type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 419: type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 430: expected src/elements/content-preview/ContentPreview.jsFile contains syntax errors that prevent linting: Line 21: 'import type' are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 36: 'import { type x ident }' are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 67: 'import type' are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 68: 'import type' are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 69: 'import type' are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 70: 'import type' are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 71: 'import type' are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 72: 'import type' are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 73: ' ... [truncated 19028 characters] ... nly feature. Convert your file to a TypeScript file or remove the syntax.; Line 1599: type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 1611: type annotation are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 1618: Type annotations are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 1650: expected Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@Mergifyio queue |
Merge Queue Status
This pull request spent 13 minutes 15 seconds in the queue, including 12 minutes 52 seconds running CI. Required conditions to merge
|
Description
The resizable sidebar resize handle uses pointer capture (
pointerdown/pointermove/pointerup), so Resin's DOM click delegation never recordssidebarresizehandleevents.This change emits programmatic
recordActioncalls on resize start and end with width metadata, and forwards an optionalresinprop fromContentPreviewthrough toSidebarso host apps can supply the callback.Event shape:
Test plan
SidebarResizeHandle,Sidebar,ContentSidebar, andContentPreviewprop forwardingresizeStartandresizeEndwith expected payload when host suppliesresin.recordActionSemantic release type
fix- Bug fixSummary by CodeRabbit
New Features
resinprop.Bug Fixes
Tests
resinforwarding and resize lifecycle behavior (including action recording and resize handle callbacks).