Skip to content

Add label field to tasks#7

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/add-label-feature
Draft

Add label field to tasks#7
Copilot wants to merge 3 commits intomasterfrom
copilot/add-label-feature

Conversation

Copy link

Copilot AI commented Mar 17, 2026

Tasks lacked any tagging/categorization mechanism. This adds an optional free-text label field (e.g. "Work", "Personal") to tasks.

Data layer

  • tasks table: new label TEXT DEFAULT '' column in schema; ALTER TABLE migration for existing DBs (only logs non-duplicate errors)
  • createTask and updateTask signatures extended with label parameter

API

  • POST /api/tasks and PUT /api/tasks/:id accept and validate label (optional string, max 50 chars)
  • label included in POST response body

UI

  • Label input added to the Add Task form
  • Label rendered as a styled badge on each task card (hidden when empty)
// Create a task with a label
POST /api/tasks
{ "title": "Fix bug", "priority": "high", "label": "Work" }
// → { "id": 1, ..., "label": "Work" }

Tests

  • Updated all mock signatures for createTask/updateTask
  • 4 new label-specific test cases added

Label feature UI

Original prompt

create a label feature

Created from VS Code.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 2 commits March 17, 2026 07:39
Co-authored-by: kavyashri-as <213833080+kavyashri-as@users.noreply.github.com>
Co-authored-by: kavyashri-as <213833080+kavyashri-as@users.noreply.github.com>
Copilot AI changed the title [WIP] Add label feature Add label field to tasks Mar 17, 2026
Copilot AI requested a review from kavyashri-as March 17, 2026 07:43
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.

2 participants