Skip to content

Add Tasks panel list view with create form, task actions, and polling#773

Merged
EhabY merged 7 commits intomainfrom
tasks/list-ui
Feb 12, 2026
Merged

Add Tasks panel list view with create form, task actions, and polling#773
EhabY merged 7 commits intomainfrom
tasks/list-ui

Conversation

@EhabY
Copy link
Collaborator

@EhabY EhabY commented Feb 4, 2026

Summary

  • Build out the Tasks webview panel with collapsible Create new task and Task History sections using vscode-elements, with state persisted across reloads
  • Add task creation with template/preset selection, a scrollable task list with status indicators and per-task action menus (pause, resume, delete, view in Coder, download logs), and reusable empty/error state screens
  • Add data layer with 10s polling, push notification subscriptions, and efficient diffing via equality comparisons

Components

Component Purpose
CreateTaskSection Prompt textarea with Cmd/Ctrl+Enter submit, template and preset selectors
TaskList / TaskItem Scrollable task list with status dots, truncated titles, and hover action menus
ActionMenu Custom dropdown with icon support, danger styling, loading spinners, and disabled states
StatusIndicator Colored dot mapped to task status
PromptInput Shared keyboard-aware textarea with configurable action button
StatePanel / ErrorState / NoTemplateState / NotSupportedState Reusable empty and error state screens

Hooks

  • useTasksQuery — data fetching with polling, push notifications, and webview state persistence
  • useTaskMenuItems — per-task context menu items with busy-guard and loading state
  • useCollapsibleToggle — bridges vsc-collapsible-toggle custom events
  • useScrollableHeight — ResizeObserver-based dynamic height for content-adaptive sizing

Architecture

Extends the shared TasksApi IPC layer with task CRUD and action requests, handled by the extension-side TasksPanel which proxies to the Coder API. Adds @tanstack/react-query for mutation and query management. Replaces eslint-plugin-react-compiler with react-hooks lint config.

Tests

Comprehensive test suite covering all components, hooks, and utilities with shared test infrastructure (setup.ts, helpers.ts, render.tsx, tasks.ts mock factory).

Closes #776

@EhabY EhabY self-assigned this Feb 4, 2026
@EhabY EhabY force-pushed the tasks/infrastructure branch from 318c084 to 33757b5 Compare February 4, 2026 07:49
@EhabY EhabY force-pushed the tasks/infrastructure branch 5 times, most recently from 343940c to f7f9316 Compare February 5, 2026 09:29
@EhabY EhabY force-pushed the tasks/list-ui branch 9 times, most recently from ff271b0 to a22e53d Compare February 8, 2026 12:41
@EhabY EhabY force-pushed the tasks/infrastructure branch 3 times, most recently from 78da081 to b1f941b Compare February 9, 2026 11:50
@EhabY EhabY force-pushed the tasks/infrastructure branch from b1f941b to 0a2511f Compare February 9, 2026 11:57
@EhabY EhabY force-pushed the tasks/infrastructure branch from 0a2511f to c0b7abc Compare February 9, 2026 21:06
Base automatically changed from tasks/infrastructure to main February 9, 2026 21:08
@EhabY EhabY changed the title Add Tasks panel list view with components and polling Add Tasks panel list view with create form, task actions, and polling Feb 10, 2026
@EhabY EhabY force-pushed the tasks/list-ui branch 3 times, most recently from 89596f4 to 35311a9 Compare February 10, 2026 21:26
@EhabY EhabY force-pushed the tasks/list-ui branch 2 times, most recently from 0302286 to 508db63 Compare February 11, 2026 00:18
@EhabY EhabY requested a review from jakehwll February 11, 2026 14:01
Adds the task list UI layer including:
- Collapsible sections for Create Task and Task History
- CreateTaskSection with template/preset selection
- TaskList and TaskItem components with status indicators
- ActionMenu component for task actions (pause, resume, delete)
- StatusIndicator with state-based styling
- ErrorState, NotSupportedState, NoTemplateState empty states
- State persistence across webview visibility changes
- Polling for task list updates with ref-based comparison
- Push message handling for real-time updates

Utilities:
- taskArraysEqual/templateArraysEqual for efficient diffing
- getDisplayName/getLoadingLabel helper functions
- Replace CollapsibleSection with VscodeCollapsible + VscodeScrollable,
  using useCollapsibleToggle hook to bridge the unmapped custom event
  and useScrollableHeight for scroll metrics and content-adaptive sizing
- Extract data-fetching, polling, notifications, and webview state
  persistence into useTasksData hook, reducing App.tsx to pure layout
- Add shared StatePanel component used by ErrorState, NoTemplateState,
  and NotSupportedState to eliminate duplicated centered-state markup
- Simplify StatusIndicator to use shared getTaskUIState from @repo/shared
- Add separator support and right-aligned positioning to ActionMenu
- Remove useCallback/useMemo wrappers from useTaskMenuItems and TaskItem
- Clean up CSS: remove unused styles, tighten task item spacing, match
  native VS Code menu styling for action menu dropdown
- Use readonly array types for tasks/templates props, remove unused
  exports from compare.ts, flatten polling config constant
- Update tests to use shared task() factory and full task objects
@EhabY EhabY merged commit 550f617 into main Feb 12, 2026
6 checks passed
@EhabY EhabY deleted the tasks/list-ui branch February 12, 2026 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Tasks panel list view UI

2 participants