MUL-3398: fix(projects): render plain container on mobile instead of ResizablePanelGroup#4278
MUL-3398: fix(projects): render plain container on mobile instead of ResizablePanelGroup#4278ra0811x wants to merge 1 commit into
Conversation
…anelGroup ProjectDetail unconditionally rendered ResizablePanelGroup on all screen sizes, blocking touch-scroll and showing a drag handle on mobile viewports. This brings ProjectDetail in line with IssueDetail by branching on isMobile: - mobile: plain div container + Sheet for the sidebar - desktop: existing ResizablePanelGroup + ResizableHandle (unchanged) Extract shared detailContent variable to avoid duplicating JSX. Add regression tests covering mobile layout, Sheet open/close, and desktop ResizablePanelGroup preservation. Fixes multica-ai#4277
|
@ra0811x is attempting to deploy a commit to the IndexLabs Team on Vercel. A member of the Team first needs to authorize it. |
Bohan-J
left a comment
There was a problem hiding this comment.
Thanks for the PR. The product direction is right, but please address one mobile-layout correctness issue before merge.
Right now useIsMobile() returns false until its effect runs, so a narrow web viewport can still mount the desktop ResizablePanelGroup branch for the first client render before switching to the mobile Sheet branch. Since this PR is specifically trying to keep the project detail page from rendering the desktop resizable layout on mobile, please make that first render safe as well.
Acceptable fixes could include initializing the mobile state synchronously from window.innerWidth when running on the client, or using a CSS/container-query based approach so narrow viewports never mount the resizable panel group. Please keep the desktop layout unchanged for >= 768px, and add/update coverage if the fix changes the mobile branch behavior.
Also note that the backend CI job is currently failing in server/pkg/agent (TestCodexExecuteSemanticInactivityDoesNotAffectNormalTurnCompletion). That failure looks outside the files touched by this PR, but the PR still needs green CI or maintainer confirmation that the backend failure is unrelated before it can merge.
Summary
Fixes #4277
ProjectDetailunconditionally renderedResizablePanelGroupon all screen sizes. On mobile this:Sheetfrom opening cleanlyIssueDetailalready handles this by branching onisMobile. This PR bringsProjectDetailto the same standard.Changes
detailContentJSX variableisMobile:divcontainer +Sheetfor sidebar (no resize handle)ResizablePanelGroup+ResizableHandle(unchanged)project-detail.test.tsxwith regression tests:data-panel-groupSheeton button clickResizablePanelGroupandResizableHandleTest plan
vitest run projects/components/project-detail.test.tsx— 3 tests pass