Skip to content

feat(vscode): use terminal.integrated font settings in Agent Manager xterm - #11144

Merged
RSO merged 3 commits into
mainfrom
feat/terminal-integrated-font
Jun 12, 2026
Merged

feat(vscode): use terminal.integrated font settings in Agent Manager xterm#11144
RSO merged 3 commits into
mainfrom
feat/terminal-integrated-font

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Agent Manager xterm terminals now read terminal.integrated.fontFamily and terminal.integrated.fontSize (with fallback to editor.fontFamily / editor.fontSize) instead of the --vscode-editor-font-family CSS variable and Kilo's --font-size-base.
  • Nerd Font glyphs and powerline symbols set via terminal.integrated.fontFamily now render correctly in terminal tabs — no more missing-glyph boxes.
  • A vscode.workspace.onDidChangeConfiguration watcher broadcasts agentManager.terminal.fontChanged to the webview when font settings change at runtime, so live terminals pick up the new font without requiring a reload.
  • fontSizeChanged/ready messages (which control the Kilo chat UI font size) no longer propagate to term.options.fontSize — the terminal font is now fully independent of the chat UI font.

Implementation

  • terminal-font.ts (new): reads terminal.integrated.* and editor.font* config, exposes readTerminalFont(), affectsTerminalFont(), and watchTerminalFont(). Added to the arch-test VSCODE_ALLOWED list.
  • types.ts: adds font: TerminalFont to TerminalCreatedMessage and a new TerminalFontChangedMessage outbound type.
  • terminal-routing.ts: adds getTerminalFont() to TerminalRoutingDeps; includes font in every terminal.created post.
  • AgentManagerProvider.ts: supplies getTerminalFont dep, sets up a font-change watcher that posts terminal.fontChanged to the webview.
  • Webview state.ts: adds TerminalFont interface and font field to TerminalTabState / TerminalCreatedEvent.
  • Webview render.tsx: forwards font={term.font} prop to <TerminalTab>.
  • Webview TerminalTab.tsx: uses props.font for initial xterm options; handles agentManager.terminal.fontChanged in the message subscription for live updates.

…xterm terminals

Reads terminal.integrated.fontFamily and terminal.integrated.fontSize (with
editor font fallback) instead of the editor font CSS var. A config watcher
broadcasts fontChanged messages so live terminals update without a reload.
Nerd Font glyphs now render correctly in Agent Manager terminal tabs.
Comment thread packages/kilo-vscode/src/agent-manager/terminal-font.ts Outdated
Comment thread packages/kilo-vscode/webview-ui/agent-manager/terminal/TerminalTab.tsx Outdated
@kilo-code-bot

kilo-code-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

What Changed (incremental — commit a5f1514685)

  • resolveTerminalFont extracted from readTerminalFont as a pure testable function. No logic changed — the extraction is purely for testability.
  • Test updated to call resolveTerminalFont directly instead of the VS Code API-dependent readTerminalFont, covering three cases: all-undefined defaults, explicit family+size, and editor-family fallback.

All Previous Issues — Resolved

| File | Previous Issue | Status |
|---|---|
---|
| terminal-font.ts | letterSpacing: 0 / lineHeight: 0 dropped by || undefined | ✅ Fixed in 3cd4628a52 |
| TerminalTab.tsx | Falsy if (font.lineHeight) / if (font.letterSpacing) skipped resets | ✅ Fixed in 3cd4628a52 |

Files Reviewed (12 files)
  • .changeset/terminal-integrated-font.md — clean
  • packages/kilo-vscode/src/agent-manager/AgentManagerProvider.ts — clean, unsubFont disposed correctly
  • packages/kilo-vscode/src/agent-manager/terminal-font.ts — clean; resolveTerminalFont pure-function extraction is correct
  • packages/kilo-vscode/src/agent-manager/terminal-routing.ts — clean
  • packages/kilo-vscode/src/agent-manager/types.ts — clean
  • packages/kilo-vscode/tests/unit/agent-manager-arch.test.ts — clean
  • packages/kilo-vscode/tests/unit/agent-manager-terminal-font.test.ts — clean; tests exercise real logic
  • packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx — clean
  • packages/kilo-vscode/webview-ui/agent-manager/terminal/TerminalTab.tsx — clean
  • packages/kilo-vscode/webview-ui/agent-manager/terminal/state.ts — clean
  • packages/kilo-vscode/webview-ui/src/types/messages/agent-manager.ts — clean
  • packages/kilo-vscode/webview-ui/src/types/messages/extension-messages.ts — clean

Reviewed by claude-4.6-sonnet-20260217 · 180,959 tokens

Review guidance: REVIEW.md from base branch main

@RSO
RSO merged commit 5128211 into main Jun 12, 2026
21 checks passed
@RSO
RSO deleted the feat/terminal-integrated-font branch June 12, 2026 08:43
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…ted-font

feat(vscode): use terminal.integrated font settings in Agent Manager xterm
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