Skip to content

fix(task): Render Kanban board when user has zero tasks - #160

Merged
KiwiGaze merged 1 commit into
stagingfrom
fix/157-kanban-empty-board
Feb 22, 2026
Merged

fix(task): Render Kanban board when user has zero tasks#160
KiwiGaze merged 1 commit into
stagingfrom
fix/157-kanban-empty-board

Conversation

@KiwiGaze

@KiwiGaze KiwiGaze commented Feb 22, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the Kanban board disappearing when a user has zero tasks. The tasks.length === 0 check in task-list.tsx was evaluated before the view === "board" check, so the generic TaskEmptyState card always rendered — even in board view.

The fix reorders the ternary so view === "board" is checked first. KanbanBoard now renders unconditionally in board mode. Each KanbanColumn already handles its own empty state ("No tasks in {name}" + inline add-task control), so the board degrades gracefully with zero tasks.

List view behavior is unchanged — TaskEmptyState / TaskSearchEmptyState still renders when appropriate.

Closes #157

Review / Merge checklist

  • PR title and summary are descriptive
  • Tests included

Summary by CodeRabbit

  • Improvements
    • Optimized task list rendering logic to better handle transitions between board and other viewing modes
    • Enhanced empty state handling to provide more relevant feedback depending on the active view mode
    • Improved overall display consistency when switching between different task visualization modes

@coderabbitai

coderabbitai Bot commented Feb 22, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉


Walkthrough

Refactored the task list rendering logic in TaskList to prioritize board view. The conditional now checks the view mode first, rendering KanbanBoard unconditionally when view === "board", while reserving empty-state components for non-board views. This ensures the Kanban board displays with its group columns even when no tasks exist.

Changes

Cohort / File(s) Summary
Board View Rendering Logic
apps/web/app/(protected)/task/components/task-list.tsx
Restructured conditional to branch on view mode first. Board view now renders KanbanBoard regardless of task count; empty states display only for list and search views. Resolves issue where Kanban board disappeared with zero tasks.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 6 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(task): Render Kanban board when user has zero tasks' directly summarizes the main change—reordering conditionals to show the board view even with zero tasks instead of a generic empty state.
Linked Issues check ✅ Passed The pull request fulfills all coding objectives from issue #157: reordering the conditional to check view mode before task count, rendering KanbanBoard unconditionally in board mode, and preserving list view empty-state behavior.
Out of Scope Changes check ✅ Passed All changes in task-list.tsx are directly scoped to fixing the conditional rendering order to address the Kanban board visibility issue; no unrelated alterations detected.
Peer Dependency Consistency ✅ Passed This PR only modifies task-list.tsx component file and does not change any package.json files in packages/* directory.
Api Contract Layer Conventions ✅ Passed PR modifies only a React component file (task-list.tsx), not API route handlers or API contract layer code.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/157-kanban-empty-board

Comment @coderabbitai help to get the list of available commands and usage tips.

@KiwiGaze
KiwiGaze merged commit 0aea9aa into staging Feb 22, 2026
5 checks passed
@KiwiGaze
KiwiGaze deleted the fix/157-kanban-empty-board branch February 22, 2026 14:39
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