feat(home): resizable chat/resource panel divider#3648
feat(home): resizable chat/resource panel divider#3648waleedlatif1 merged 11 commits intostagingfrom
Conversation
|
You have used all Bugbot PR reviews included in your free trial for your GitHub account on this workspace. To continue using Bugbot reviews, enable Bugbot for your team in the Cursor dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR delivers two distinct layers of change: a new resizable divider between the chat and resource panels in Resize feature
useEffect refactoring
Key items
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Handle as ResizeHandle
participant Panel as MothershipView
participant Body as document.body
User->>Handle: pointerdown
Handle->>Panel: pin width to current rendered px
Handle->>Panel: disable CSS transition
Handle->>Body: set ew-resize cursor and userSelect none
Handle->>Handle: setPointerCapture, attach move/up/cancel listeners via AbortController
loop While dragging
User->>Handle: pointermove
Handle->>Panel: style.width = clamp(innerWidth - clientX, MIN, MAX_PERCENTAGE)
end
alt pointerup
User->>Handle: release
Handle->>Panel: restore CSS transition
Handle->>Body: clear cursor and userSelect
else pointercancel
User-->>Handle: browser reclaims gesture
Handle->>Panel: restore CSS transition
Handle->>Body: clear cursor and userSelect
else unmount mid-drag
Handle->>Panel: cleanupRef fires restore CSS transition
Handle->>Body: clear cursor and userSelect
end
Handle-->>Panel: clearWidth on collapse removes inline style
|
...orkspaceId]/home/components/mothership-view/components/resource-content/resource-content.tsx
Show resolved
Hide resolved
apps/sim/app/workspace/[workspaceId]/home/hooks/use-mothership-resize.ts
Outdated
Show resolved
Hide resolved
- Remove aria-hidden from resize handle outer div so separator role is visible to AT - Add viewport-resize re-clamping in useMothershipResize to prevent panel exceeding max % after browser window narrows - Change default MothershipView width from 60% to 50%
|
You have used all Bugbot PR reviews included in your free trial for your GitHub account on this workspace. To continue using Bugbot reviews, enable Bugbot for your team in the Cursor dashboard. |
…eed-an-effect - use-chat: remove messageQueue→ref sync Effect; inline assignment like other refs - use-chat: replace activeResourceId selection Effect with useMemo (derived value, avoids extra re-render cycle; activeResourceIdRef now tracks effective value for API payloads) - use-chat: replace 3x useLayoutEffect ref-sync (processSSEStream, finalize, sendMessage) with direct render-phase assignment — consistent with existing resourcesRef pattern - user-input: fold onEditValueConsumed callback into existing render-phase guard; remove Effect - home: move isResourceAnimatingIn 400ms timer into expandResource/handleResourceEvent event handlers where setIsResourceAnimatingIn(true) is called; remove reactive Effect watcher
|
@greptile |
apps/sim/app/workspace/[workspaceId]/home/hooks/use-mothership-resize.ts
Outdated
Show resolved
Hide resolved
apps/sim/app/workspace/[workspaceId]/home/hooks/use-mothership-resize.ts
Outdated
Show resolved
Hide resolved
|
@greptile |
|
@greptile |
apps/sim/app/workspace/[workspaceId]/home/components/user-input/user-input.tsx
Show resolved
Hide resolved
|
@greptile |
apps/sim/app/workspace/[workspaceId]/home/hooks/use-mothership-resize.ts
Outdated
Show resolved
Hide resolved
apps/sim/app/workspace/[workspaceId]/settings/components/general/general.tsx
Show resolved
Hide resolved
...d]/components/panel/components/copilot/components/user-input/hooks/use-context-management.ts
Show resolved
Hide resolved
|
@greptile |
apps/sim/app/workspace/[workspaceId]/home/hooks/use-mothership-resize.ts
Show resolved
Hide resolved
|
@greptile |
Summary
Type of Change
Testing
Tested manually
Checklist