Skip to content

Feat/categories 3#90

Open
nrimzan wants to merge 30 commits into
docker:mainfrom
azaidrahman:feat/categories-3
Open

Feat/categories 3#90
nrimzan wants to merge 30 commits into
docker:mainfrom
azaidrahman:feat/categories-3

Conversation

@nrimzan
Copy link
Copy Markdown

@nrimzan nrimzan commented May 11, 2026

What changed: add categories for to-do items.
Added categories.js to both backend and client, centralising the list
(work, personal, shopping), DEFAULT_CATEGORY, and a normalizeCategory
function called on every read and write in both persistence layers
Both MySQL and SQLite schemas now include category and priority columns;
startup migrations run on init so existing databases get the columns
automatically without data loss
normalizeCategory is applied to category on every write
AddNewItemForm now includes a category dropdown submitted with every new
item
full item is spread into the PUT body
on toggle so category is preserved when completion is toggled
TodoListCard adds a filter dropdown that narrows the visible list by
category client-side, with a distinct "No items match this category" empty
state
Fixed ReferenceError in updateItem route caused by an undefined variable
Fixed null guard in TodoListCard moved before the .filter() call it was
meant to protect
Fixed SQLite updateItem parameter order that was silently swapping
category and completed values
Removed duplicate raw checkbox icon in ItemDisplay
Consolidated duplicate imports in AddNewItemForm
Added most of .catch() handlers to add-item, toggle-completion, and delete-item
fetches so the UI does not get stuck on network failure
How to test:
Run docker compose up (or docker compose up --build on first run) and open the app
Add a new item — the form should show a category dropdown; select a category and submit
Verify the item appears with a coloured priority badge and a category label
Add items across all three categories, then use the filter dropdown to confirm only matching items are shown; switching to an empty category should show "No items match this category"
Toggle completion on an item and reload — the category must still be the one originally set, not corrupted or reset
Delete an item and confirm it does not reappear on reload
To verify migrations: stop the containers, delete only the app container (not the database volume), restart — the app should connect and function without errors on a pre-existing database
Screenshot
Screenshot 2026-05-07 at 3 28 54 PM

azaidrahman and others added 30 commits May 5, 2026 15:01
… (storeItems, updateItems) nothing changed on getItems and removeItems
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.

5 participants