Spec: task-browser-refactor
Task: 15. Test selection behavior
Requirements: 3.1, 3.2, 3.3, 3.4, 3.5
Requirement: WHEN a user clicks a row without modifiers THEN the system SHALL clear all selections and select only the clicked row
Expected: Clicking a task selects only that task
Expected: Clicking another task clears previous selection and selects new task
Expected: Selection count shows "1 task selected"
Requirement: WHEN a user Ctrl+clicks (or Cmd+clicks on Mac) a row THEN the system SHALL toggle that row's selection state without affecting other selections
Expected: Ctrl+clicking unselected task adds it to selection
Expected: Ctrl+clicking selected task removes it from selection
Expected: Ctrl+clicking does not affect other selected tasks
Expected: Selection count shows "N tasks selected" for multiple selections
Requirement: WHEN a user Shift+clicks a row THEN the system SHALL select all rows between the last clicked row and the current row
Expected: Shift+clicking selects all tasks from first to last clicked
Expected: Shift+clicking earlier task selects range backwards
Expected: Selection count shows correct number of tasks in range
Requirement: WHEN a user clicks the header checkbox THEN the system SHALL toggle selection of all visible (filtered) rows
Expected: Clicking header checkbox selects all visible tasks
Expected: Clicking header checkbox again deselects all tasks
Expected: With filters applied, header checkbox selects only visible filtered tasks
Expected: When some (but not all) tasks are selected, checkbox shows indeterminate state
Requirement: WHEN a user double-clicks a row THEN the system SHALL open the task detail panel without modifying selection state
Expected: Double-clicking a task opens the detail panel
Expected: Double-clicking a selected task does not change selection
Expected: Double-clicking an unselected task does not change existing selection
Expected: Detail panel shows correct task information
Expected: On mobile, detail panel opens in sheet/modal format
These tests verify the selection behavior works correctly in combination with other features.
Expected: Selected rows have distinct background color (bg-muted/50)
Expected: Hovering over rows shows hover effect distinct from selection
Expected: Cursor changes to pointer when hovering over rows
Expected: During shift-click, text is not selected (select-none class)
Expected: When no tasks exist, table shows "No tasks found" message
Use this section to record any issues, observations, or notes during testing.
Before marking this task as complete, ensure: