feat(desktop): separate tasks and pull requests in sidebar

Merged
RO
3mo ago
+1840-698

What & why

Closes #5974.

Tasks and pull requests are distinct workflows with different filters, empty states, and detail journeys, but the desktop dashboard placed them behind one “Tasks & PRs” destination and repeated the same choice as page-level tabs. This made the surface dense and gave navigation two competing sources of truth.

This change:

  • adds separate Tasks and Pull requests destinations to both dashboard sidebar variants
  • introduces a focused /pull-requests route with independent repository, state, and search context
  • keeps Linear and GitHub Issues as contextual sources inside Tasks
  • restores each workflow’s persisted filters when moving between destinations and detail panes
  • redirects legacy /tasks?type=prs and /tasks/pr/:prNumber links while preserving relevant filters
  • uses the serving host for remote projects and prevents stale rows from leaking between project/host pairs
  • follows cache-first TanStack DB rendering and distinguishes loading, empty, unavailable, invalid-link, and retry states
  • removes the redundant Tasks/Pull Requests page tabs and adds accessible active states, keyboard focus, reduced-motion behavior, and responsive toolbars/detail headers

How I tested it

  • bun run lint:fix
  • bun run lint — 0 warnings/errors
  • focused Bun tests across 8 changed-area files — 27 tests and 54 expectations pass
  • bun run typecheck — 35/35 tasks pass
  • bun run --cwd apps/desktop compile:app — production main, preload, and renderer builds pass
  • exact Electron/CDP journeys against this worktree at renderer 3085, API 3081, Electric proxy 3092, and CDP 9307:
    • seeded an isolated local-only project with 14 Linear tasks, 8 GitHub issues, and 8 pull requests through the real Electric and host-service data paths
    • clicked Tasks → Linear table → board → task detail → back → GitHub issues → issue detail → Pull requests → PR detail using visible UI controls
    • repeated the full journey at a 960×720 compact viewport
    • verified destination-specific context restoration, one active left-rail item, no combined navigation, no redundant primary tabs, valid detail routes, and wrapped compact task titles
    • captured and visually inspected all 14 populated list/board/detail screenshots

The full local bun test monorepo run was also attempted: 4,284 passed, while 129 failed with 20 harness errors in unrelated environment-dependent PTY, Electron preload, localStorage, relay, and git-process suites. The changed-area tests, lint, root typecheck, production compile, and exact-app flows are green; CI remains the repository-wide acceptance gate.

Before: combined destination and page tabs

Before: combined Tasks and PRs experience

Populated Tasks workflow

TableBoard
Populated Tasks table with status groups, priorities, labels, and assigneesPopulated Tasks board with Backlog, Todo, In Progress, and Done columns

Task detail pane

Populated task detail with acceptance criteria and properties

Populated GitHub issues inside Tasks

Issue listIssue detail pane
Populated GitHub Issues source inside TasksPopulated GitHub issue detail pane

Populated Pull requests workflow

Pull request listPull request detail pane
Populated Pull requests destinationPopulated pull request detail pane
Compact 960×720 verification with populated data

Tasks

TableBoardDetail pane
Populated Tasks table at 960 by 720Populated Tasks board at 960 by 720Populated task detail with wrapped title at 960 by 720

GitHub issues

Issue listIssue detail pane
Populated GitHub Issues at 960 by 720Populated GitHub issue detail at 960 by 720

Pull requests

Pull request listPull request detail pane
Populated Pull requests at 960 by 720Populated pull request detail at 960 by 720

Checklist

  • PR title follows conventional commits (type(scope): subject)
  • bun run lint and bun run typecheck pass
  • “Allow edits from maintainers” is checked on this fork PR

Open in Stage

Summary by cubic

Split Tasks and Pull requests into separate sidebar destinations with a new /pull-requests route and PR detail page. Each workflow has its own filters and search, picks the right serving host, task titles auto-resize while editing, and pull-requests views hide the empty TopBar while keeping window drag regions.

  • New Features

    • Added Tasks and Pull requests entries to both sidebars with clear active states.
    • New /pull-requests route with project filter, Open/All toggle, and search; filters persist independently from Tasks and are stored under pull-requests-filter-state.
    • New /pull-requests/$prNumber detail page with shared header/state UI, back navigation, external link, and “Add to workspace”.
    • GitHub Issues stay in Tasks with an Include closed toggle; PRs UI removed from Tasks.
    • Shared ProjectFilter, OpenClosedFilter, and WorkItemsSearch; each destination restores its own filters and drops stale rows when project/host changes.
    • Pull-requests views hide the global TopBar; the toolbar and shared detail header preserve window drag. Project filter shows a loading label while projects resolve.
  • Migration

    • Legacy routes /tasks?type=prs and /tasks/pr/:prNumber redirect to /pull-requests and /pull-requests/$prNumber (preserves search/state).
    • Existing Tasks filter state migrates safely (drops the PRs tab, adds “Include closed issues”); no user action needed.

Summary by CodeRabbit

  • New Features

    • Added dedicated Pull requests navigation separate from Tasks.
    • Added pull-request search, project, and Open/All filters with persisted selections.
    • Added pull-request list and detail views with descriptions, authors, external links, and workspace actions.
    • Added support for viewing closed GitHub issues while preserving filters during navigation.
    • Added reusable search, filtering, loading, and error states across work-item views.
    • Task titles now support multiline editing.
  • Bug Fixes

    • Improved project loading, empty states, error handling, retries, accessibility, and detail navigation.
  • Tests

    • Added coverage for filtering, navigation, host selection, parameter validation, and migrations.