Skip to content

fix(tui): render thumb-only transcript scrollbar#437

Merged
phantom5099 merged 2 commits into1024XEngineer:mainfrom
creatang:codex/tui-scrollbar-thumb-only
Apr 24, 2026
Merged

fix(tui): render thumb-only transcript scrollbar#437
phantom5099 merged 2 commits into1024XEngineer:mainfrom
creatang:codex/tui-scrollbar-thumb-only

Conversation

@creatang
Copy link
Copy Markdown
Collaborator

No description provided.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

Copy link
Copy Markdown

@fennoai fennoai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

总体变更方向正确,滚动条视觉与非滚动场景处理更清晰。仅发现 1 个需要补强的点:本次新增的 a.transcriptMaxOffset() <= 0 早返回分支缺少直接回归测试。

func (a App) renderTranscriptWithScrollbar(totalWidth int, content string) string {
scrollbarWidth := a.transcriptScrollbarWidth(totalWidth)
if scrollbarWidth <= 0 {
if scrollbarWidth <= 0 || a.transcriptMaxOffset() <= 0 {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renderTranscriptWithScrollbar 新增了 a.transcriptMaxOffset() <= 0 的早返回逻辑,但当前测试主要覆盖了“宽度过窄不渲染滚动条”和“可滚动时渲染 thumb”,没有直接覆盖“宽度充足但内容不可滚动时不渲染滚动条”的新分支。建议补一个回归用例,避免后续改动把这一行为回退。

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@phantom5099 phantom5099 merged commit dc852eb into 1024XEngineer:main Apr 24, 2026
2 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.

2 participants