Skip to content

fix: inference tasks list shows empty despite existing tasks#117

Merged
lai3d merged 1 commit into
mainfrom
fix/inference-tasks-list-empty
Mar 12, 2026
Merged

fix: inference tasks list shows empty despite existing tasks#117
lai3d merged 1 commit into
mainfrom
fix/inference-tasks-list-empty

Conversation

@lai3d

@lai3d lai3d commented Mar 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • API route /api/inference/tasks returned { tasks, total } but the client (InferenceTasksPageClient) expected { items, page, limit, total, status, stats }
  • response.data.items resolved to undefined → fell back to [] → empty list
  • Updated mock task data to match the ApiInferenceTasksList type shape (added taskType, deadline, minerAddress, executionTimeMs; used realistic hex task IDs)
  • Added pagination (page/limit params) and stats aggregation to the response

Test plan

  • Visit /inference/tasks — verify task list renders with mock data
  • Filter by status (Completed, Pending, etc.) — verify filtering works
  • Verify stats cards show correct counts
  • Visit /inference/my-tasks — verify it also renders (same endpoint)
  • npm run build passes

Closes #106

🤖 Generated with Claude Code

API route returned { tasks, total } but client expected
{ items, page, limit, total, status, stats }. Fixed response
to match ApiInferenceTasksList type. Also updated mock task
data to include required fields (taskType, deadline, minerAddress).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lai3d lai3d merged commit 5364759 into main Mar 12, 2026
@lai3d lai3d deleted the fix/inference-tasks-list-empty branch March 12, 2026 09:17
lai3d added a commit that referenced this pull request Mar 12, 2026
API route returned { tasks, total } but client expected
{ items, page, limit, total, status, stats }. Fixed response
to match ApiInferenceTasksList type. Also updated mock task
data to include required fields (taskType, deadline, minerAddress).

Co-authored-by: Larry <larry.l@bidot.sg>
Co-authored-by: Claude Opus 4.6 <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.

Bug: /inference/tasks page shows empty list despite successful completed tasks

1 participant