Repository navigation
feat(terminal): configurable fonts with built-in Nerd Font icons - #166180
Conversation
Worked on by: - @jacobtomlinson Co-authored-by: jacobtomlinson <[email protected]> OpenClaw-Publication: 107cf8ee-892a-4bf1-9fca-3bcaaa7734e7
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 6, 2026, 12:45 PM ET / 16:45 UTC (Revision 3). ClawSweeper reviewWhat this changesAdds a browser-local terminal font setting, bundles Nerd Font symbols, and updates open terminals when fonts or preferences change. Merge readiness✅ Ready for maintainer review This PR remains useful: current main and the latest release lack its bundled symbols and terminal font preference. No blocking correctness or security defect was found, and the inspected visual evidence supports the rendering improvement. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI terminal renders shell output received from the Gateway. Browser-local font preferences and bundled fonts determine how that output appears without restarting the shell. flowchart LR
A[Appearance settings] --> B[Browser-local preferences]
B --> C[Terminal font selection]
D[Bundled fonts] --> C
E[Gateway shell output] --> F[Terminal renderer]
C --> F
F --> G[Visible prompt and symbols]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +191, Tests +386, Docs +45. Total +622 across 29 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Use one browser-local font preference and the existing terminal renderer, with bundled symbols, graceful font fallback, and lifecycle-owned repainting. Do we have a high-confidence way to reproduce the issue? Yes: rendering Nerd Font prompt characters in a browser without compatible installed fonts exposes the missing glyphs shown in the inspected before capture. Current-main source retains that installed-font dependency; I did not execute it. Is this the best way to solve the issue? Yes: the patch extends the existing settings and renderer owners, keeps fonts same-origin, and applies preferences without creating another terminal implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 817706084620. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
#166180 added ui/src/e2e/terminal-fonts.e2e.test.ts, which starts its own Control UI server, without registering it in uiE2ePrivateServerTestFiles. The ownership guard in ci-workflow-guards.test.ts failed on main (run 37612626386); registering it runs the suite under the serial private-server owner.
…nclaw#166180) Bundle Nerd Font symbols alongside JetBrains Mono so Zsh and other prompts render Powerline and private-use icons out of the box. Add a browser-profile/Gateway-local terminal font preference with a clear reset to the bundled default. Apply font changes to mounted terminal surfaces without restarting shells, remeasure and repaint after fonts load, and reconcile the latest preference after terminal recovery. Document local browser font requirements and the renderer’s current lack of programming ligatures. Verified focused unit/browser tests, five real-renderer Chromium E2E checks, Control UI build and bundle budgets, typechecks, lint, styles, i18n, and sanitized before/after screenshots. Co-authored-by: jacobtomlinson <[email protected]>
openclaw#166180 added ui/src/e2e/terminal-fonts.e2e.test.ts, which starts its own Control UI server, without registering it in uiE2ePrivateServerTestFiles. The ownership guard in ci-workflow-guards.test.ts failed on main (run 37612626386); registering it runs the suite under the serial private-server owner.
What Problem This Solves
Fixes missing prompt icons and Powerline separators when a Zsh or other shell prompt uses Nerd Font characters, and lets users choose their terminal font.
User Impact
Users can choose an installed monospace font in Settings → Appearance → Typography → Terminal font, or reset to the bundled JetBrains Mono + Nerd Font symbols default. Changes update open terminals without restarting their shells.
The setting is browser-local for the selected Gateway; custom fonts must be installed on the browser's computer, not the remote shell host. Missing fonts fall back to the bundled default. Programming ligatures remain unsupported by the current terminal renderer. No Gateway configuration or migration is required.
Why This Change Was Made
Keep the existing text font and add the upstream symbols-only Nerd Font as a lazy, same-origin fallback rather than requiring a local font installation or a third-party CDN. A single terminal font resolver covers docked, full-page, and focused terminals, including late font loads and recovery replacements.
The bundled Symbols Nerd Font Mono 3.4.0 is 1,178,136 bytes in WOFF2 format. Its MIT license and source/conversion provenance are included; all 10,410 mapped code points are retained.
Evidence
Actual terminal-renderer captures using the same representative Zsh-style prompt:
Terminal font setting
CallBriefre-export inextensions/voice-call/src/types.ts:4. No change to that unrelated file is included. After the PR was marked ready, hosted CI passed for the unchanged heade972c106b523c5ef63c4ab4451b65d2178634fab; both requiredopenclaw/ci-gatechecks passed before merge.Local test cost and scope
The repository test wrapper equivalent to
pnpm test ui/src/app/terminal-font.test.ts ui/src/components/terminal/terminal-controller-lifecycle.test.ts ui/src/components/terminal/terminal-panel-fonts.test.ts --maxWorkers=1passed 24 tests in 2.31 seconds wall time (Vitest 1.16 seconds). The two font E2E cases took 9.651 and 1.940 seconds locally; the five-check E2E run, including the existing runtime suite and build setup, took 27.24 seconds. These are local measurements, not isolated CI timings. Existing passing proof was reused for unchanged inputs; no CI reruns or broad unrelated fixes were requested.Worked on by
Work sessions
View the OpenClaw team session