Commit graph

7 commits

Author SHA1 Message Date
2a75c7060e Backend: project membership, per-project status pipelines, pin-to-today
- project_members (viewer/editor) makes a project + everything in it visible
  to someone before they own anything there; editors can edit any task's
  content/status in the project (not its list/project/assignment, which stay
  owner/cap-gated) via a new loadEditable() alongside the existing
  loadOwned/loadVisible.
- project_statuses lets a project define its own status pipeline instead of
  the shared global one. Dropped the FK tasks.status had to the global
  statuses table (a project-only value would violate it) and added a
  task_statuses view that resolves each task's status against its project's
  pipeline if it has one, else the global one -- this is also why new tasks
  in a custom-pipeline project now default to that project's own first
  non-done status instead of the hardcoded 'todo'.
- pinned_today column + GET /api/tasks?view=today no longer requires a due
  date, so the frontend can show pinned/undated tasks there too.

Verified against a throwaway Postgres: 20 assertions covering nullable
list_id, pin, broadened today view, custom status default/resolution/
cross-project leakage, and the full viewer/editor/owner/stranger permission
matrix on a shared project.
2026-10-12 14:47:36 +00:00
4d19b37b8a Collapse Sharing by default; allow creating tasks directly in a project
Sharing (tag/assign/reallocate) is now a collapsed-by-default section in
the task drawer with a one-line summary, since it's a lesser-used function
that was eating space on every task.

list_id is now optional on task creation -- the task lands unfiled (same
state assign/reallocate already use), scoped only by project_id. Projects
are a cross-cutting grouping, not a list replacement, and the only way to
add a task to a project was previously to create it elsewhere and set the
Project field from the drawer. Added a "+ New task" input directly on
ProjectDetailView. Verified against a throwaway Postgres: unfiled creation,
distinct sort_order per unfiled task, project detail lists them, and
existing validation (bad list_id, missing title) still rejects.
2026-10-12 14:10:24 +00:00
6172617df3 Replace freetext email inputs with a user lookup for tag/assign/reallocate
Typo'd addresses in the old <input type="email"> fields silently matched
nobody (assigned_to/task_tags.user_email have no FK), so a task could vanish
into an unreachable owner with no error. New UsersContext + UserPicker pull
the real user list from central auth (/api/auth/users?app=tasks), same
pattern maintenance already uses for its assignee dropdown.
2026-10-12 13:59:54 +00:00
3145c1fc07 Consolidate category/project filters into a shared TaskFiltersContext + add List filter
Was duplicating categoryFilter/projectFilter useState + filter logic in every
view (Board/List/Today/Shared/Assigned/Dispatch). Moved to one global context
(same pattern as SearchContext) with a single <TaskFilterBar/> drop-in, and
added the missing List filter dimension on top.

List filter is deliberately omitted (showList=false) on ListView, Shared,
Assigned, and Dispatch -- ListView is already scoped to one list by its
route, and the other three show tasks whose list_id doesn't belong to the
viewer's own lists (shared tasks live in their owner's lists; assigned tasks
are always unfiled after transfer; dispatch is cross-user) -- filtering any
of them by "my lists" could only ever return zero results.
2026-09-17 18:39:26 +00:00
4eab3c29ed Add project filter, Shared/Assigned views, and task search
- Backend: GET /api/tasks accepts ?search=, ILIKE on title/notes
- Generalized CategoryFilter into a reusable FilterChips component,
  added ProjectFilter alongside it (both now on Board/List/Today)
- New Shared-with-me / Assigned-to-me nav views (FilteredListView),
  surfacing the view=shared/view=assigned params that already existed
  backend-side but had no UI
- Global debounced (300ms) search bar in the layout header, wired into
  Board/List/Today/Dispatch's task fetches via SearchContext
2026-09-17 09:25:12 +00:00
017f6dfdc1 Frontend: dynamic status pipeline, categories/projects, tag+assign+reallocate UI
- Board/List/Today views now render the admin-editable status pipeline
  instead of a hardcoded todo/doing/done enum (StatusesContext)
- Category filter chip-bar on Board and List views (ported the idea from
  reviewing the FD's own build, simplified to match our flat single-category
  model rather than his tree)
- New Projects list + detail views, project create/edit modal
- New Dispatch view for the 'reallocate' cap -- flat cross-user task list
  with an inline move action (deliberately not routed through the shared
  task drawer, since GET /api/tasks/:id only grants visibility to
  owner/assignee/tagged users, not dispatchers)
- Task drawer: dynamic status pills, category/project selects, tag
  picker (share/watch, no cap needed), assign field (owner + assign cap),
  reallocate field (reallocate cap) -- all fields disabled for non-owners
  since the backend's single PATCH endpoint is owner-gated
- Settings page: status pipeline + category management (settings cap)
- Fixed missing input[type="datetime-local"]/[type="time"] styling -- the
  Due/Remind fields were rendering with unstyled browser defaults
2026-09-17 08:52:08 +00:00
d8dc4e2b81 Initial commit: personal task planner with categories, projects, and tiered assignment
Personal-first lists/tasks/reminders/recurrence, plus an admin-editable status
pipeline, shared categories, project containers, and a three-tier permission
model for cross-user work: assign (hand off your own tasks), reallocate
(dispatcher — move anyone's tasks), admin (reserved, full manage-all).
2026-09-17 08:07:00 +00:00