Skip to content

Fix: Kanban "Hide empty columns" ignored when swimlanes are enabled#2019

Open
scottTomaszewski wants to merge 3 commits into
callumalpass:mainfrom
scottTomaszewski:fix/kanban-hide-empty-columns-swimlanes
Open

Fix: Kanban "Hide empty columns" ignored when swimlanes are enabled#2019
scottTomaszewski wants to merge 3 commits into
callumalpass:mainfrom
scottTomaszewski:fix/kanban-hide-empty-columns-swimlanes

Conversation

@scottTomaszewski

@scottTomaszewski scottTomaszewski commented Jun 9, 2026

Copy link
Copy Markdown

Summary

"Hide empty columns" had no effect in the Kanban view when swimlanes were enabled. Flat (no-swimlane) mode filters each column through shouldRenderKanbanColumn in renderFlat, but the swimlane path (renderWithSwimLanesrenderSwimLaneTable) rendered every column key unconditionally, so emptied columns stayed visible in both the header row and every swimlane row.

  • Add getVisibleKanbanSwimLaneColumnKeys to kanbanGrouping.ts, which uses the existing getKanbanColumnTaskCounts to total each column across all swimlanes and drops columns that are empty (and not pinned) when "Hide empty columns" is on.
  • Wire it into renderWithSwimLanes, passing the filtered column keys to renderSwimLaneTable. Counts are taken from the post-filter swimLanes map so they reflect the active filter; pinned columns are preserved, matching flat-mode behavior.

Test Plan

  • Unit tests for the new helper in tests/unit/bases/kanbanGrouping.test.ts (hides empty columns, keeps empty pinned columns, keeps all columns when the option is off).
  • Regression test tests/unit/issues/issue-kanban-hide-empty-columns-swimlanes.test.ts covering the build-groups → build-swimlanes → filter pipeline.
  • tsc --noEmit passes.
  • Manual: create a Kanban view, enable swimlanes, group columns by one field and swimlanes by another, enable "Hide empty columns", then filter a column to 0 tasks → the column disappears from headers and all swimlane rows while pinned columns remain.

Reproduction

  1. Make a Kanban view.
  2. Enable swimlanes; group columns by another field.
  3. Enable "Hide empty columns".
  4. Apply a filter that empties a column (0 tasks). Before this change the empty column remained; now it is hidden.

Resolves #2018

@scottTomaszewski scottTomaszewski marked this pull request as draft June 9, 2026 20:56
@scottTomaszewski

Copy link
Copy Markdown
Author

Works:

image

@scottTomaszewski scottTomaszewski marked this pull request as ready for review June 9, 2026 21:17
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]: Kanban view - when swimlanes are enabled, "Hide empty columns" doesnt work

1 participant