Problem
In VideoTimelineEditor (client/src/pages/VideoTimelineEditor.jsx:755-758), the page layout is structured as a 3-column grid on large screens and a stacked 1-column layout on smaller screens:
<div className="grid grid-cols-1 lg:grid-cols-[260px_1fr_240px] gap-3 min-h-[400px]">
{/* Left rail — library */}
{showLibrary && (
<div className="bg-port-card/50 border border-port-border rounded-lg p-2 max-h-[600px] overflow-y-auto">
...
</div>
)}
{/* Center — preview + tracks */}
<div className="space-y-3 min-w-0">...</div>
{/* Right rail — inspector */}
<div className="bg-port-card/50 border border-port-border rounded-lg p-3 space-y-3">...</div>
</div>
showLibrary initializes to true (line 112). On viewports under 1024px (including mobile viewports at ~375px), the Library rail renders first in DOM/grid order and takes up to 600px of vertical height (max-h-[600px]).
Trigger
- On a mobile device or responsive viewport (< 1024px width, e.g. 375px × 667px), navigate to
/media/timeline/:projectId.
- Observe the initial view above the fold.
- Tap "+ Add to timeline" on any clip tile in the library.
Impact
- The 600px library panel completely pushes the primary workspace (video preview player, playback controls, scrubber, timeline tracks, and inspector) below the fold.
- When the user taps "+ Add to timeline", the timeline updates off-screen at the bottom without any visible feedback or confirmation above the fold.
- The user is forced to scroll past hundreds of pixels of library items to see their video canvas and arrange clips.
Proposed Fix
- Apply responsive flex/grid ordering so the primary preview and timeline render first on mobile:
- Preview/timeline container:
order-1 lg:order-2
- Library container:
order-2 lg:order-1
- Inspector container:
order-3
- Default
showLibrary to false on initial load when window.innerWidth < 1024 (or initialize via typeof window !== 'undefined' ? window.innerWidth >= 1024 : true), letting mobile users open the library drawer/panel when needed.
- Files touched:
client/src/pages/VideoTimelineEditor.jsx
client/src/pages/VideoTimelineEditor.test.jsx
Acceptance Criteria
Problem
In
VideoTimelineEditor(client/src/pages/VideoTimelineEditor.jsx:755-758), the page layout is structured as a 3-column grid on large screens and a stacked 1-column layout on smaller screens:showLibraryinitializes totrue(line 112). On viewports under1024px(including mobile viewports at ~375px), the Library rail renders first in DOM/grid order and takes up to600pxof vertical height (max-h-[600px]).Trigger
/media/timeline/:projectId.Impact
Proposed Fix
order-1 lg:order-2order-2 lg:order-1order-3showLibrarytofalseon initial load whenwindow.innerWidth < 1024(or initialize viatypeof window !== 'undefined' ? window.innerWidth >= 1024 : true), letting mobile users open the library drawer/panel when needed.client/src/pages/VideoTimelineEditor.jsxclient/src/pages/VideoTimelineEditor.test.jsxAcceptance Criteria
grid-cols-[260px_1fr_240px]) remains unchanged.