Skip to content

fix:调整启动页布局,增加最小窗口尺寸限制,优化快捷操作菜单对齐方式,提升用户体验。#441

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

fix:调整启动页布局,增加最小窗口尺寸限制,优化快捷操作菜单对齐方式,提升用户体验。#441
phantom5099 merged 4 commits into1024XEngineer:mainfrom
creatang:codex/tui-scrollbar-thumb-only

Conversation

@creatang
Copy link
Copy Markdown
Collaborator

No description provided.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 24, 2026

@creatang is attempting to deploy a commit to the pionxe's projects Team on Vercel.

A member of the Team first needs to authorize it.

@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.

完成四轮审查后,保留了 2 个值得修复的问题(已去重)。

Comment thread internal/tui/core/app/view.go Outdated
Comment on lines 48 to 49
if docWidth < 73 || docHeight < 36 {
return strings.TrimRight(a.styles.doc.Render(lipgloss.Place(docWidth, docHeight, lipgloss.Left, lipgloss.Top, "Window too small.\nPlease resize to at least 60x20.")), "\n")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

High: 这里把最小窗口阈值提升到 73x36,但提示文案仍写 60x20,会直接误导用户;同时该改动已导致现有测试场景(例如 100x30)被判定为 too small。若这是有意行为,请同步更新提示文案、测试与相关文档;若非有意,建议恢复原阈值或按启动页/正常页区分最小尺寸策略。

{Key: "/", Label: "Open Command Palette"},
{Key: "Ctrl+L", Label: "Open Log Viewer"},
{Key: "Ctrl+U", Label: "Exit NeoCode"},
{Key: "Ctrl+N", Label: "New Chat "},
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Medium: startupQuickActions 通过在数据里硬编码前后空格来做对齐(例如 " /""New Chat "),可维护性较差且在不同宽度/裁剪路径下容易出现异常显示。建议把对齐交给样式宽度或计算逻辑,而不是把空格写进业务文本。

@creatang creatang force-pushed the codex/tui-scrollbar-thumb-only branch from ca7c3c3 to bf5c7be Compare April 24, 2026 08:35
@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!

@creatang
Copy link
Copy Markdown
Collaborator Author

/code 补全internal/tui/core/app/startup_view.go这个文件的测试覆盖率至百分之九十五以上

@fennoai
Copy link
Copy Markdown

fennoai Bot commented Apr 24, 2026

已完成:补全 internal/tui/core/app/startup_view.go 相关测试分支,目标文件覆盖率已达到 100%(>=95%)。

本次改动:

  • internal/tui/core/app/view_test.go 新增 5 组测试,共 51 行:
    • renderStartupScreen 的无效尺寸分支与窄屏 fallback 分支
    • startupContentWidth 宽屏比例分支
    • startupPromptWidth 宽屏比例分支
    • startupCenterPadLine 截断分支
    • startupQuickActionKeyWidth 的 3 个关键分支(<=0、窄宽度钳制、正常宽度)

验证结果:

  • go test ./internal/tui/core/app -coverprofile=/tmp/app.cover.out
  • go tool cover -func=/tmp/app.cover.out | rg 'startup_view.go|total'
  • 输出显示 startup_view.go 各函数覆盖率均为 100.0%

代码已提交并推送到 PR 源分支:creatang:codex/tui-scrollbar-thumb-only(commit: af4c198)。

View job run

Generated with [codeagent](https://github.com/qbox/codeagent)

Co-authored-by: creatang <165447160+creatang@users.noreply.github.com>
@phantom5099 phantom5099 merged commit 7c51b80 into 1024XEngineer:main Apr 24, 2026
3 of 4 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.

3 participants