Skip to content

ui: Llama UI design system: tokens, surfaces and fonts - #32468

Merged
allozaur merged 12 commits into
ggml-org:masterfrom
allozaur:allozaur/style/llama-ui-design-system-upstream
Nov 17, 2026
Merged

allozaur merged 12 commits into
ggml-org:masterfrom
allozaur:allozaur/style/llama-ui-design-system-upstream

Conversation

@allozaur

@allozaur allozaur commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Llama UI, the design system and component library published as @ggml-org/llama-ui, comes into llama.cpp as ui/lib/ui, with three tiers of tokens, matte glass surfaces and Llama Sans and Llama Mono. Llama Chat is built on it, taking its components, tokens, fonts and shared code from the library instead of keeping its own copy, and the library takes the brand's colours and logo from @ggml-org/llama-brand.

Additional information

Read it commit by commit: the first one brings in the library as it was in the temporary ggml-org/llama-ui repository at edaf518, without its Storybook (119 new files). The Storybook comes in a follow-up PR. @ggml-org/llama-ui 0.3.0 on npm is published from this ui/lib/ui.

Known gaps: the fonts are still the library's own WOFF2 copies: llama-brand ships them as TTF only, three times the size, so they move to llama-brand's once it has WOFF2 builds. tw-animate-css is now a peer dependency of the library, so llama.pages needs to import it before theme.css when it moves to 0.3.0. DESIGN.md also describes pages and packages that come in later PRs (Projects, the prompt Library, Servers and Llama Harness).

Before and after

flowchart LR
    subgraph before["master"]
        direction TB
        chatA["Llama Chat<br/><code>ui/apps/chat</code>"]
        ownA["its own copies:<br/>28 base components, Model UI,<br/>ActionIcon, SearchInput, Logo…,<br/>constants, enums, helpers"]
        chatA --> ownA
    end

    subgraph after["this PR"]
        direction TB
        chatB["Llama Chat<br/><code>ui/apps/chat</code>"]
        lib["Llama UI<br/><code>ui/lib/ui</code> · <code>@ggml-org/llama-ui</code>"]
        brand["<code>@ggml-org/llama-brand</code><br/>colours, logo, fonts"]
        chatB -- "imports" --> lib
        lib -- "colors.css, icon" --> brand
    end

    before ==> after
Loading

Llama Chat does not install the library: it compiles ui/lib/ui's sources as part of its own build, so a change in the library shows in the app at once.

flowchart LR
    src["<code>ui/lib/ui/src</code>"] --> plugin["<code>vite-plugin-llama-ui</code><br/>maps <code>@ggml-org/llama-ui/*</code> to the sources,<br/>their dependencies to Chat's <code>node_modules</code>"]
    plugin --> vite["Llama Chat's Vite build<br/>one copy of Svelte and bits-ui"]
    vite --> cmake["CMake stages <code>ui/lib/ui</code><br/>next to the app"]
    cmake --> server["llama-server<br/>embedded UI"]
Loading

What it looks like

Screenshots from the Storybook that comes with the follow-up PR, in the light and the dark theme.

Typography: Llama Sans and Llama Mono, set through type roles

Light Dark
Typography: Llama Sans and Llama Mono, set through type roles, light Typography: Llama Sans and Llama Mono, set through type roles, dark

Surfaces: matte glass, float, key, well, sheen and the status lamps

Light Dark
Surfaces: matte glass, float, key, well, sheen and the status lamps, light Surfaces: matte glass, float, key, well, sheen and the status lamps, dark
Colour tokens: primitives and semantic tokens

Primitives

Light Dark
Primitives, light Primitives, dark

Semantic tokens, the only tier that changes between light and dark

Light Dark
Semantic tokens, the only tier that changes between light and dark, light Semantic tokens, the only tier that changes between light and dark, dark
Sizing, shapes and elevation

Sizing: control heights and icon sizes

Light Dark
Sizing: control heights and icon sizes, light Sizing: control heights and icon sizes, dark

Shapes: corner roles

Light Dark
Shapes: corner roles, light Shapes: corner roles, dark

Elevation

Light Dark
Elevation, light Elevation, dark
Components

Button

Light Dark
Button, light Button, dark

ButtonGroup

Light Dark
ButtonGroup, light ButtonGroup, dark

ToggleGroup

Light Dark
ToggleGroup, light ToggleGroup, dark

Input

Light Dark
Input, light Input, dark

Select

Light Dark
Select, light Select, dark

Switch

Light Dark
Switch, light Switch, dark

Checkbox

Light Dark
Checkbox, light Checkbox, dark

Badge

Light Dark
Badge, light Badge, dark

Card

Light Dark
Card, light Card, dark

Alert

Light Dark
Alert, light Alert, dark

Table

Light Dark
Table, light Table, dark

Tabs

Light Dark
Tabs, light Tabs, dark

Dialog

Light Dark
Dialog, light Dialog, dark

DropdownMenu with a submenu, opening outside its menu

Light Dark
DropdownMenu with a submenu, opening outside its menu, light DropdownMenu with a submenu, opening outside its menu, dark
Patterns

SearchInput

Light Dark
SearchInput, light SearchInput, dark

ActionIcon

Light Dark
ActionIcon, light ActionIcon, dark

InfoBadges

Light Dark
InfoBadges, light InfoBadges, dark

KeyValuePairs

Light Dark
KeyValuePairs, light KeyValuePairs, dark

What the diff is made of

GitHub shows +12,413 / −2,326 across 490 files. 136 of those files moved from Llama Chat into the library almost unchanged, so they count as renames instead of deletions plus additions.

pie showData title Lines added
    "Library: components, tokens, Model UI, mockups" : 5564
    "Library lockfile (generated)" : 4419
    "DESIGN.md, the design rules for agents" : 1148
    "Llama Chat: restyle and imports" : 1196
    "Build and CI" : 86
Loading
pie showData title Lines removed
    "Chat components: restyle, old copies" : 1019
    "Chat's own base components" : 594
    "Chat's copies of shared constants and helpers" : 389
    "Other Chat source" : 161
    "Moved files, small edits" : 140
    "Tests, config, build" : 23
Loading
The diff, area by area
Area Added Removed Files Used by Llama Chat
ui/lib/ui/package-lock.json 4,419 0 1 tooling
Model UI and its data (ModelCard, ModelId, quant chips, formatters) 1,434 14 18 ModelId, capability icons, progress bar, draft sidecars
App mockups (MacMenu, WindowsTray) 1,138 0 3 no, llama.pages and the brand pages
Tokens, surfaces, theme and font CSS 1,051 0 7 yes
Base components: the library's own and the 128 files moved from Chat 1,100 116 150 yes
Package, README, check page, constants, enums 681 0 27 yes
ActionIcon, SearchInput, SyntaxHighlightedCode, Logo 36 10 8 yes
Fonts and logos 124 0 10 yes
ui/apps/chat/DESIGN.md 1,148 0 1 doc
Llama Chat components 758 1,019 187 restyle and imports
Llama Chat's base components, the library's now 0 594 16 removed
Llama Chat's shared constants, enums, helpers 114 389 21 re-exported from the library
Other Llama Chat source, tests and config 324 182 28 yes
Dockerfiles, Nix, ui-assets.cmake, workflows 86 2 13 yes
The commits, in order
flowchart LR
    c1["1 · bring <code>@ggml-org/llama-ui</code> into <code>ui/lib/ui</code><br/>+10,413"]
    c2["2 · the design system: tokens, surfaces, fonts<br/>+2,984 −732"]
    c3["3 · Llama Chat on the library's base components, tokens, fonts<br/>+1,022 −2,764"]
    c4["4 · AGENTS.md places Llama UI"]
    c5["5 · Llama Sans and Mono from llama-brand's latest,<br/>shell commands marked in bash code"]
    c6["6 · submenus open outside their menu"]
    c7["7 · submenus drawn like their menu"]
    c8["8 · a late current-node write kept off a closed conversation"]
    c9["9 · Llama Chat on the library's Model UI and app components<br/>+200 −845"]
    c10["10 · colours and logo from llama-brand"]
    c11["11 · Llama Chat on the library's constants, enums, helpers<br/>+97 −393"]
    c12["12 · a tighter shadow on the chat form's keys"]

    subgraph import["the library"]
        direction TB
        c1
    end
    subgraph system["the design system"]
        direction TB
        c2 --> c3 --> c4 --> c5
    end
    subgraph fixes["fixes"]
        direction TB
        c6 --> c7 --> c8
    end
    subgraph more["more of Llama Chat on the library"]
        direction TB
        c9 --> c10 --> c11 --> c12
    end
    import --> system --> fixes --> more
Loading
Design tokens: from llama-brand to a component

Every colour a component draws goes through three tiers. Only the semantic tier changes between light and dark, and @ggml-org/llama-brand's colors.css supplies the brand's own primitives under the same names.

flowchart LR
    brand["<code>@ggml-org/llama-brand</code> <code>colors.css</code><br/><code>--neutral-950</code>, <code>--art-cinder</code>…"]
    prim["primitives<br/><code>--cool-gray-200</code>, <code>--red-500</code>,<br/><code>--white-a30</code>, <code>--length-24</code>…"]
    sem["semantic<br/><code>--surface-glass</code>, <code>--fg-muted</code>,<br/><code>--line-field</code>, <code>--status-warning</code>…<br/>light and dark"]
    comp["component<br/><code>--button-primary-background</code>,<br/><code>--chat-form-edge-side-focus</code>…"]
    ui["components<br/><code>bg-(--button-primary-background)</code>"]
    brand --> prim --> sem --> comp --> ui
Loading

DESIGN.md mirrors the three token files for agents; when they disagree, the CSS wins.

What Llama Chat imports from the library
flowchart LR
    chat["Llama Chat"]
    chat --> ui["<code>@ggml-org/llama-ui/ui/&lt;name&gt;</code><br/>29 base components"]
    chat --> app["<code>…/app/actions · content · forms · misc</code><br/>ActionIcon, SyntaxHighlightedCode,<br/>SearchInput, Logo"]
    chat --> models["<code>…/models</code><br/>ModelId, ModelCapabilityIcons, ModelOrgAvatar,<br/>ModelDownloadProgressBar, ModelDraftSidecars,<br/>model constants, enums, formatters"]
    chat --> shared["<code>…/constants · enums · code</code><br/>shared classes, ColorMode, TooltipSide,<br/>highlightCode"]
    chat --> utils["<code>…/utils</code><br/>cn, tv"]
    chat --> theme["<code>…/theme.css</code><br/>fonts, tokens, surfaces"]
Loading
  • ModelId and ModelOrgAvatar stay in Chat as thin wrappers: ModelId parses a raw model id and applies the user's display settings (raw names, quantization, tags), ModelOrgAvatar hides the avatar while Hugging Face metadata is off. The library's ModelId gained what Chat's had: the model's own draft kind, draft sidecars with their quant, aliases and a raw-id tooltip, in the same badge order.
  • Chat keeps its own where the two differ: UI_DATA_ATTRS (a superset of the library's), formatFileSize (it counts in 1024s) and ModelDownloadProgress, which now extends the library's.
  • The library registers highlight.js's languages from lowlight's modules, as Chat does, so the bundle has one copy of each language.
Submenus: why they were cut off, and the fix
flowchart TB
    subgraph beforeFix["before"]
        direction TB
        menuA["menu: scroll box with a backdrop filter<br/>and an open animation"] --> subA["submenu, position: fixed,<br/>but the filter makes the menu its containing block"]
        subA --> clipA["clipped by the menu's scroll box"]
    end
    subgraph afterFix["after"]
        direction TB
        menuB["menu"] -.- trigger["sub-trigger"]
        portal["portal at the end of the body"] --> subB["submenu, its first row level with the trigger,<br/>4px past the menu's edge, the menu's corners and height cap"]
        trigger -.-> subB
    end
Loading
  • Dropdown and context-menu submenus render in a portal, as the menus themselves do. CSS alone cannot get the submenu out while the menu has to scroll.
  • Context menus take the dropdown's glass surface and slide-in; sub-triggers take the items' radius and pointer.
  • The submenus' height cap and zoom origin named the dropdown's CSS variables, which bits-ui does not set on submenus; they use its --bits-menu-* ones now. The chat group submenu takes the actions menu's z-[999999] layer, as it no longer renders inside that menu.
The chat form's keys

In light, the add key and the model selector trigger sat white on the white chat form with the control elevation, whose soft spread blended into it. They take --elevation-key (through --chat-form-key-shadow): a 0.5px hairline all round and a 1px drop. Dark keeps the control elevation.

Before After
0 0.5px 1px, 0 1px 2px, 0 2px 4px -1px at 5% 0 0 0 0.5px and 0 1px 1.5px at 8%
The store race
sequenceDiagram
    participant UI as Chat
    participant Store as conversations store
    participant DB as IndexedDB
    UI->>Store: updateCurrentNode(node) for conversation A
    Store->>DB: write A's current node
    UI->>Store: the user closes A or opens B
    DB-->>Store: write done
    alt before
        Store->>Store: currNode = node on whatever is active now
        Note over Store: A closed: throws, the reply ends in an error dialog<br/>B open: B gets A's node
    else after
        Store->>Store: still A? then currNode = node
        Note over Store: otherwise nothing changes in memory
    end
Loading
Builds
  • CMake stages ui/lib/ui next to the app, keeping the layout of ui/, and rebuilds when a library source changes.
  • The Dockerfiles copy the library's sources, and the Nix derivation takes ui/ as its source.
  • A CI job type-checks and packs the library (npm run check, npm run prepack with publint).
  • @ggml-org/llama-brand is a dependency of the library by its GitHub tarball, as Llama Chat already installs it, now under the same name. The library's primitives build on its css/colors.css, which an app imports before theme.css, as it does Tailwind and tw-animate-css: the library's stylesheets import no package.
Testing
  • ui/lib/ui: npm ci, npm run check, npm run prepack (svelte-package and publint) and its 11 unit tests pass.
  • ui/apps/chat: npm run check, npm run lint and npm run build pass, with 794 unit tests, 270 client tests and 49 story tests.
  • No visual change from moving Llama Chat onto the library, comparing the commits before and after it: the built CSS has the same rules apart from moved rules, two new tokens and 21 utilities from library components Chat does not use; 99 of 102 story screenshots are pixel-identical, and the other three differ as much between two shots of the same commit.
  • Moving Llama Chat onto the library's Model UI and app components: the built CSS differs only in Svelte scope hashes, every story's DOM matches, and 92 of 98 screenshots are pixel-identical (the other 6 also differ between two shots of the same commit).
  • The llama-brand and shared-constants commits move code without changing what it does; CI covers them.
  • Not run: the E2E tests, scripts/ui-assets.cmake, and the Docker and Nix builds.

Requirements

@github-actions github-actions Bot added documentation Improvements or additions to documentation nix Issues specific to consuming flake.nix, or generally concerned with ❄ Nix-based llama.cpp deployment devops improvements to build systems and github actions server/ui labels Nov 17, 2026
@allozaur
allozaur force-pushed the allozaur/style/llama-ui-design-system-upstream branch from c60478c to 69380ec Compare November 17, 2026 12:27
@allozaur
allozaur force-pushed the allozaur/style/llama-ui-design-system-upstream branch 2 times, most recently from 5410857 to a648367 Compare November 17, 2026 13:05
The design system package (tokens, fonts, surfaces, components and Model UI), so far in the temporary ggml-org/llama-ui
repository at edaf518, moves to its home in ui/lib/ui, built with @sveltejs/package and published as @ggml-org/llama-ui
from here. ui/lib holds the packages, one folder each. Its references to tools/ui now name ui/apps/chat, its
package.json points at this repository, and the UI workflow type-checks and packs it. ui/README.md describes the
layout.

Assisted-by: Claude (Opus 5.5 Medium)
The design system from allozaur/docs/storybook-overhaul: three tiers of
tokens, matte glass surfaces, Llama Sans and Llama Mono, and the base
components on the new tokens (Tabs and GlassKey among them). It also
restyles the stack's features with it, replacing the plain stand-ins they
used until now. DESIGN.md is generated from the tokens. The Storybook that
documents it is the next PR.

Assisted-by: Claude (Opus 5.5 Medium)
…okens and fonts

Llama Chat kept its own copy of the design system: 29 base components, the
three tiers of tokens, the surfaces, the theme and the fonts, next to the 12
components ui/lib/ui held. The copy goes, and the library gets what it lacked.

ui/lib/ui
- the 17 base components the app had and the library did not (alert,
  alert-dialog, button-group, checkbox, collapsible, context-menu, dialog,
  drawer, dropdown-menu, empty, hover-card, radio-group, scroll-area,
  skeleton, table, tabs, textarea), with vaul-svelte for the drawer
- the inset-group and selected-row tokens and surfaces
- sources import each other by relative path instead of $lib, which in an
  app points at the app's own src/lib
- theme.css no longer imports tw-animate-css: it is a peer dependency that
  the consumer imports before the theme, as it does Tailwind
- 0.3.0

ui/apps/chat
- imports the base components as @ggml-org/llama-ui/ui/<name> and cn/tv as
  @ggml-org/llama-ui/utils; app.css imports the library's theme.css
- compiles the library from source, with no install or build of it:
  scripts/vite-plugin-llama-ui.ts resolves its entry points and what it
  imports, and svelte.config.js gives TypeScript the same paths
- src/lib/components/ui, styles/tokens, styles/surfaces.css and assets/fonts
  are removed; components.json moves to the library

Builds
- CMake stages ui/lib/ui next to the app, keeping the layout of ui/, and
  rebuilds when a library source changes
- the Dockerfiles copy the library's sources; the Nix derivation takes ui/
  as its source

The built CSS has the same rules in the same order, apart from one
zero-specificity rule and the @font-face rules moving, plus ten utilities
and two tokens that only the library's own components use.

Assisted-by: Claude (Opus 5.5 Medium)
Llama Chat's AGENTS.md says where each part lives: Llama UI is
ui/lib/ui, and Chat imports its tokens, fonts and base components
from there.

Assisted-by: Claude (Opus 5.5 Medium)
…mmands marked in bash code

The fonts in ui/lib/ui come from llama-brand's latest, with optical sizes
from 10 to 36. Bash code blocks mark shell commands and flags.

Assisted-by: Claude (Opus 5.5 Medium)
A submenu was rendered inside its parent menu, so the menu's scroll box
clipped it: the glass menus' backdrop filter, and the filter and transform
of the open animation, make the menu the containing block even for the
fixed-position submenu. Dropdown and context submenus now render in a
portal, like the menus themselves.

Assisted-by: Claude (Opus 5.5 Medium)
Submenus had smaller corners than their menus, and context menus had none
of the dropdown's glass. Context-menu parts now match the dropdown's, and
both submenus take the menu's corners and height cap, with their first row
level with the row that opens them, 4px past the menu's edge. Sub-triggers
take the items' radius and pointer.

The submenus' height cap and zoom origin named the dropdown's CSS variables,
which bits-ui does not set on submenus; they now use its --bits-menu-* ones.
The chat group submenu takes the actions menu's z-[999999] layer, as it no
longer renders inside that menu.

Assisted-by: Claude (Opus 5.5 Medium)
updateCurrentNode checked the active conversation, awaited the database write, then wrote currNode to whatever was active after it. When the conversation closed during the write it threw, and the reply ended in a streaming error dialog. When another conversation opened, that one got the wrong node.

Assisted-by: Claude (Fable 5.2)
Llama Chat still kept its own copies of what the library holds above the
base components. It now takes them from @ggml-org/llama-ui too, and its
copies go.

ui/lib/ui
- ModelId gains what Chat's had: the model's own draft kind, draft
  sidecars with their quant (ModelDraftSidecars, new), aliases, hideName
  and a tooltip, in the same badge order
- entry points for them, like ui/<name>: @ggml-org/llama-ui/app/<group>
  (actions, content, forms, misc) and @ggml-org/llama-ui/models

ui/apps/chat
- ActionIcon, SearchInput, SyntaxHighlightedCode, Logo,
  ModelCapabilityIcons, ModelDownloadProgressBar and ModelDraftSidecars
  come from the library; Chat's copies and the two constants only they
  used are removed
- ModelId and ModelOrgAvatar stay as thin wrappers: ModelId parses the raw
  id and applies the user's display settings, ModelOrgAvatar hides the
  avatar while Hub metadata is off
- the svelte/* TypeScript path falls back to Svelte's types/index.d.ts:
  svelte/reactivity has no file of its own, so a library source importing
  it got its types from ui/lib/ui's own install when there was one

Assisted-by: Claude (Opus 5.5 Medium)
@ggml-org/llama-brand is now a dependency of the library, by the same GitHub
tarball Llama Chat already installs, which now names it @ggml-org/llama-brand
too.

- primitives.css drops the 25 tokens it held copies of (the neutral
  greys, sand, the skies and cinder) and builds on llama-brand's
  css/colors.css instead; the skies' gradients point at llama-brand's.
  Apps import that file before theme.css, as they do Tailwind and
  tw-animate-css: the library's stylesheets import no package, so an app
  that compiles them from source resolves it from its own node_modules
- Logo draws llama-brand's icon, in currentColor, and assets/logo.svg goes
- Llama Chat's TypeScript paths resolve llama-brand from its own
  node_modules, like the library's other dependencies

The fonts stay as the library's WOFF2 copies until llama-brand ships
WOFF2 builds of them.

Assisted-by: Claude (Opus 5.5 Medium)
Llama Chat redefined most of what the library exports next to its
components. Where the two were the same, Chat now re-exports the library's
from the files that held them, so its own imports stay as they are.

- the library gets entry points for them: @ggml-org/llama-ui/constants,
  @ggml-org/llama-ui/enums and @ggml-org/llama-ui/code, and
  @ggml-org/llama-ui/models carries the model data with the Model UI
- from the library now: the shared CSS classes and code-block constants,
  the byte units, the memory-fit constants and minMemoryTierGb, the bit
  depth labels, the capability and modality icons, labels and order,
  ColorMode, TooltipSide, BooleanString, the model enums, ModelModalities,
  formatParameters, highlightCode and trimCodePadding
- the library's modality order follows Chat's: vision, video, audio
- Chat keeps its own where they differ: UI_DATA_ATTRS and
  ModelDownloadProgress are supersets of the library's (the latter extends
  it now), and formatFileSize counts in 1024s

Assisted-by: Claude (Opus 5.5 Medium)
In light, the two keys inside the chat form, white on its white glass, took
the control elevation, whose soft spread blended into the form. They take a
new elevation-key instead: a 0.5px hairline all round and a 1px drop. In
dark they keep the control elevation. Chosen from the options in
Scrapbook › UI › Composer keys.

- semantic tokens: --elevation-key (light: the hairline and the drop; dark:
  the control elevation)
- component token: --chat-form-key-shadow, for the add key and every model
  selector trigger
- DESIGN.md names it next to the other elevations

Assisted-by: Claude (Opus 5.5 Medium)
@allozaur
allozaur force-pushed the allozaur/style/llama-ui-design-system-upstream branch from a648367 to 08894df Compare November 17, 2026 13:20
@allozaur
allozaur marked this pull request as ready for review November 17, 2026 13:31
@allozaur
allozaur requested review from a team and ngxson as code owners November 17, 2026 13:31
@allozaur
allozaur merged commit 7f106b5 into ggml-org:master Nov 17, 2026
31 of 36 checks passed
gabe-l-hart added a commit to gabe-l-hart/llama.cpp that referenced this pull request Nov 17, 2026
* origin/master: (138 commits)
qwen4exp : fix graph reallocation from the n-gram table scale (ggml-org#32483)
server : return 400 when grammar and ignore_eos are on (ggml-org#32377)
ggml-cuda: disable quantized matvec fusion on all Pascal GPUs (ggml-org#32239)
Title: CUDA: few-row MMQ for MUL_MAT_ID (ggml-org#32065)
ui: turn the live markdown preview off by default (ggml-org#32469)
CUDA: use block reductions for whole-row pool_1d (ggml-org#31855)
ggml : decode F8_E4M3 to fp32 without ldexpf (ggml-org#32477)
llama : keep the k-pool layout prefix on sequence edits (ggml-org#32137)
vocab : speed up PLaMo-2/3 tokenizer table build (ggml-org#32249)
convert : fix FP8 qwen4exp checkpoints (n-gram table scale, block-scaled FP8) (ggml-org#32476)
ui: Llama UI design system: tokens, surfaces and fonts (ggml-org#32468)
mtmd: support Minimax-Music3 (ggml-org#32435)
chat: add tts_dict for kokoro G2P template (ggml-org#32397)
Rotate K/V read order for better L2 cache hit rates (ggml-org#32407)
ui: turn conversation tabs off by default (ggml-org#32402)
ui: move Llama Chat to SvelteKit 3 and its built-in service worker (ggml-org#32463)
qwen3next : apply output projection weight scale (ggml-org#32393)
cuda : raise shared mem limit only for the launched kernel (ggml-org#32392)
nix: expose a SYCL package (ggml-org#31066)
vulkan: disable flip Flash Attention shader on AMD Windows due to a driver bug (ggml-org#32415)
...
dzannotti added a commit to halo-box/strix-llama.cpp that referenced this pull request Nov 17, 2026
Upstream: ggml-org/llama.cpp 054a1ba..7f106b5 (3 commits)

Conflicts:
- ui/apps/chat/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationActions.svelte: kept both imports: the fork ExternalLink icon (server dashboard link) and upstream ggml-org#32468's Button from @ggml-org/llama-ui.

Assisted-by: Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YKmjzcT1LTvKtbw9EzBVGE
@erusev

erusev commented Nov 18, 2026

Copy link
Copy Markdown
Member

npm ci fails for me on npm 11.17: llama-brand installs from GitHub instead of npm, and the allow-remote=root setting added for it in #32196 blocks it.

We only use four files from it: colors.css, the icon and the two favicons. Could we copy them in, like the fonts, and drop the dependency? It'd also keep the license simple: llama-brand is CC BY-NC, and llama.cpp is MIT.

More generally, I'd keep dependencies to the ones we really need -- each one is something everyone working on the UI has to install, and it can break like this.

@allozaur

Copy link
Copy Markdown
Contributor Author

npm ci fails for me on npm 11.17: llama-brand installs from GitHub instead of npm, and the allow-remote=root setting added for it in #32196 blocks it.

We only use four files from it: colors.css, the icon and the two favicons. Could we copy them in, like the fonts, and drop the dependency? It'd also keep the license simple: llama-brand is CC BY-NC, and llama.cpp is MIT.

More generally, I'd keep dependencies to the ones we really need -- each one is something everyone working on the UI has to install, and it can break like this.

I’d rather keep llama-brand as the single source than copy files in. The real culprit was the GitHub tarball, which npm 12 blocks by default. llama-brand is now on npm as @ggml-org/llama-brand (with its CSS relicensed to MIT; the icons were already fine to ship per its BRAND-USAGE.md), and #32544 switches the UI over to it, so no more allow-remote

Annieren pushed a commit to Annieren/llama.cpp-upstream that referenced this pull request Nov 23, 2026
* ui: bring @ggml-org/llama-ui into ui/lib/ui

The design system package (tokens, fonts, surfaces, components and Model UI), so far in the temporary ggml-org/llama-ui
repository at edaf518, moves to its home in ui/lib/ui, built with @sveltejs/package and published as @ggml-org/llama-ui
from here. ui/lib holds the packages, one folder each. Its references to tools/ui now name ui/apps/chat, its
package.json points at this repository, and the UI workflow type-checks and packs it. ui/README.md describes the
layout.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: Llama UI design system: tokens, surfaces and brand

The design system from allozaur/docs/storybook-overhaul: three tiers of
tokens, matte glass surfaces, Llama Sans and Llama Mono, and the base
components on the new tokens (Tabs and GlassKey among them). It also
restyles the stack's features with it, replacing the plain stand-ins they
used until now. DESIGN.md is generated from the tokens. The Storybook that
documents it is the next PR.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: have Llama Chat use @ggml-org/llama-ui for its base components, tokens and fonts

Llama Chat kept its own copy of the design system: 29 base components, the
three tiers of tokens, the surfaces, the theme and the fonts, next to the 12
components ui/lib/ui held. The copy goes, and the library gets what it lacked.

ui/lib/ui
- the 17 base components the app had and the library did not (alert,
  alert-dialog, button-group, checkbox, collapsible, context-menu, dialog,
  drawer, dropdown-menu, empty, hover-card, radio-group, scroll-area,
  skeleton, table, tabs, textarea), with vaul-svelte for the drawer
- the inset-group and selected-row tokens and surfaces
- sources import each other by relative path instead of $lib, which in an
  app points at the app's own src/lib
- theme.css no longer imports tw-animate-css: it is a peer dependency that
  the consumer imports before the theme, as it does Tailwind
- 0.3.0

ui/apps/chat
- imports the base components as @ggml-org/llama-ui/ui/<name> and cn/tv as
  @ggml-org/llama-ui/utils; app.css imports the library's theme.css
- compiles the library from source, with no install or build of it:
  scripts/vite-plugin-llama-ui.ts resolves its entry points and what it
  imports, and svelte.config.js gives TypeScript the same paths
- src/lib/components/ui, styles/tokens, styles/surfaces.css and assets/fonts
  are removed; components.json moves to the library

Builds
- CMake stages ui/lib/ui next to the app, keeping the layout of ui/, and
  rebuilds when a library source changes
- the Dockerfiles copy the library's sources; the Nix derivation takes ui/
  as its source

The built CSS has the same rules in the same order, apart from one
zero-specificity rule and the @font-face rules moving, plus ten utilities
and two tokens that only the library's own components use.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: AGENTS.md places Llama UI in ui/lib/ui

Llama Chat's AGENTS.md says where each part lives: Llama UI is
ui/lib/ui, and Chat imports its tokens, fonts and base components
from there.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: Llama Sans and Llama Mono from llama-brand's latest, and shell commands marked in bash code

The fonts in ui/lib/ui come from llama-brand's latest, with optical sizes
from 10 to 36. Bash code blocks mark shell commands and flags.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: open submenus outside the menu they come from

A submenu was rendered inside its parent menu, so the menu's scroll box
clipped it: the glass menus' backdrop filter, and the filter and transform
of the open animation, make the menu the containing block even for the
fixed-position submenu. Dropdown and context submenus now render in a
portal, like the menus themselves.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: draw submenus like the menu they open from

Submenus had smaller corners than their menus, and context menus had none
of the dropdown's glass. Context-menu parts now match the dropdown's, and
both submenus take the menu's corners and height cap, with their first row
level with the row that opens them, 4px past the menu's edge. Sub-triggers
take the items' radius and pointer.

The submenus' height cap and zoom origin named the dropdown's CSS variables,
which bits-ui does not set on submenus; they now use its --bits-menu-* ones.
The chat group submenu takes the actions menu's z-[999999] layer, as it no
longer renders inside that menu.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: keep a late current-node write off a closed or switched conversation

updateCurrentNode checked the active conversation, awaited the database write, then wrote currNode to whatever was active after it. When the conversation closed during the write it threw, and the reply ended in a streaming error dialog. When another conversation opened, that one got the wrong node.

Assisted-by: Claude (Fable 5.2)

* ui: have Llama Chat use the library's Model UI and app components

Llama Chat still kept its own copies of what the library holds above the
base components. It now takes them from @ggml-org/llama-ui too, and its
copies go.

ui/lib/ui
- ModelId gains what Chat's had: the model's own draft kind, draft
  sidecars with their quant (ModelDraftSidecars, new), aliases, hideName
  and a tooltip, in the same badge order
- entry points for them, like ui/<name>: @ggml-org/llama-ui/app/<group>
  (actions, content, forms, misc) and @ggml-org/llama-ui/models

ui/apps/chat
- ActionIcon, SearchInput, SyntaxHighlightedCode, Logo,
  ModelCapabilityIcons, ModelDownloadProgressBar and ModelDraftSidecars
  come from the library; Chat's copies and the two constants only they
  used are removed
- ModelId and ModelOrgAvatar stay as thin wrappers: ModelId parses the raw
  id and applies the user's display settings, ModelOrgAvatar hides the
  avatar while Hub metadata is off
- the svelte/* TypeScript path falls back to Svelte's types/index.d.ts:
  svelte/reactivity has no file of its own, so a library source importing
  it got its types from ui/lib/ui's own install when there was one

Assisted-by: Claude (Opus 5.5 Medium)

* ui: Llama UI takes the brand's colours and logo from llama-brand

@ggml-org/llama-brand is now a dependency of the library, by the same GitHub
tarball Llama Chat already installs, which now names it @ggml-org/llama-brand
too.

- primitives.css drops the 25 tokens it held copies of (the neutral
  greys, sand, the skies and cinder) and builds on llama-brand's
  css/colors.css instead; the skies' gradients point at llama-brand's.
  Apps import that file before theme.css, as they do Tailwind and
  tw-animate-css: the library's stylesheets import no package, so an app
  that compiles them from source resolves it from its own node_modules
- Logo draws llama-brand's icon, in currentColor, and assets/logo.svg goes
- Llama Chat's TypeScript paths resolve llama-brand from its own
  node_modules, like the library's other dependencies

The fonts stay as the library's WOFF2 copies until llama-brand ships
WOFF2 builds of them.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: have Llama Chat take the library's constants, enums and helpers

Llama Chat redefined most of what the library exports next to its
components. Where the two were the same, Chat now re-exports the library's
from the files that held them, so its own imports stay as they are.

- the library gets entry points for them: @ggml-org/llama-ui/constants,
  @ggml-org/llama-ui/enums and @ggml-org/llama-ui/code, and
  @ggml-org/llama-ui/models carries the model data with the Model UI
- from the library now: the shared CSS classes and code-block constants,
  the byte units, the memory-fit constants and minMemoryTierGb, the bit
  depth labels, the capability and modality icons, labels and order,
  ColorMode, TooltipSide, BooleanString, the model enums, ModelModalities,
  formatParameters, highlightCode and trimCodePadding
- the library's modality order follows Chat's: vision, video, audio
- Chat keeps its own where they differ: UI_DATA_ATTRS and
  ModelDownloadProgress are supersets of the library's (the latter extends
  it now), and formatFileSize counts in 1024s

Assisted-by: Claude (Opus 5.5 Medium)

* ui: give the chat form's add key and model selector a tighter shadow

In light, the two keys inside the chat form, white on its white glass, took
the control elevation, whose soft spread blended into the form. They take a
new elevation-key instead: a 0.5px hairline all round and a 1px drop. In
dark they keep the control elevation. Chosen from the options in
Scrapbook › UI › Composer keys.

- semantic tokens: --elevation-key (light: the hairline and the drop; dark:
  the control elevation)
- component token: --chat-form-key-shadow, for the add key and every model
  selector trigger
- DESIGN.md names it next to the other elevations

Assisted-by: Claude (Opus 5.5 Medium)
Nindaleth pushed a commit to Nindaleth/llama.cpp that referenced this pull request Nov 26, 2026
* ui: bring @ggml-org/llama-ui into ui/lib/ui

The design system package (tokens, fonts, surfaces, components and Model UI), so far in the temporary ggml-org/llama-ui
repository at edaf518, moves to its home in ui/lib/ui, built with @sveltejs/package and published as @ggml-org/llama-ui
from here. ui/lib holds the packages, one folder each. Its references to tools/ui now name ui/apps/chat, its
package.json points at this repository, and the UI workflow type-checks and packs it. ui/README.md describes the
layout.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: Llama UI design system: tokens, surfaces and brand

The design system from allozaur/docs/storybook-overhaul: three tiers of
tokens, matte glass surfaces, Llama Sans and Llama Mono, and the base
components on the new tokens (Tabs and GlassKey among them). It also
restyles the stack's features with it, replacing the plain stand-ins they
used until now. DESIGN.md is generated from the tokens. The Storybook that
documents it is the next PR.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: have Llama Chat use @ggml-org/llama-ui for its base components, tokens and fonts

Llama Chat kept its own copy of the design system: 29 base components, the
three tiers of tokens, the surfaces, the theme and the fonts, next to the 12
components ui/lib/ui held. The copy goes, and the library gets what it lacked.

ui/lib/ui
- the 17 base components the app had and the library did not (alert,
  alert-dialog, button-group, checkbox, collapsible, context-menu, dialog,
  drawer, dropdown-menu, empty, hover-card, radio-group, scroll-area,
  skeleton, table, tabs, textarea), with vaul-svelte for the drawer
- the inset-group and selected-row tokens and surfaces
- sources import each other by relative path instead of $lib, which in an
  app points at the app's own src/lib
- theme.css no longer imports tw-animate-css: it is a peer dependency that
  the consumer imports before the theme, as it does Tailwind
- 0.3.0

ui/apps/chat
- imports the base components as @ggml-org/llama-ui/ui/<name> and cn/tv as
  @ggml-org/llama-ui/utils; app.css imports the library's theme.css
- compiles the library from source, with no install or build of it:
  scripts/vite-plugin-llama-ui.ts resolves its entry points and what it
  imports, and svelte.config.js gives TypeScript the same paths
- src/lib/components/ui, styles/tokens, styles/surfaces.css and assets/fonts
  are removed; components.json moves to the library

Builds
- CMake stages ui/lib/ui next to the app, keeping the layout of ui/, and
  rebuilds when a library source changes
- the Dockerfiles copy the library's sources; the Nix derivation takes ui/
  as its source

The built CSS has the same rules in the same order, apart from one
zero-specificity rule and the @font-face rules moving, plus ten utilities
and two tokens that only the library's own components use.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: AGENTS.md places Llama UI in ui/lib/ui

Llama Chat's AGENTS.md says where each part lives: Llama UI is
ui/lib/ui, and Chat imports its tokens, fonts and base components
from there.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: Llama Sans and Llama Mono from llama-brand's latest, and shell commands marked in bash code

The fonts in ui/lib/ui come from llama-brand's latest, with optical sizes
from 10 to 36. Bash code blocks mark shell commands and flags.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: open submenus outside the menu they come from

A submenu was rendered inside its parent menu, so the menu's scroll box
clipped it: the glass menus' backdrop filter, and the filter and transform
of the open animation, make the menu the containing block even for the
fixed-position submenu. Dropdown and context submenus now render in a
portal, like the menus themselves.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: draw submenus like the menu they open from

Submenus had smaller corners than their menus, and context menus had none
of the dropdown's glass. Context-menu parts now match the dropdown's, and
both submenus take the menu's corners and height cap, with their first row
level with the row that opens them, 4px past the menu's edge. Sub-triggers
take the items' radius and pointer.

The submenus' height cap and zoom origin named the dropdown's CSS variables,
which bits-ui does not set on submenus; they now use its --bits-menu-* ones.
The chat group submenu takes the actions menu's z-[999999] layer, as it no
longer renders inside that menu.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: keep a late current-node write off a closed or switched conversation

updateCurrentNode checked the active conversation, awaited the database write, then wrote currNode to whatever was active after it. When the conversation closed during the write it threw, and the reply ended in a streaming error dialog. When another conversation opened, that one got the wrong node.

Assisted-by: Claude (Fable 5.2)

* ui: have Llama Chat use the library's Model UI and app components

Llama Chat still kept its own copies of what the library holds above the
base components. It now takes them from @ggml-org/llama-ui too, and its
copies go.

ui/lib/ui
- ModelId gains what Chat's had: the model's own draft kind, draft
  sidecars with their quant (ModelDraftSidecars, new), aliases, hideName
  and a tooltip, in the same badge order
- entry points for them, like ui/<name>: @ggml-org/llama-ui/app/<group>
  (actions, content, forms, misc) and @ggml-org/llama-ui/models

ui/apps/chat
- ActionIcon, SearchInput, SyntaxHighlightedCode, Logo,
  ModelCapabilityIcons, ModelDownloadProgressBar and ModelDraftSidecars
  come from the library; Chat's copies and the two constants only they
  used are removed
- ModelId and ModelOrgAvatar stay as thin wrappers: ModelId parses the raw
  id and applies the user's display settings, ModelOrgAvatar hides the
  avatar while Hub metadata is off
- the svelte/* TypeScript path falls back to Svelte's types/index.d.ts:
  svelte/reactivity has no file of its own, so a library source importing
  it got its types from ui/lib/ui's own install when there was one

Assisted-by: Claude (Opus 5.5 Medium)

* ui: Llama UI takes the brand's colours and logo from llama-brand

@ggml-org/llama-brand is now a dependency of the library, by the same GitHub
tarball Llama Chat already installs, which now names it @ggml-org/llama-brand
too.

- primitives.css drops the 25 tokens it held copies of (the neutral
  greys, sand, the skies and cinder) and builds on llama-brand's
  css/colors.css instead; the skies' gradients point at llama-brand's.
  Apps import that file before theme.css, as they do Tailwind and
  tw-animate-css: the library's stylesheets import no package, so an app
  that compiles them from source resolves it from its own node_modules
- Logo draws llama-brand's icon, in currentColor, and assets/logo.svg goes
- Llama Chat's TypeScript paths resolve llama-brand from its own
  node_modules, like the library's other dependencies

The fonts stay as the library's WOFF2 copies until llama-brand ships
WOFF2 builds of them.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: have Llama Chat take the library's constants, enums and helpers

Llama Chat redefined most of what the library exports next to its
components. Where the two were the same, Chat now re-exports the library's
from the files that held them, so its own imports stay as they are.

- the library gets entry points for them: @ggml-org/llama-ui/constants,
  @ggml-org/llama-ui/enums and @ggml-org/llama-ui/code, and
  @ggml-org/llama-ui/models carries the model data with the Model UI
- from the library now: the shared CSS classes and code-block constants,
  the byte units, the memory-fit constants and minMemoryTierGb, the bit
  depth labels, the capability and modality icons, labels and order,
  ColorMode, TooltipSide, BooleanString, the model enums, ModelModalities,
  formatParameters, highlightCode and trimCodePadding
- the library's modality order follows Chat's: vision, video, audio
- Chat keeps its own where they differ: UI_DATA_ATTRS and
  ModelDownloadProgress are supersets of the library's (the latter extends
  it now), and formatFileSize counts in 1024s

Assisted-by: Claude (Opus 5.5 Medium)

* ui: give the chat form's add key and model selector a tighter shadow

In light, the two keys inside the chat form, white on its white glass, took
the control elevation, whose soft spread blended into the form. They take a
new elevation-key instead: a 0.5px hairline all round and a 1px drop. In
dark they keep the control elevation. Chosen from the options in
Scrapbook › UI › Composer keys.

- semantic tokens: --elevation-key (light: the hairline and the drop; dark:
  the control elevation)
- component token: --chat-form-key-shadow, for the add key and every model
  selector trigger
- DESIGN.md names it next to the other elevations

Assisted-by: Claude (Opus 5.5 Medium)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops improvements to build systems and github actions documentation Improvements or additions to documentation nix Issues specific to consuming flake.nix, or generally concerned with ❄ Nix-based llama.cpp deployment server/ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants