Feat/categories 3#90
Open
nrimzan wants to merge 30 commits into
Open
Conversation
… (storeItems, updateItems) nothing changed on getItems and removeItems
…r both select and submit
Feat/priority level
…, and UI visualization
Feat/duedate version 2
Feat/search sort
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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