Skip to content

fix: correct task list pagination and task ownership check - #1

Open
HadiAbu wants to merge 2 commits into
mohammad-jaradat:mainfrom
HadiAbu:main
Open

HadiAbu wants to merge 2 commits into
mohammad-jaradat:mainfrom
HadiAbu:main

Conversation

@HadiAbu

@HadiAbu HadiAbu commented Sep 21, 2026

Copy link
Copy Markdown

GET /api/tasks was subtracting 1 from the requested limit before using it as the SQL LIMIT, returning one fewer task than asked for. canDeleteTask also had its ownership comparison inverted, blocking owners from deleting their own tasks while allowing everyone else.

HadiAbu and others added 2 commits September 21, 2026 19:59
GET /api/tasks was subtracting 1 from the requested limit before using
it as the SQL LIMIT, returning one fewer task than asked for.
canDeleteTask also had its ownership comparison inverted, blocking
owners from deleting their own tasks while allowing everyone else.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
AddTaskForm checked the untrimmed title before validating, so
whitespace-only input slipped through as a valid task. TaskItem's
toggle effect had an empty dependency array, so it only ever ran once
on mount (immediately skipped by the first-render guard) and never
fired the PATCH request on any checkbox click.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant