feat(ui): improve mobile kanban view (#400)
* feat(ui): add responsive layouts to swimlane kanban content Mobile gets swipeable columns with tab navigation and touch-friendly drag sensors. Tablet gets 2-column horizontal scroll with snap. Desktop keeps the existing CSS grid layout. * feat(ui): add mobile task sheet and search bar components Bottom sheet (vaul Drawer) for task preview with Edit/Delete/Open Session actions. Compact search bar component for filtering tasks on mobile. * feat(ui): wire mobile components into kanban board Integrate MobileFab, MobileSearchBar, and MobileTaskSheet into the kanban board. Skip desktop preview panel on mobile — card taps open a bottom sheet instead of navigating directly. * refactor(ui): optimize swimlane container for mobile Hide swimlane headers for single workflow on mobile, remove horizontal padding on small screens. Extract filterTasks and WorkflowItem to keep the main component under the line limit. * test: add mobile kanban E2E tests 8 Playwright tests covering mobile layout, FAB, search, column tabs, bottom sheet, preview panel suppression, and swimlane header hiding. Adds mobile-chrome project (Pixel 5) to playwright config. * fix(ui): fix mobile E2E test failures in CI Exclude mobile tests from chromium project (wrong viewport), add startIndex to Embla carousel to fix initial scroll race condition, fix strict locator for menu heading, use first step for swimlane test. * fix(ui): fix create task dialog button layout on mobile Make StartTaskSplitButton full-width on mobile, hide dropdown chevron on small screens, and show a visible "Create only" button instead. * fix(ui): match header button sizes and add icon to create-only action Align hamburger menu button with changelog/health buttons by removing explicit h-10 w-10 override. Add IconPlus to "Create without starting agent" in both the desktop dropdown and mobile button. * fix(ui): address code review feedback for mobile kanban - Base hideHeaders on workflowFilter/total count, not filtered result - Clamp mobile column index via useMemo when steps change - Fix wrong assertion in preview panel test (was checking toBeVisible) - Separate altDisabled from splitDisabled (no agent needed for create-only) - Add visible plan mode button on mobile (was hidden behind dropdown) - Wait for mobile-kanban-layout in page object goto() - Extract computeBaseDisabled to reduce complexity * fix(test): fix flaky mobile E2E tests in headless Chrome - Use instant jump (scrollTo with jump=true) for tab-triggered carousel navigation instead of animated scroll that doesn't complete in headless - Add data-testid to swimlane header to avoid ambiguous Badge locator matching column tab buttons - Add timeout to viewport assertion for resilience * fix(ui): address review feedback and fix carousel reinitialization - Stabilize Embla options to prevent carousel reinit on tab change (startIndex was causing re-initialization, resetting scroll position) - Guard programmatic scrolls from triggering select callback revert - Remove PointerSensor from mobile DnD sensors (conflicts with touch) - Fix plan mode button using wrong disabled prop on mobile - Use literal name matching in columnTab locator (avoid regex injection) - Use toHaveCount(0) for stricter preview panel absence assertion * fix(ui): use pointerDown gating for carousel swipe sync Embla's scrollTo doesn't work in headless Chrome, causing the select event to fire with index 0 and reset the active tab. Fix by only syncing Embla→tabs on user-initiated pointer interactions (swipes), not on programmatic scrollTo calls. Update E2E test to verify tab active state instead of carousel viewport positions, which are unreliable in headless environments. * fix(test): add data-testid and data-active to column tabs Use explicit data attributes for more reliable test targeting instead of getByRole and CSS class assertions. * refactor(ui): use touch sensors for tablet and deduplicate getTasksForStep * fix(ui): improve spacing for stats and settings buttons in mobile menu
This commit is contained in:
@@ -153,7 +153,7 @@ function MobileDisplayOptions(props: MobileDisplayOptionsProps) {
|
||||
|
||||
function MobileNavLinks({ onOpenChange }: { onOpenChange: (open: boolean) => void }) {
|
||||
return (
|
||||
<div className="mt-auto space-y-2">
|
||||
<div className="mt-auto flex flex-col gap-3 pt-4 border-t border-border">
|
||||
<Link href="/stats" onClick={() => onOpenChange(false)}>
|
||||
<Button variant="outline" className="w-full cursor-pointer">
|
||||
<IconChartBar className="h-4 w-4 mr-2" />
|
||||
|
||||
Reference in New Issue
Block a user