Skip to content

feat(kilo-console): align fonts with Kilo Cloud - #11564

Merged
catrielmuller merged 3 commits into
Kilo-Org:mainfrom
IamCoder18:superficial-chimpanzee
Jul 3, 2026
Merged

feat(kilo-console): align fonts with Kilo Cloud#11564
catrielmuller merged 3 commits into
Kilo-Org:mainfrom
IamCoder18:superficial-chimpanzee

Conversation

@IamCoder18

Copy link
Copy Markdown
Contributor

Issue

Closes #11563

Context

Kilo Console was rendering the OS sans/mono fallback stack instead of Inter / Roboto Mono / JetBrains Mono like Kilo Cloud. The Cloud web app loads these via next/font/google in apps/web/src/app/layout.tsx, but Kilo Console is a Vite-built SolidJS SPA — it can't fetch Google Fonts at build time the same way, so the Inter named in --font-family-sans was effectively a hopeful fallback that only worked on machines that happened to have Inter installed.

This PR adds the three variable fonts and exposes them through CSS variables that mirror Cloud's naming (--font-sans-loaded, --font-mono-loaded, --font-jetbrains). All 200+ existing var(--font-family-*) consumers across kilo-console, kilo-web-ui, and kilo-ui pick up the new fonts with no per-site change because the override is at the --font-family-* layer.

Implementation

  • Added the three variable woff2 files under packages/kilo-web-ui/src/assets/fonts/: Inter Variable + Italic (rsms/inter v4.0), Roboto Mono Variable (converted from google/fonts TTF to woff2), and JetBrains Mono Variable. All three are OFL-1.1; attribution in ATTRIBUTION.md next to the files.
  • Added four @font-face blocks at the top of packages/kilo-web-ui/src/styles/theme.css. They sit outside the [data-theme="kilo"] scoped block so they're emitted into every bundle that imports @kilocode/kilo-web-ui/styles.
  • Inside the existing html[data-theme="kilo"], html[data-theme="kilo-console"], .kilo-console block (the same place that already overrode --font-family-sans/-mono), declared the three Cloud-mirror tokens and re-aliased --font-family-sans: var(--font-sans-loaded) and --font-family-mono: var(--font-mono-loaded). Cascade order is preserved by listing the local "Inter" / "Roboto Mono" names after the variable font names, so environments without the woff2 file (SSR, dev before the file is fetched) still get a sane fallback.
  • Removed three hard-coded inline Inter fallbacks in kilo-console styles (base.css:2, resolved.css:121, profile.css:423) that would otherwise have short-circuited the cascade to Inter, system-ui, sans-serif regardless of what --font-family-sans resolved to.
  • Tradeoff: shipped one variable woff2 file per family instead of three static-weight files for JetBrains Mono. Single variable file is ~72 KB; static weights at 400/500/700 would have been ~120 KB each. The wght axis on the variable file covers the same weight range, and font-synthesis-weight will synthesize missing weights if any consumer needs them later.
  • Tradeoff: did not add Inter Fallback / Roboto Mono Fallback faces with size-adjust/ascent-override. Cloud uses next/font which generates these automatically; for the Vite SPA we'd have to maintain the metric overrides by hand.

Screenshots / Video

before after
chrome_SA7PaTd32n chrome_c5B8sgo6eE

How to Test

Manual/local verification

  • Ran bun dev console --hostname 0.0.0.0
  • Verified all fonts rendered correctly using DevTools

Checklist

  • Issue linked above, or exception explained
  • Tests/verification described
  • Screenshots/video included for visual changes, or marked N/A
  • Changeset considered for user-facing changes
  • I personally reviewed the diff and can explain the changes, including any AI-assisted work.

Get in Touch

Discord: @IamCoder18

Kilo Console was rendering the OS sans/mono fallback stack instead of
Inter / Roboto Mono / JetBrains Mono like Kilo Cloud. Kilo Cloud's web
app (apps/web/src/app/layout.tsx) loads these via `next/font/google`,
but Kilo Console is a Vite-built SolidJS SPA that can't fetch Google
Fonts at build time the same way.

Changes:

- Self-host Inter Variable, Roboto Mono Variable, and JetBrains Mono
  Variable as woff2 under packages/kilo-web-ui/src/assets/fonts/.
  All three are OFL-1.1; attribution added next to the files.

- Add @font-face blocks at the top of
  packages/kilo-web-ui/src/styles/theme.css for the three variable
  fonts. The blocks live outside the scoped [data-theme="kilo"]
  selector so they're available everywhere Kilo Web UI styles load.

- Declare the three Cloud-mirror tokens in the same scoped block where
  --font-family-sans/-mono are already overridden:
    --font-sans-loaded  -> "Inter Variable"
    --font-mono-loaded  -> "Roboto Mono Variable"
    --font-jetbrains    -> "JetBrains Mono Variable"
  Re-alias --font-family-sans/-font-family-mono to point at the new
  tokens, so all existing var(--font-family-*) consumers across the
  200+ call sites in kilo-ui, kilo-web-ui, and kilo-console pick up the
  new fonts with no per-site change.

- Drop three hard-coded inline fallbacks in kilo-console styles
  (base.css, profile.css, resolved.css) that named "Inter" directly,
  so the value flows through the cascade instead of short-circuiting it.

- No upstream changes: packages/ui/* (the @opencode-ai/ui fork) is
  untouched, avoiding kilocode_change markers in shared files.

Verified with `bun run build` in packages/kilo-console (all four
@font-face blocks emitted to the bundled CSS with hashed woff2 URLs)
and `bun run typecheck` in both kilo-console and kilo-web-ui.
@IamCoder18

Copy link
Copy Markdown
Contributor Author

Typecheck fails due to unrelated Jetbrains Gradle issue. typecheck-js passes.

@kilo-code-bot

kilo-code-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (10 files)
  • .changeset/kilo-console-cloud-fonts.md
  • packages/kilo-console/src/styles/base.css
  • packages/kilo-console/src/styles/profile.css
  • packages/kilo-console/src/styles/resolved.css
  • packages/kilo-web-ui/src/assets/fonts/ATTRIBUTION.md
  • packages/kilo-web-ui/src/assets/fonts/Inter-Variable-Italic.woff2
  • packages/kilo-web-ui/src/assets/fonts/Inter-Variable.woff2
  • packages/kilo-web-ui/src/assets/fonts/JetBrainsMono-Variable.woff2
  • packages/kilo-web-ui/src/assets/fonts/RobotoMono-Variable.woff2
  • packages/kilo-web-ui/src/styles/theme.css

Reviewed by gpt-5.4-20260305 · Input: 135.8K · Output: 13.2K · Cached: 1M

Review guidance: REVIEW.md from base branch main

@johnnyeric
johnnyeric requested a review from catrielmuller June 23, 2026 09:36
@catrielmuller
catrielmuller merged commit 419ff00 into Kilo-Org:main Jul 3, 2026
20 checks passed
NJ-2020 pushed a commit to NJ-2020/kilocode that referenced this pull request Jul 4, 2026
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
feat(kilo-console): align fonts with Kilo Cloud
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.

Kilo Console renders wrong fonts — falls back to OS defaults instead of Inter / Roboto Mono

2 participants