Skip to content

feat(terminal): add independent natural-font line height setting - #445

Open
WilliamWang1721 wants to merge 43 commits into
Kuddev:mainfrom
WilliamWang1721:codex/issue-439-terminal-line-height
Open

WilliamWang1721 wants to merge 43 commits into
Kuddev:mainfrom
WilliamWang1721:codex/issue-439-terminal-line-height

Conversation

@WilliamWang1721

@WilliamWang1721 WilliamWang1721 commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Result / 用户结果

Closes #439. Adds an editable two-decimal terminal line height (0.50–5.00) under terminal appearance. 1.00 multiplies the font's natural shaped height; explicit values override theme line height. Auto clears the override and preserves existing theme/natural spacing. The suggested 1.3–1.5 default is available explicitly; existing users keep their current layout.

Design / 设计边界

Shared settings own parsing, rounding, range and reset. The existing native font input handles Enter, blur, Tab and Escape. Startup and live prepaint use one typography function; cell layout updates the grid, PTY geometry and pointer/selection coordinates together. No dependency or theme-format change. Decision: architecture/notes/nebula_settings/terminal_line_height/2026-10-03-natural-height-override.md.

Evidence / 验证依据

Confirmed current main only exposed custom-theme line height, with no independent terminal preference. Added regression coverage for persistence/reload, reset, precision/range, real setting clicks and commit/cancel/Auto, theme precedence, device-pixel rounding, and live grid/pointer geometry.

No local tests/builds/format/architecture checks were run. Final head 6d8c6f50b5eff98941b2fa57a224d74af7a2bf5c: architecture, lint, PR size and all required reports passed. Native validation executed Linux, Windows x64 and Windows ARM64; the grid fixture consumes its real ResizeGrid notification and pointer fixtures use isolated preferences. macOS native execution was not selected by repository policy; the fork macOS native UI job passed on the same head. Real clicks/typing/Enter persisted 1.46; actual terminal text spacing measured 17→25 points. Settings and both terminal screenshots were visually reviewed at 984×667 on a 1024×768, 1× hosted display. Artifact: native-ui-pr-445-6d8c6f50b5eff98941b2fa57a224d74af7a2bf5c. Windows UI and manual high-DPI/device acceptance remain unverified. Two self-review passes completed.

AI implementation/review: GPT-6.1 SOL sub-agents; coordinator model and reasoning efforts unverified.

Required Review / 必须确认

  • Followed the contribution, architecture and project-constraint rules.
  • Shared behavior remains in the existing owning layers; no new dependencies.
  • Remote architecture, format, selected native suites and required CI pass for final head.
  • Regression coverage and native visual acceptance limits are stated.
  • New text uses typed i18n IDs with English/Chinese catalogs and English fallback.

WilliamWang1721 and others added 25 commits October 4, 2026 16:17

@Kuddev Kuddev left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

我复审了 6cc727f3。Linux ARM64 上编译运行了实际设置模块,109 项通过,包括行高保存、取值范围和恢复自动;另有 3 项直接调用该提交的行高计算,验证不同缩放下的像素取整、显式值优先级和最小高度,全部通过。

这个提交目前无法合并:与 main 在 activity_tests.rs 冲突,最新 lint 也在 terminal/view/tests.rs:345 的格式检查失败,后续原生任务没有执行。PR 描述里的全绿运行对应较早的 6d8c6f50。

请同步当前 main、保留双方的终端回归,并跑当前版本的原生检查。复测时请覆盖在已打开的终端改变行高、在两行间点击选中、切回 Auto 后恢复主题行高;这三步能一起验证实际重排和命中位置。

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.

[Feature] 给 “设置-终端外观” 添加行高设置

3 participants