Skip to content

feat: session scrollback with mouse wheel scroll#44

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

feat: session scrollback with mouse wheel scroll#44
robinojw merged 18 commits intomainfrom
feat/tui-canvas-improvements

Conversation

@robinojw
Copy link
Copy Markdown
Owner

Summary

  • Add scroll offset tracking to PTYSession with mutex-protected ScrollUp/ScrollDown/ScrollToBottom methods
  • Implement custom viewport renderer that combines scrollback buffer lines with visible screen lines when scrolled
  • Handle tea.MouseMsg wheel events in Update() to scroll the active PTY session panel
  • Overlay a styled scroll indicator (↓ N lines below) when a session is scrolled up
  • Add "Mouse Wheel" keybinding entry to the help screen
  • Fix pre-existing data race in TestPTYSessionStartAndRender (snapshot messages under lock)

Test plan

  • golangci-lint run — 0 issues
  • go test ./... -v -race — 112 tests pass, 0 race conditions
  • go build -o dj ./cmd/dj — exit 0

robinojw added 18 commits March 18, 2026 12:36
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
…vements

# Conflicts:
#	internal/tui/app_view.go
@robinojw robinojw merged commit 9cb7fba 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