Skip to content

fix(ui): scroll tree selector viewport instead of dumping every row - #34

Merged
ohing504 merged 2 commits into
mainfrom
fix/tree-selector-viewport-scroll
Aug 20, 2026
Merged

fix(ui): scroll tree selector viewport instead of dumping every row#34
ohing504 merged 2 commits into
mainfrom
fix/tree-selector-viewport-scroll

Conversation

@ohing504

Copy link
Copy Markdown
Owner

무엇이 바뀌나

tree selector가 전체 항목을 뷰포트 없이 그대로 출력하던 것을, bubbles/viewport
커서 행을 항상 화면 안에 유지하도록 스크롤 렌더링으로 교체. alt screen 모드로 실행.

스캔 결과가 터미널 높이를 넘으면 커서 위치와 체크박스 표시가 화면과 어긋나는 버그 보고.

검증

$ go build ./... && go test ./...
ok github.com/ohing504/devclean/internal/ui 3.455s
(전체 패키지 통과)

$ golangci-lint run ./internal/ui/...
0 issues.

🤖 Generated with Claude Code

https://claude.ai/code/session_012jb9mxkG51dbLmRxPsYfLJ

ohing504 and others added 2 commits August 20, 2026 23:25
The tree selector rendered every scan result unconditionally, so a scan
with more rows than fit the terminal height broke bubbletea's redraw math
- cursor position and checkbox state visually desynced once the terminal
started scrolling on its own.

Render rows through a bubbles/viewport that scrolls to keep the cursor
row visible, and run the selector in the alt screen so bubbletea owns
the full frame.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012jb9mxkG51dbLmRxPsYfLJ
The blank line between the viewport and the footer used two newlines,
one line more than chromeLines(7) accounts for, so the frame overflowed
the terminal height by one row on every render.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012jb9mxkG51dbLmRxPsYfLJ
@ohing504
ohing504 merged commit e93aa1d into main Aug 20, 2026
3 checks passed
@ohing504
ohing504 deleted the fix/tree-selector-viewport-scroll branch August 20, 2026 14:36
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