Skip to content

feat: 2×2 Prioritization Matrix#865

Open
dansj1 wants to merge 1 commit intochrisvel:mainfrom
dansj1:feat/prioritization-matrix
Open

feat: 2×2 Prioritization Matrix#865
dansj1 wants to merge 1 commit intochrisvel:mainfrom
dansj1:feat/prioritization-matrix

Conversation

@dansj1
Copy link
Copy Markdown

@dansj1 dansj1 commented Feb 26, 2026

2×2 Prioritization Matrix

Closes #863

What

Adds a fully interactive 2×2 prioritization matrix (Eisenhower-style) that lets users visually organize tasks across four customizable quadrants using drag-and-drop.

Screenshots

Matrix Board — Eisenhower view with drag-and-drop quadrants:
Screenshot 2026-02-26 002933

Task Detail —
Quick-add to matrix (2-step: pick matrix → pick quadrant):

Screenshot 2026-02-26 010045

Matrix List — Overview of all matrices with task counts:
Screenshot 2026-02-26 010121

Changes

Backend (6 new files + 2 migrations):

  • backend/models/matrix.js / task_matrix.js — Sequelize models with validation
  • backend/modules/matrices/ — controller, service, repository, routes, validation
  • Endpoints: GET/POST /matrices, GET/PUT/DELETE /matrices/:id, PUT/DELETE /matrices/:id/tasks/:taskId, GET /matrices/placements, GET /matrices/:id/browse, GET /tasks/:taskId/matrices

Frontend (16 new files):

  • frontend/entities/Matrix.ts — TypeScript interfaces
  • frontend/utils/matrixService.ts — API client with full endpoint coverage
  • frontend/hooks/useMatrix.ts — React hooks with optimistic drag-and-drop updates
  • frontend/store/useMatrixStore.ts — Zustand UI state (sidebar, selected task)
  • frontend/contexts/MatrixPlacementsContext.tsx — bulk placement cache for dot indicators
  • frontend/constants/matrixColors.ts — shared quadrant color definitions (single source of truth)
  • frontend/components/Matrix/ — MatrixListPage, MatrixDetailPage, MatrixBoard, MatrixModal, Quadrant, DraggableTask, UnassignedSidebar
  • frontend/components/Shared/QuadrantDot.tsx — colored dot indicators on task cards
  • frontend/components/Task/TaskDetails/TaskMatrixCard.tsx — 2-step quick-add from task detail (pick matrix → pick quadrant), with navigation to matrix pages
  • frontend/components/Sidebar/SidebarMatrices.tsx — sidebar navigation entry

Tests (128 total, all passing):

  • Backend validation unit tests (33)
  • Backend model unit tests (13)
  • Backend integration tests (45)
  • Frontend constants tests (9)
  • Frontend hook helper tests (9)
  • Frontend API service tests (19)

i18n: en, es, fr, de, it, pt, ja, ko, zh, el

Technical Highlights

  • Drag-and-drop: @dnd-kit/core with PointerSensor + TouchSensor and DragOverlay for smooth cross-quadrant moves
  • Optimistic updates: Immediate UI feedback on task moves, reverts on failure
  • Color system: Shared QUADRANT_STYLES constant ensures consistent rose/amber/sky/emerald quadrant colors across all components
  • Task detail integration: 2-step quick-assign (pick matrix → click quadrant) matching the app's existing tag/project card UX patterns
  • No breaking changes: New tables only, no schema changes to existing tables

Notes

This PR was developed with AI assistance (GitHub Copilot powered by Claude). All code has been reviewed, tested, and refined through multiple iterations.

47 files changed, ~5,600 lines added.

Add a fully interactive 2×2 prioritization matrix (Eisenhower-style)
that lets users visually organize tasks across four quadrants.

Backend:
- Database migrations for matrices and task_matrices tables
- Sequelize models with validation and associations
- Full REST API module (controller, service, repository, routes, validation)
- Endpoints: CRUD matrices, assign/remove tasks, browse available tasks,
  bulk placements for dot indicators
- Swagger documentation

Frontend:
- TypeScript entities, API service, and Zustand-powered hooks
- MatrixBoard with @dnd-kit drag-and-drop (PointerSensor + TouchSensor)
- DragOverlay for smooth cross-quadrant moves with optimistic updates
- MatrixModal with Eisenhower preset and cross-layout axis inputs
- Universal task browser (by project, area, or tag) as a sidebar drawer
- QuadrantDot indicators on task cards across the app
- Shared quadrant color constants (rose/amber/sky/emerald)
- Full i18n support (en, es, fr, de, it, pt, ja, ko, zh, el)
- React Router integration with sidebar navigation

Tests (128 total):
- Backend validation unit tests (33)
- Backend model unit tests (13)
- Backend integration tests (45)
- Frontend constants tests (9)
- Frontend hook helper tests (9)
- Frontend API service tests (19)

Co-authored-by: GitHub Copilot (Claude) <noreply@github.com>
@chrisvel
Copy link
Copy Markdown
Owner

As I mentioned in another PR, we are on a feature freeze at the moment. Only bug fixes accepted, in order to release v1.0! Cheers!

@woytekbode
Copy link
Copy Markdown
Contributor

I like this @dansj1

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.

Feature: 2×2 Prioritization Matrix

3 participants