feat(task): add task type (task/bug) badge
OpenTasks & subtasksPhS-Orivado ·
What changed?
I want to tell bugs apart from regular work directly on the board, without opening every card or managing workspace-wide tags just for this. This pull request adds a task/bug classification to Kaneo:
- API:
typeis a real column ontasknow (defaulttask, drizzle migration0074_task_type), validated againstTASK_TYPES, returned by the task and board schemas, and preserved when a task is duplicated. The create route accepts an optionaltypeand defaults it totask. - Web: the create-task modal has a small task-or-bug toggle. It defaults to task, resets together with the "create more" flow, and its value flows through
useCreateTaskand the fetcher into the POST body. Task cards show a read-onlyTaskTypeBadgenext to the recurrence badge. - i18n:
tasks.type.{label,bug,task}added to en-US and translated across the other twenty locales.i18n/schema.jsonmatches upstream again: the earlier version had droppedtasks.timeTrackingand required threetasks.boardkeys that do not exist, which broke locale validation. Both are fixed now. - Docs: the committed OpenAPI reference and the plan-and-execute-tasks guide describe the new field.
Known limits: the classification is metadata only. It does not affect placement, routing, or filters; the task still goes into whatever column the user picks.
Related issue
There is no open issue for this yet. The closest one is #1723, which is closed and about broader per-project categories. I will open a feature request for this specific scope and link it here with Fixes #... once it is approved and labeled ready-for-contribution, so the eligibility check can pass.
How did you check it?
- The i18n check script reports every locale in sync with en-US, including the restored
tasks.timeTrackingkeys and the newtasks.typenode. - The OpenAPI additions use the same description strings as the zod
.openapi()metadata, sopnpm openapi:checkstays satisfied. - The picker-closing modal test that an earlier iteration had removed is back, plus new coverage: the modal sends
type: "bug"when the bug option is selected, and the badge falls back to task when a legacy task has no type. - CI still needs to confirm lint, typecheck and the test suites; I could not run those locally.
Review feedback addressed:
typeis now persisted end to end instead of being accepted and discarded.- The locale schema no longer requires phantom
tasks.boardkeys, and time tracking translations are intact. - The badge is actually mounted on the task card instead of being dead code.
- The API descriptions no longer claim sprint or backlog routing that does not exist.
- The type selector keeps the controlled picker-close behavior, and the deleted modal test is restored.