Skip to content

Conversation

@zyrephus
Copy link
Contributor

@zyrephus zyrephus commented Feb 4, 2026

Notion ticket link

Remove Static Data from Task Management

Screenshot 2026-02-03 at 22 39 23 Screenshot 2026-02-03 at 22 39 00

Implementation description

  • Replaced mockTasks with TaskTemplateAPIClient.getAllTaskTemplates() API call
  • Added loading state with centered spinner (31.25rem height)
  • Added error handling with toast notification and dismissible banner
  • Made table rows clickable with hover effects to open TaskDetailsModal
  • Client-side filtering and search now work on fetched data instead of static array

Steps to test

  1. Navigate to /admin/tasks and verify loading spinner appears
  2. Confirm tasks from database render in table (not hardcoded data)
  3. Click any task row and verify modal opens with correct task details
  4. Close modal and verify it dismisses properly
  5. Test category filter and search - both should work on fetched data
  6. Simulate error by going offline in DevTools → verify error toast and banner appear

What should reviewers focus on?

  • Error handling flow (toast + banner + graceful degradation)
  • Modal state management (selectedTaskId and isModalOpen)
  • Loading state UX and centered spinner

Checklist

  • My PR name is descriptive and in imperative tense
  • My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • I have run the appropriate linter(s)
  • I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR

@zyrephus zyrephus requested a review from Akishai18 February 4, 2026 03:43
@zyrephus zyrephus requested a review from he-is-harry February 4, 2026 03:54
Copy link
Contributor

@he-is-harry he-is-harry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for making the changes! Verified that the tasks are loaded from the database, and the filter and search works. Also tested that clicking on a task opens the modal. Error handling also looks good to me!

As a non-blocking comment, I think there might be some linter errors, it might be nice to fix those before we merge. Check out the README to run the linters locally, but the alerts are in the files changed tab as well.

@zyrephus zyrephus added this pull request to the merge queue Feb 7, 2026
Merged via the queue into main with commit 4fe95a5 Feb 7, 2026
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