Skip to content

Add task priority enum and rename priority to rank#959

Open
SachaProbo wants to merge 1 commit intomainfrom
SachaProbo/task-priority-enum
Open

Add task priority enum and rename priority to rank#959
SachaProbo wants to merge 1 commit intomainfrom
SachaProbo/task-priority-enum

Conversation

@SachaProbo
Copy link
Copy Markdown
Contributor

@SachaProbo SachaProbo commented Mar 30, 2026

Rename the existing integer priority field to rank across the entire stack (DB, Go, GraphQL, MCP, frontend) since it represents positional ordering within a state, not semantic importance.

Add a new priority field with enum values URGENT, HIGH, MEDIUM, LOW exposed through all three API surfaces (GraphQL, MCP, CLI) with validation, create/update support, and a migration that defaults existing rows to MEDIUM.

Update PriorityLevel component to accept the priority enum directly: LOW/MEDIUM/HIGH show 1/2/3 bars, URGENT shows a bang (!) icon. Add priority selector with icons to the task create/edit form dialog.


Summary by cubic

Renamed the integer task priority to rank (positional order) and introduced a new priority enum (URGENT/HIGH/MEDIUM/LOW) across DB, services, and APIs. Updated the console with a priority selector and icons; migration defaults existing tasks to MEDIUM.

  • New Features

    • Added TaskPriority enum to GraphQL/MCP/CLI with validation and create/update support.
    • Updated @probo/ui PriorityLevel to accept the enum; LOW/MEDIUM/HIGH render 1/2/3 bars and URGENT shows a bang; added a priority selector to the task form.
  • Migration

    • Run the SQL migration to rename column priority→rank and add the task_priority enum.
    • Breaking changes: Task.priority is now an enum; new Task.rank (Int) holds position; TaskOrderField.RANK replaces PRIORITY.
    • Update clients to send priority on create, use rank to reorder, and order queries by RANK.

Written for commit 52a46c5. Summary will update on new commits.

Rename the existing integer `priority` field to `rank` across the
entire stack (DB, Go, GraphQL, MCP, frontend) since it represents
positional ordering within a state, not semantic importance.

Add a new `priority` field with enum values URGENT, HIGH, MEDIUM, LOW
exposed through all three API surfaces (GraphQL, MCP, CLI) with
validation, create/update support, and a migration that defaults
existing rows to MEDIUM.

Update PriorityLevel component to accept the priority enum directly:
LOW/MEDIUM/HIGH show 1/2/3 bars, URGENT shows a bang (!) icon. Add
priority selector with icons to the task create/edit form dialog.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 20 files

@SachaProbo SachaProbo requested a review from a team March 30, 2026 15:32
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