feat: implement mobile app usability improvements
Mobile Navigation: - Add MobileNav component with bottom tab bar - Show mobile nav on small screens, hide desktop sidebar - Add session count badge to Sessions tab - Add safe area padding for notched devices Session Management: - Redesign SessionCard for mobile with action menu - Add MobileActionSheet for session actions - Keep primary action prominent Forms & Dialogs: - Stack form fields vertically on mobile - Ensure 44px minimum touch targets - Update dialogs for 320px viewport Responsive Layout: - Add MobilePageHeader with back button - Reduce page padding on mobile - Stack multi-column grids vertically Touch & Interaction: - Add active states to interactive elements - Ensure 8px spacing between touch targets Complex Pages: - Update Repo Workspace for mobile - Update Tool Workshop and Config Profiles Build: TypeScript check passes, production build succeeds
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
## MODIFIED Requirements
|
||||
|
||||
### Requirement: Layout Component
|
||||
The system SHALL provide a consistent application layout for authenticated screens across desktop and mobile sizes.
|
||||
|
||||
#### Scenario: Application shell
|
||||
- **GIVEN** the frontend application
|
||||
- **THEN** a Layout component SHALL:
|
||||
- Display a header with user info and logout
|
||||
- Display sidebar navigation on desktop (width >= 768px)
|
||||
- Show main content area
|
||||
- Collapse sidebar into a mobile menu toggle on small viewports
|
||||
- **MODIFIED**: Display a bottom tab bar on mobile (width < 768px) with tabs for Home, Projects, Sessions, Tools, Settings
|
||||
- **MODIFIED**: Hide sidebar navigation on mobile viewports
|
||||
|
||||
#### Scenario: Navigation links
|
||||
- **GIVEN** the sidebar navigation
|
||||
- **THEN** it SHALL include links to:
|
||||
- Dashboard
|
||||
- Projects
|
||||
- Repositories
|
||||
- SSH Keys
|
||||
- Settings
|
||||
- **MODIFIED**: The bottom tab bar SHALL include tabs for:
|
||||
- Home (Dashboard)
|
||||
- Projects
|
||||
- Sessions
|
||||
- Tools (Tool Workshop)
|
||||
- Settings
|
||||
|
||||
### Requirement: Responsive Design
|
||||
The system SHALL support mobile devices.
|
||||
|
||||
#### Scenario: Mobile viewport
|
||||
- **GIVEN** a mobile device
|
||||
- **WHEN** the app loads
|
||||
- **THEN**:
|
||||
- **MODIFIED**: A bottom tab bar is displayed for primary navigation
|
||||
- Content adapts to screen width
|
||||
- Touch targets are appropriately sized (minimum 44px)
|
||||
- **ADDED**: All multi-column layouts stack vertically
|
||||
- **ADDED**: Dialogs fit within the viewport and are scrollable
|
||||
- **ADDED**: Page headers include back buttons where applicable
|
||||
@@ -0,0 +1,34 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Mobile Bottom Navigation
|
||||
The system SHALL display a bottom tab bar for navigation on mobile viewports (width < 768px).
|
||||
|
||||
#### Scenario: Mobile viewport shows bottom nav
|
||||
- **WHEN** the app is viewed on a device with width less than 768px
|
||||
- **THEN** a bottom tab bar is displayed at the bottom of the screen
|
||||
- **AND** it contains tabs for: Home, Projects, Sessions, Tools, Settings
|
||||
- **AND** the desktop sidebar navigation is hidden
|
||||
|
||||
#### Scenario: Bottom nav tab selection
|
||||
- **WHEN** user taps a tab in the bottom navigation
|
||||
- **THEN** the app navigates to the corresponding route
|
||||
- **AND** the selected tab shows an active state
|
||||
|
||||
#### Scenario: Bottom nav session badge
|
||||
- **GIVEN** the user has active sessions
|
||||
- **WHEN** viewing the bottom navigation
|
||||
- **THEN** the Sessions tab displays a badge with the active session count
|
||||
|
||||
#### Scenario: Desktop viewport shows sidebar
|
||||
- **WHEN** the app is viewed on a device with width 768px or greater
|
||||
- **THEN** the desktop sidebar navigation is displayed
|
||||
- **AND** the bottom tab bar is hidden
|
||||
|
||||
### Requirement: Safe Area Support
|
||||
The system SHALL account for mobile safe areas (notch, home indicator) in the bottom navigation.
|
||||
|
||||
#### Scenario: iPhone with home indicator
|
||||
- **GIVEN** an iPhone with a home indicator
|
||||
- **WHEN** the bottom navigation is displayed
|
||||
- **THEN** it includes additional padding to avoid the home indicator
|
||||
- **AND** all navigation tabs remain fully tappable
|
||||
@@ -0,0 +1,67 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Mobile Breakpoint System
|
||||
The system SHALL apply mobile-specific styles at viewports below 768px width.
|
||||
|
||||
#### Scenario: Form stacking on mobile
|
||||
- **GIVEN** a multi-column form layout
|
||||
- **WHEN** the viewport width is less than 768px
|
||||
- **THEN** all form fields stack vertically in a single column
|
||||
- **AND** grid layouts use `grid-template-columns: 1fr`
|
||||
|
||||
#### Scenario: Dialog sizing on mobile
|
||||
- **GIVEN** a dialog or modal
|
||||
- **WHEN** the viewport width is less than 768px
|
||||
- **THEN** the dialog fits within the viewport width (maximum 100vw - 32px padding)
|
||||
- **AND** the dialog content is scrollable if it exceeds the viewport height
|
||||
|
||||
#### Scenario: Page padding on mobile
|
||||
- **GIVEN** any page content
|
||||
- **WHEN** the viewport width is less than 768px
|
||||
- **THEN** horizontal padding is reduced to 16px or less
|
||||
- **AND** content does not horizontally scroll
|
||||
|
||||
### Requirement: Touch Target Minimum Size
|
||||
The system SHALL ensure all interactive elements meet minimum touch target sizes.
|
||||
|
||||
#### Scenario: Button touch targets
|
||||
- **GIVEN** any button or clickable element
|
||||
- **THEN** it has a minimum height of 44px
|
||||
- **AND** it has a minimum width of 44px where applicable
|
||||
|
||||
#### Scenario: Link touch targets
|
||||
- **GIVEN** any text link in a list or navigation
|
||||
- **THEN** the clickable area has a minimum height of 44px
|
||||
- **AND** adjacent links have minimum 8px spacing
|
||||
|
||||
### Requirement: Mobile Page Headers
|
||||
The system SHALL provide consistent page headers on mobile with back navigation.
|
||||
|
||||
#### Scenario: Page header on mobile
|
||||
- **GIVEN** any page other than the dashboard
|
||||
- **WHEN** viewed on mobile
|
||||
- **THEN** the page displays a header with:
|
||||
- A back button (where applicable)
|
||||
- The page title
|
||||
- Contextual action buttons (if any)
|
||||
|
||||
#### Scenario: Back button navigation
|
||||
- **GIVEN** a page with a back button on mobile
|
||||
- **WHEN** the user taps the back button
|
||||
- **THEN** the app navigates to the previous page
|
||||
- **AND** if no previous page exists, it navigates to the dashboard
|
||||
|
||||
### Requirement: Active States for Touch
|
||||
The system SHALL provide visual feedback when touchable elements are tapped.
|
||||
|
||||
#### Scenario: Button active state
|
||||
- **GIVEN** a button on a touch device
|
||||
- **WHEN** the user taps the button
|
||||
- **THEN** a visual active state is displayed (e.g., background color change)
|
||||
- **AND** the active state persists for the duration of the tap
|
||||
|
||||
#### Scenario: Card active state
|
||||
- **GIVEN** a clickable card on a touch device
|
||||
- **WHEN** the user taps the card
|
||||
- **THEN** a visual active state is displayed
|
||||
- **AND** the active state is distinct from the hover state
|
||||
@@ -0,0 +1,50 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Touch-Optimized Session Cards
|
||||
The system SHALL render session cards with touch-friendly layouts on mobile viewports.
|
||||
|
||||
#### Scenario: Session card touch targets
|
||||
- **GIVEN** a session card displayed on mobile
|
||||
- **THEN** all interactive elements have a minimum height of 44px
|
||||
- **AND** action buttons have adequate spacing (minimum 8px between adjacent targets)
|
||||
|
||||
#### Scenario: Session card action menu
|
||||
- **GIVEN** a session card on mobile
|
||||
- **WHEN** the user taps the actions menu button
|
||||
- **THEN** a sheet or dropdown appears with all available actions
|
||||
- **AND** the actions include: Open, Terminal, Stop/Start, Restart, Delete
|
||||
- **AND** tapping outside the menu closes it
|
||||
|
||||
#### Scenario: Primary action visibility
|
||||
- **GIVEN** a running session card on mobile
|
||||
- **THEN** the primary action (Open or Terminal) remains visible as a prominent button
|
||||
- **AND** secondary actions are accessible through the actions menu
|
||||
|
||||
### Requirement: Mobile Session Creation
|
||||
The system SHALL provide a mobile-optimized session creation flow.
|
||||
|
||||
#### Scenario: Create session form on mobile
|
||||
- **GIVEN** the create session form on a mobile viewport
|
||||
- **THEN** all form fields stack vertically in a single column
|
||||
- **AND** each field has a minimum height of 44px
|
||||
- **AND** the form is scrollable if it exceeds the viewport height
|
||||
|
||||
#### Scenario: Session creation loading state
|
||||
- **GIVEN** the user submits the create session form on mobile
|
||||
- **WHEN** the request is in progress
|
||||
- **THEN** a loading indicator is displayed
|
||||
- **AND** the submit button is disabled to prevent double-submission
|
||||
|
||||
### Requirement: Mobile Session List
|
||||
The system SHALL display the session list optimized for mobile scrolling.
|
||||
|
||||
#### Scenario: Session list scrolling
|
||||
- **GIVEN** multiple sessions on mobile
|
||||
- **THEN** the session list is vertically scrollable
|
||||
- **AND** each session card has adequate vertical spacing for touch selection
|
||||
- **AND** the list does not horizontally scroll
|
||||
|
||||
#### Scenario: Empty state on mobile
|
||||
- **GIVEN** no active sessions on mobile
|
||||
- **THEN** the empty state is centered and readable on the viewport
|
||||
- **AND** the call-to-action button is prominent and tappable
|
||||
@@ -0,0 +1,29 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Mobile Session Interactions
|
||||
The system SHALL provide touch-optimized interactions for session management on mobile.
|
||||
|
||||
#### Scenario: Session card actions on mobile
|
||||
- **GIVEN** a session card displayed on mobile
|
||||
- **WHEN** the user wants to perform an action
|
||||
- **THEN** primary actions (Open/Terminal) are visible as prominent buttons
|
||||
- **AND** secondary actions (Stop, Restart, Delete) are accessible through an action menu
|
||||
- **AND** all action buttons have minimum 44px touch targets
|
||||
|
||||
#### Scenario: Session stop confirmation on mobile
|
||||
- **GIVEN** the user taps Stop on a running session
|
||||
- **THEN** a confirmation dialog appears optimized for mobile viewport
|
||||
- **AND** the dialog fits within 320px width
|
||||
- **AND** the dialog actions are stacked vertically with full-width buttons
|
||||
|
||||
#### Scenario: Session creation on mobile
|
||||
- **GIVEN** the user initiates session creation on mobile
|
||||
- **THEN** the creation form stacks vertically
|
||||
- **AND** all fields have minimum 44px height
|
||||
- **AND** the form is scrollable within the viewport
|
||||
|
||||
#### Scenario: Loading states on mobile
|
||||
- **GIVEN** an async session operation on mobile
|
||||
- **WHEN** the operation is in progress
|
||||
- **THEN** a loading indicator is displayed
|
||||
- **AND** interactive elements are disabled to prevent double-submission
|
||||
@@ -0,0 +1,22 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Mobile Instance Controls
|
||||
The system SHALL ensure instance control actions are usable on mobile viewports.
|
||||
|
||||
#### Scenario: Control button visibility on mobile
|
||||
- **GIVEN** an instance card or detail view on mobile
|
||||
- **THEN** control buttons (Start, Stop, Restart, Delete) have minimum 44px height
|
||||
- **AND** buttons have adequate spacing between them
|
||||
- **AND** button labels are readable at mobile font sizes
|
||||
|
||||
#### Scenario: Instance status display on mobile
|
||||
- **GIVEN** an instance on mobile
|
||||
- **THEN** the status indicator is clearly visible
|
||||
- **AND** status text does not wrap awkwardly
|
||||
- **AND** health/probe information is accessible without horizontal scrolling
|
||||
|
||||
#### Scenario: Instance creation form on mobile
|
||||
- **GIVEN** the instance creation flow on mobile
|
||||
- **THEN** all configuration fields stack vertically
|
||||
- **AND** dropdowns and selects are usable with touch
|
||||
- **AND** the submit button is prominent and reachable
|
||||
Reference in New Issue
Block a user