Skip to content

Fix kanban column height calculation for quickview#477

Merged
bborn merged 1 commit intomainfrom
task/1903-fix-kanban-column-height-calculation-for
Feb 26, 2026
Merged

Fix kanban column height calculation for quickview#477
bborn merged 1 commit intomainfrom
task/1903-fix-kanban-column-height-calculation-for

Conversation

@bborn
Copy link
Owner

@bborn bborn commented Feb 26, 2026

Summary

  • Fix header height measurement to use actual rendered height (lipgloss.Height()) instead of counting header parts (len(headerParts)), which undercounts when banner text wraps
  • Add ensureSelectedVisible() call to SetSize() so scroll offsets adjust when the executor prompt preview appears/disappears, keeping bottom-of-column tasks visible
  • Fix handleClickDesktop() to subtract border height from colHeight, matching the calculation used in all other column height calculations

Test plan

  • All existing UI tests pass (go test ./internal/ui/)
  • All internal tests pass (go test ./internal/...)
  • Manual: Open kanban with tasks needing input, verify columns resize correctly when quickview appears
  • Manual: Navigate to bottom tasks in a column while quickview is showing, verify they're visible
  • Manual: Click tasks in columns with quickview open, verify correct task is selected

🤖 Generated with Claude Code

Three fixes to the kanban height calculation:

1. Use lipgloss.Height() to measure actual rendered header height instead
   of len(headerParts) which only counts parts (not lines). If any banner
   text wraps due to terminal width, this caused the kanban to render too
   tall, clipping the bottom content behind the quickview.

2. Call ensureSelectedVisible() in SetSize() when height changes so scroll
   offsets adjust when the executor prompt preview appears/disappears.
   Previously, scroll offsets were only recalculated on navigation, so
   tasks at the bottom of columns could be pushed outside the visible
   area when the quickview reduced available height.

3. Fix handleClickDesktop() to subtract border height (-2) from colHeight,
   matching the calculation used everywhere else. This ensures click
   coordinate mapping is consistent with the rendered layout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bborn bborn merged commit 20e0976 into main Feb 26, 2026
3 checks passed
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