Skip to content

Linear-style tasks as a portable cross-surface primitive (0161) - #32

Merged
crs48 merged 14 commits into
mainfrom
feat/linear-tasks-0161
Jun 11, 2026
Merged

Linear-style tasks as a portable cross-surface primitive (0161)#32
crs48 merged 14 commits into
mainfrom
feat/linear-tasks-0161

Conversation

@crs48

@crs48 crs48 commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Implements exploration 0161: one canonical Task node that renders and edits natively across every surface — pages, canvases, databases, and a new Linear-style Tasks surface — with a keyboard-first command layer and GitHub integration.

Phase 1 — Converge the primitive

  • Reconciliation spec (docs/specs/PAGE_TASK_RECONCILIATION.md) + claim-or-create path in useTaskProjectionSync so cut/pasting tasks across pages/canvases moves the node instead of duplicating it (randomized convergence tests)
  • Shared TaskChip/TaskRow/TaskCard components with tombstone + restore for archived/dangling references
  • Canvas object kind task (source-backed, live via useNode); canvas checklists backed by Task nodes with legacy-data migration
  • New tasks database column type: inline checklist cell writing through to canonical nodes

Phase 2 — Tasks surface

  • TaskView + Project schemas; shortId + project + canvas relations on Task
  • Status categories (triage/backlog/in-review added additively) with derived completed
  • /tasks route: All/Mine/Triage tabs, grouped list, @dnd-kit board updating status + sortKey
  • 10k-task CI benchmarks: group-by 0.8ms, palette filter 0.7ms, full load through the bridge 16ms

Phase 3 — Keyboard layer

  • CommandRegistry in packages/plugins: scopes, single-key verbs (suppressed in editors), g t-style chords
  • Unified Cmd+K (search + commands + task quick-create), j/k focus, x/s/p verbs with filterable mini-palettes, ? help overlay

Phase 4 — GitHub integration

  • Hub short-id block allocation (offline-collision-free XN-142 identifiers), copy-branch-name action
  • Signature-verified webhook: magic words + branch parsing, status automation (open→in-review, merge→done, close→revert, drafts inert)
  • Live PR/review/CI badges on task rows/cards via reference metadata (pull_request_review + check_suite events)

73 new tests across data/react/views/ui/plugins/hub; exploration doc checked off (0161_[x]).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Dedicated Tasks surface with tab filtering (All/My Tasks/Triage), list and board views, quick creation, and keyboard-driven navigation (j/k, x to toggle, s/p for status/priority).
    • Unified Cmd+K command palette combining workspace commands, page search, and inline task creation.
    • Tasks as first-class canvas objects with synchronization across surfaces.
    • GitHub integration for task automation (PR/CI/review state tracking).
    • Task short identifiers and workspace command help overlay (?).
  • Documentation

    • Added page-task reconciliation specification and updated implementation checklist.

crs48 and others added 14 commits June 11, 2026 10:31
…nvergence tests

- docs/specs/PAGE_TASK_RECONCILIATION.md: field authority, claim/archive
  algorithm, cross-page move orderings, deletion semantics, invariants
- usePageTaskSync: claim-or-create (restore + update) for task ids unknown
  to the page, so cut/paste across pages moves the node instead of
  duplicating or losing it
- tests: restore-on-re-add, cross-page move with two mounted syncs,
  seeded randomized reconciliation convergence

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…derer

Adds 'task' to the canvas object kind unions (canvas-core + canvas),
schema->kind ingestion mapping (drag a Task node onto the canvas), LOD/
minimap/vector-tile colors, default card size, and TaskNodeComponent: a
source-backed renderer that binds the canonical Task node via useNode and
renders the shared TaskCard (card/mini modes, tombstone + restore for
archived tasks). Canvas nodes store only sourceNodeId + layout - task
state is never duplicated into canvas properties.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- TaskSchema: add 'canvas' host relation (canvas-sourced tasks anchor to
  their canvas + checklist object id via anchorBlockId)
- extract useTaskProjectionSync: shared reconciliation core (claim-or-
  create, archive on removal) parameterized by host surface; page sync is
  now a thin wrapper with an unchanged API
- add useCanvasTaskSync (host: 'canvas', source: 'canvas') with tests
  covering canvas-hosted creation and page->canvas claims
- checklist node: items carry taskId; ensureChecklistTaskIds migrates
  legacy item data on first render; new items mint task ids

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…list cell

New database column type 'tasks' (cell value: Task node ids). Cells show
live n/m progress + TaskChips (tombstones for archived tasks); the editor
is an inline checklist: Enter creates a Task node (source 'database'),
checkboxes write through to the canonical node, x unlinks without
touching the node. Registered in the property handler registry, the
add-column modal, ColumnType, and filter operators.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tegories

- TaskViewSchema: saved views over Task nodes (list/board/triage/
  calendar/timeline, LWW filters/sorts/groupBy, optional project scope)
- ProjectSchema: thin Linear-style project (name/icon/status/lead/
  targetDate + Y.Doc brief); Task gains a 'project' relation
- Task status upgraded additively with triage/backlog/in-review;
  TASK_STATUS_CATEGORIES maps statuses to categories and
  isCompletedTaskStatus derives the checkbox
- projection sync un-completes via category, tests for derivation

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- packages/views/tasks: TaskListGrouped (status groups, collapsible,
  focused-row contract) and TaskBoard (@dnd-kit columns; dropping a card
  writes status + derived completed + end-of-column fractional sortKey to
  the canonical Task node)
- apps/web /tasks route + TasksView: All/My Tasks/Triage tabs, list and
  board modes, Enter-to-create quick capture, open-task navigates to the
  hosting page or canvas; sidebar entry added
- component tests for grouping, collapse, intents, and board columns

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ngle-key task verbs

- packages/plugins commands.ts: CommandRegistry with scopes (global /
  surface / task-focused, most-recent-wins conflicts), Linear-style
  single-key verbs suppressed in inputs/editors (allowInInput opt-in for
  modifier combos), and 'g t'-style chords with a pending-step timeout;
  10 jsdom tests
- WorkspaceCommands (mounted in root): installs the handler, g-chord
  navigation (g h/t/d/s), '?' shortcut-help overlay
- GlobalSearch unified: Cmd+K is a registry command; palette now shows
  matching workspace commands with key hints, page results, and a
  quick create-task action
- TasksView keyboard layer: j/k/arrows move row focus, x toggles, s/p
  open filterable status/priority mini-palettes, Enter opens, c focuses
  quick capture - all registered through the registry scopes

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- TaskSchema gains shortId (XN-142); task-identifiers.ts has parse/
  format helpers, branch-name slugs, and per-device allocation blocks
- hub TaskIdentifierService + POST /tasks/short-ids/allocate hands out
  monotonic non-overlapping number blocks per workspace prefix, so ids
  minted offline never collide
- hub github-integration service: magic-word parsing, branch-name
  extraction, HMAC webhook signature verification, and pure
  event->action mapping (PR opened -> in-review, merged closes -> done,
  closed unmerged -> revert, drafts inert) behind
  POST /tasks/github/webhook with an applyAutomationActions seam
- tasks surface: shortId rendered on rows/cards, Mod-Shift-. copies the
  task's git branch name
- 18 new tests across data and hub

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ce test

- extract pure groupTasksByStatus/sortTasksBySortKey shared by board and
  list; perf budgets in CI: group-by 0.8ms, palette filter 0.7ms, full
  10k useTasks load through the bridge 16ms (bulk deterministic seed)
- TaskGithubBadges on TaskRow/TaskCard: PR open/draft/merged/closed,
  review approved/changes-requested, CI passing/failing/pending;
  githubStateFromReferences derives state from reference metadata
- hub: pull_request_review and check_suite events emit
  set-reference-state actions (PR lifecycle state mirrored on link)
- validation: concurrent editor-title + board-status convergence test

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…urface primitive

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Adds task schemas, task views, shared task UI, task projection sync, canvas task support, web task routing/commands, and hub-side identifier/webhook handling.

Changes

Task surfaces and sync

Layer / File(s) Summary
Task data and shared views
packages/data/src/..., packages/ui/src/composed/tasks/..., packages/views/src/...
Task schemas, short-id utilities, shared task rendering types, task UI components, grouping helpers, task views, and related tests are added or expanded.
Task projection sync and canvas nodes
packages/react/src/hooks/..., packages/canvas/src/..., packages/canvas-core/src/...
The task projection sync hooks, page/canvas wrappers, canvas checklist migration, task canvas node, canvas kind/type updates, and canvas rendering/storage adjustments are added or updated.
Web tasks surface and command palette
apps/web/src/..., packages/plugins/src/..., docs/explorations/...
The web root installs workspace commands, the global search palette adds command and task creation entries, and the tasks page, sidebar link, and route tree register the new tasks surface.
Hub routes and GitHub automation
packages/hub/src/..., packages/hub/test/...
The hub adds task identifier allocation, GitHub webhook processing, HTTP routes, server wiring, and tests for task automation and identifier allocation.

Sequence Diagram(s)

sequenceDiagram
  participant GlobalSearch
  participant CommandRegistry
  participant TasksView
  participant TaskProjectionSync
  participant TaskSchema
  GlobalSearch->>CommandRegistry: register search.open and run commands
  GlobalSearch->>TaskSchema: create task from query
  TasksView->>TaskProjectionSync: update task projections
  TaskProjectionSync->>TaskSchema: create, restore, update, or remove tasks
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~90+ minutes

Suggested labels

enhancement

Poem

🐰 I hopped through tasks both new and bright,
with shortcuts, boards, and palettes in sight.
A carrot click, a command so neat,
and tasky rows keep the rhythm sweet.
Hooray for syncs and rabbit speed!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/linear-tasks-0161

@github-actions

Copy link
Copy Markdown
Contributor

Preview: https://xnet.fyi/pr/32/app/

github-actions Bot added a commit that referenced this pull request Jun 11, 2026

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@crs48
crs48 merged commit 098099a into main Jun 11, 2026
7 of 9 checks passed
@crs48
crs48 deleted the feat/linear-tasks-0161 branch June 11, 2026 19:33
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.

1 participant