Skip to content

feat(board): hide empty status columns when configured (BACK-466)#660

Open
napter wants to merge 1 commit into
MrLesk:mainfrom
napter:back-466-hide-empty-columns
Open

feat(board): hide empty status columns when configured (BACK-466)#660
napter wants to merge 1 commit into
MrLesk:mainfrom
napter:back-466-hide-empty-columns

Conversation

@napter

@napter napter commented May 26, 2026

Copy link
Copy Markdown

Summary

Adds hideEmptyColumns to BacklogConfig (default false). When enabled, the kanban board hides status columns whose status currently has no tasks. To preserve drag-and-drop usability, empty columns reappear while a task is being dragged, so they remain valid drop targets — when the drag ends, the empty column hides again.

Why opt-in and default off:

  • Existing users see no change. Their boards continue to render every status column even when empty.
  • Users who hit "wall of empty columns" friction (common when a project uses 5+ statuses and most tasks live in 1–2 of them) can enable it without affecting anyone else.

The mechanism mirrors the existing empty-lane filter in milestone mode (Board.tsx already filters visibleLanes), so it's consistent with how upstream already treats empty groupings.

Where it appears

  • Settings UI: General Settings → "Hide Empty Columns" toggle, right after "Auto Open Browser".
  • CLI:
    • backlog config get hideEmptyColumns
    • backlog config set hideEmptyColumns true|false
    • backlog config list (shows the field with current value)
  • YAML: hide_empty_columns: true in backlog/config.yml.

Implementation notes

  • New optional boolean on BacklogConfig. Mirrored everywhere autoOpenBrowser is touched except the init-wizard plumbing — this is a discover-in-Settings preference, not an init choice. Defaulting to false means a missing field behaves correctly without migration.
  • Board.tsx computes visibleStatuses via useMemo. When hideEmptyColumns is on and no drag is active, it filters statuses to those with at least one task in any visible lane (using the same displayTasksByLane map already used for rendering — no extra traversal). Otherwise it returns statuses unchanged.
  • Drag-aware reveal uses the existing dragSourceStatus state (already wired by TaskColumn's onDragStart / onDragEnd). No new state.
  • Grid template (gridTemplateColumns: repeat(N, ...)) and the flex fallback both use visibleStatuses.length, so layout collapses cleanly when columns are hidden.

Test plan

  • bunx tsc --noEmit — clean
  • bunx biome check <changed files> — clean
  • Full bun test — 1244 pass / 0 fail (2 skipped; interactive PTY tests gated by env var)
  • New test in src/test/config-commands.test.ts: round-trips hideEmptyColumns via config set/get/list subprocess invocations
  • Manual smoke: /api/config PUT round-trips hideEmptyColumns: true and persists to disk

Manual verification I'd suggest before merge:

  • Toggle setting on a board with mixed-statuses tasks, watch empty columns disappear
  • Drag a task — confirm empty columns reappear during drag and hide again on drop
  • Milestone-grouped view: confirm visible-status filter is consistent across lanes

🤖 Generated with Claude Code

Add `hideEmptyColumns` config (default false). When true, the kanban
board hides status columns with no tasks; columns reappear while a task
is being dragged so they remain valid drop targets.

Surfaces in Settings → General. CLI: `backlog config set hideEmptyColumns true`.

Refs BACK-466
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