Code pages draw in the terminal's font; agent pane defines --font-mono
Font audit, part 1 (correctness). Code on the diff, markdown and code-editor pages was meant to draw in the terminal's font (appearance.ts, editorFont: "the terminal font the editor follows by default"), but no cmux NEXT host ever sent one, so code always drew in Menlo whatever the terminal used. Every page theme now carries the terminal's family, and the pages draw code in it.
What changes
WebTheme'sterminalpayload gainsfontFamily: cmux.json'sterminal.fontFamily, else the Ghostty config files' ownfont-family(read off the main actor on each load of the user's config, from the files libghostty reports it loaded,config-fileincludes included). Null when neither names one, and then every page keeps its current default (Menlo on diff and markdown,ui-monospacein the editor).- A change of the terminal's face resends the theme to open pages (
ThemeStore.repaintAll, called fromDesignSettings, so the CmuxNextApp target gains no lines), so code follows in place. - The agent pane's mono text (permission commands, preview addresses, replay clock, Inspector) read
--font-mono, which no sheet of ours defined; it only worked because Tailwind's theme layer emitted it after a source file happened to name it.conversation.cssnow defines it as--cv-mono, the same first face, so nothing visible changes.
Audit (no fix needed)
No surface falls back to Times or another serif on base: every page loads desktop.css first (guarded by desktopLayer.test.ts and internal-pages-app-font.test.ts), the agent pane, sidebar and settings are covered, KaTeX's faces are inlined, and native code has no NSFont(name:) that can come back nil without a handled fallback. No app fonts are bundled; every face is a system face.
Testing
- Red then green,
bun test test/code-pages-terminal-font.test.ts test/font-variables-defined.test.tson the Linux builder: red at fe704ec5048b (3 fail: diff/markdown and editor ignore the host font; 10--font-monoreads with no definition), green on the fix. TerminalFontWebThemeTests(Swift): the page payload carries the Ghostty config's family, cmux.json's wins, and none is null. Compiled on the Linux builder; runs in PR CI.bun run check,check-concurrency,check-crash-safety, crash ratchet: pass.
Changelog
Fixed: Code in the diff viewer, markdown pages and the code editor uses your terminal font instead of always Menlo
Proof
Real cmux NEXT DEV builds on a capture mini with the same slot config, the Ghostty config set to font-family = "Courier New" (a deliberately visible face). Base is 7295a6fe; head is 6e58e86afb5d (the later head only moves the repaint call and merges base). Code regions cropped.





The chat, composer, sidebar and settings look the same on base and head (system faces).
🤖 Generated with Claude Code