Skip to content

feat: Canvas UI improvements#43

Merged
robinojw merged 9 commits intomainfrom
feat/tui-canvas-improvements
Mar 18, 2026
Merged

feat: Canvas UI improvements#43
robinojw merged 9 commits intomainfrom
feat/tui-canvas-improvements

Conversation

@robinojw
Copy link
Copy Markdown
Owner

Summary

  • Header bar with keyboard shortcuts — title left-aligned, shortcut hints right-aligned inline at the top of the TUI
  • n key spawns and auto-opens sessions — creates a new thread with incrementing title, pins it, spawns a PTY, and focuses the session pane
  • Full-height layout with centered, scaled cards — cards scale to fill available canvas space (min 20x4, max 50x12), centered both horizontally and vertically via lipgloss.Place
  • Card sizing constraints — max width (50) and max height (12) prevent cards from stretching across the full terminal; 2-character column gaps between cards
  • s key select — toggles session pin/unpin with a checkmark indicator on pinned cards

Test plan

  • All 119 TUI tests pass with -race flag
  • golangci-lint run reports 0 issues
  • go build -o dj ./cmd/dj exits 0
  • Manual test: run ./dj, press n multiple times, verify cards appear centered with gaps
  • Manual test: press s on a card, verify checkmark appears
  • Manual test: resize terminal, verify cards scale and re-center

Header shortcuts bar, n-key session spawning, and full-height
centered card layout.
9 tasks covering header bar, n-key session spawning, and
full-height centered card layout with TDD steps.
Resolves merge conflicts between header bar, n-key session,
and full-height layout branches.
- Add max card height (12) and max card width (50) to prevent
  cards from stretching across the full terminal
- Add 2-character column gaps between cards in the grid
- Add 's' keybinding to toggle session selection (pin/unpin)
- Show checkmark indicator on pinned session cards
- Extract named constants for magic numbers in card rendering
@robinojw robinojw merged commit 42d8bd5 into main Mar 18, 2026
1 check 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