You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Priority sorting is lexicographic — no rank ordering exists for the 5-level scale #2692
Sorting by task.priority is user-reachable (OrderBy/SortConfig, over json_extract(properties,'$.task.priority')) but is plain lexicographic on the stored string. No rank map exists anywhere in the codebase.
With the old 3-level scale this already produced a wrong order (high, low, medium ascending). Since #2651 widened the field to 5 levels, ascending order is now:
high, highest, low, lowest, medium
This is arguably worse than before — not because it degraded, but because it is plausible enough to look intentional at a glance, where high, low, medium reads as obviously broken.
Proposed Solution
Introduce an explicit rank for the core priority scale (highest=0 … lowest=4) and sort on that rather than the raw string. Open questions the implementation needs to settle:
Where the rank lives — a Rust-side map, a generated SQL CASE expression in the order-by clause, or a stored numeric companion column.
How user-defined priority values (TaskPriority::User(_), permitted by schema extensibility) rank relative to core ones. Sorting them last, preserving lexicographic order among themselves, is the obvious default.
Whether project.priority (still 3-level, see the companion issue) shares the mechanism.
Acceptance Criteria
Ascending sort on task.priority returns highest, high, medium, low, lowest
User-defined priority values have a defined, documented position in the ordering
Tests cover ordering across the full 5-level scale plus at least one user-defined value
Baseline (fresh worktree): Frontend 5152-5153 passed / 5154. The only failures are in src/tests/performance/architecture-benchmarks.test.ts and are flaky timing thresholds — two consecutive runs failed different benchmarks (combineNodes <40ms, then render-scales-linearly), so they are machine-speed sensitive, not regressions. No priority/query-service tests fail at baseline.
Activity
Address review: guard the wire-type priority copy against drift
Expand core task.priority to a 5-level scale (closes #2651) (#2687)
malibio commentedon Sep 17, 2026
Baseline (fresh worktree): Frontend 5152-5153 passed / 5154. The only failures are in src/tests/performance/architecture-benchmarks.test.ts and are flaky timing thresholds — two consecutive runs failed different benchmarks (combineNodes <40ms, then render-scales-linearly), so they are machine-speed sensitive, not regressions. No priority/query-service tests fail at baseline.