Repository navigation
Conversation
Two Ghostty config forms previously landed in unsupportedKeys: - adjust-cell-height percentages (e.g. "35%") now map to terminalLineHeight (1.35), the direct xterm equivalent. Pixel values are still rejected because they depend on the rendered cell height. - window-padding-x/y "top,bottom" / "left,right" pairs now import as the rounded average, preserving the total padding along the axis. parseStrictInt moves to numeric-config-values.ts alongside the new pair parser to keep mapper.ts under the max-lines budget.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (2)
📝 WalkthroughWalkthroughChangesThis change adds shared Ghostty numeric parsing helpers, updates mapper logic for window padding and cell height values, and adds coverage for those mappings. It also adds a settings label for Sequence Diagram(s)Not applicable. Related PRs: None specified. Suggested labels: area: ghostty, tests, ui Suggested reviewers: None specified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/ghostty/mapper-extended.test.ts (1)
112-141: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider adding inclusive-boundary tests for
adjust-cell-height.Coverage tests 33%/35% (mid-range) and 250% (over-ceiling), but not the exact boundary values (e.g.
200%→terminalLineHeight: 3, or0%→1) that confirm the clamp is inclusive per the settings UI range[1, 3].✅ Suggested additional boundary tests
it('rejects a percentage above the 3x line-height ceiling', () => { const result = mapGhosttyToOrca({ 'adjust-cell-height': '250%' }) expect(result.diff).toEqual({}) expect(result.unsupportedKeys).toEqual(['adjust-cell-height']) }) + + it('accepts the inclusive 3x line-height ceiling', () => { + const result = mapGhosttyToOrca({ 'adjust-cell-height': '200%' }) + expect(result.diff).toEqual({ terminalLineHeight: 3 }) + expect(result.unsupportedKeys).toEqual([]) + }) + + it('accepts the inclusive 1x line-height floor', () => { + const result = mapGhosttyToOrca({ 'adjust-cell-height': '0%' }) + expect(result.diff).toEqual({ terminalLineHeight: 1 }) + expect(result.unsupportedKeys).toEqual([]) + })
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 0fbed734-971c-480a-907e-3d518119be2f
📒 Files selected for processing (3)
src/main/ghostty/mapper-extended.test.tssrc/main/ghostty/mapper.tssrc/main/ghostty/numeric-config-values.ts
Co-authored-by: Orca <[email protected]>
Jinwoo-H
left a comment
There was a problem hiding this comment.
Thanks for the PR. I verified the Ghostty import flow end to end and added a small follow-up commit for numeric edge cases and UI labeling.
- Preserves fractional averages for dual-value padding, e.g.
1,2->1.5. - Checks
adjust-cell-heightagainst Orca's[1, 3]range before rounding. - Covers decimal rounding boundaries like
0.5%,1.5%, and101.5%. - Labels imported line height as
Line Heightin the modal.
Validated with typecheck, focused Ghostty/settings tests, touched-file lint, and Electron.
Co-authored-by: Orca <[email protected]>
…gs (stablyai#7125) * feat(ghostty): import adjust-cell-height and dual-value window paddings Two Ghostty config forms previously landed in unsupportedKeys: - adjust-cell-height percentages (e.g. "35%") now map to terminalLineHeight (1.35), the direct xterm equivalent. Pixel values are still rejected because they depend on the rendered cell height. - window-padding-x/y "top,bottom" / "left,right" pairs now import as the rounded average, preserving the total padding along the axis. parseStrictInt moves to numeric-config-values.ts alongside the new pair parser to keep mapper.ts under the max-lines budget. * fix(ghostty): tighten import edge cases Co-authored-by: Orca <[email protected]> * fix(settings): sentence-case account runtime copy Co-authored-by: Orca <[email protected]> --------- Co-authored-by: Jinwoo-H <[email protected]> Co-authored-by: Orca <[email protected]>
Summary
Two common Ghostty config forms currently land in
unsupportedKeysduring import:adjust-cell-heightpercentages (e.g.adjust-cell-height = 35%) — this is the standard Ghostty way to set line spacing, and it has a direct Orca equivalent. Percentages now map toterminalLineHeight(35%→1.35), rounded to two decimals. Values that would fall outside the settings UI's[1, 3]clamp are rejected, and pixel forms (e.g.adjust-cell-height = 2) stay unsupported because they depend on the rendered cell height, which the importer can't know.window-padding-y = 10,8, Ghostty'stop,bottom/left,rightsyntax) — previously the strict-integer parse failed on the comma and the whole key was dropped. Pairs now import as the rounded average, preserving the total padding along the axis. Single values behave exactly as before, and each half is validated against the existing[0, 512]range.parseStrictIntmoves to a newnumeric-config-values.tsalongside the pair parser to keepmapper.tsunder the max-lines budget (per AGENTS.md, no lint disables).Test plan
mapper-extended.test.ts: percentage mapping + rounding, pixel/negative/over-ceiling rejection, dual-value averaging (incl. whitespace), invalid half / out-of-range half / >2 values rejectionvitest run src/main/ghostty/— 123/123 passoxlintandtsgo --noEmit -p config/tsconfig.node.jsoncleanadjust-cell-height = 35%andwindow-padding-y = 10,8(both previously reported unsupported)