Skip to content

Priority primitive: important/urgent fields + /state endpoint (#161)#164

Open
meninoebom wants to merge 2 commits into
mainfrom
feature/priority-backend
Open

Priority primitive: important/urgent fields + /state endpoint (#161)#164
meninoebom wants to merge 2 commits into
mainfrom
feature/priority-backend

Conversation

@meninoebom
Copy link
Copy Markdown
Owner

Summary

  • Adds important and urgent bool columns to Task (NOT NULL, default false) with Alembic migration and composite priority-lookup index
  • Extends all task schemas to carry both fields; POST /tasks/{id}/priority convenience endpoint for toggle UX
  • New GET /state endpoint returns {q1_count, q2_count, q3_count, q4_count} for pending top-level tasks

Test plan

  • 19 new tests covering create with priority, PATCH, /priority idempotency, partial updates, /state counts, /state excludes completed
  • Full suite 164/164 green
  • Run migration on dev DB and verify columns exist with correct defaults

Closes #161

🤖 Generated with Claude Code

- important + urgent bool columns on Task (NOT NULL, server_default false)
- Alembic migration with composite priority-lookup index
- Schemas: TaskCreate, TaskUpdate, TaskResponse all carry both fields
- POST /tasks/{id}/priority convenience endpoint for toggles
- GET /state returns q1/q2/q3/q4 pending task counts
- 19 new tests; full suite 164/164 green

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@railway-app
Copy link
Copy Markdown

railway-app Bot commented Apr 24, 2026

🚅 Deployed to the tend-pr-164 environment in Tend

Service Status Web Updated (UTC)
Tend Frontend ✅ Success (View Logs) Web Apr 24, 2026 at 9:46 am
Tend Backend ✅ Success (View Logs) Apr 24, 2026 at 9:46 am

@railway-app railway-app Bot temporarily deployed to Tend / tend-pr-164 April 24, 2026 09:29 Destroyed
- /state now uses SQL GROUP BY instead of pulling all rows into Python
- Migration drops server_default after backfill to prevent autogenerate drift
- Tests: sub-task exclusion from quadrant counts, cross-user isolation

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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.

Priority primitive: data model + API

1 participant