Repository navigation
Conversation
allozaur
force-pushed
the
allozaur/docs/llama-ui-storybook-upstream
branch
2 times, most recently
from
November 17, 2026 17:30
d74bb3c to
69f6f24
Compare
The library gets its Storybook (`npm run storybook`, `npm run build-storybook`) with a story for everything it holds, under Llama UI: the foundations, the 29 base components (as actions, forms, display, overlays and navigation), the app components (ActionIcon, SearchInput, SyntaxHighlightedCode), the Model UI and the native app mockups. The stories import the package by its published names, aliased onto src/lib, run as tests under `npm test` (the storybook project in vite.config.ts), and are type-checked with the rest of the package. `npm run dev` starts Storybook next to the SvelteKit check page; the toolbar switches the color mode and the surface theme, and pages that are mostly prose are .svx, through mdsvex. Assisted-by: Claude (Opus 5.5 Medium)
Llama Chat's Storybook gets an introduction, Agents › Design guidelines (DESIGN.md), Llama UI's stories as the library has them, and Llama Chat: its own foundations (safe areas, the splash screens), then one section per src/lib/components/app/<area> (Chat with the chat screen, form, messages, attachments and tabs; Content, Models, MCP, Navigation, Settings, Dialogs, Forms, Actions, Badges, Misc, Servers and PWA), each accessibility story next to its component's. It replaces the flat pages it had (chat message, chat form, markdown content, the PWA refresh alert and their fixtures, and the ChatForm single-row exploration). The stories run on the new tokens and surfaces with the color mode and surface theme in the toolbar (by mode-watcher's key, the ColorMode and SurfaceTheme enums and applySurfaceTheme), and pages that are mostly prose are .svx in an editorial frame (AGENTS.md says how to write them and where a story goes). The story tests run Llama Chat's stories and leave the library's to the library. The brand and communications pages are in ggml-org/llama-brand; the logo files come from @ggml-org/llama-brand. Assisted-by: Claude (Opus 5.5 Medium)
The ContinueConversation story ended while its reply was still being stored, and the next story reset the stores under it. It now waits for the reply to finish. Assisted-by: Claude (Fable 5.2)
allozaur
force-pushed
the
allozaur/docs/llama-ui-storybook-upstream
branch
from
November 17, 2026 22:00
69f6f24 to
cfcb6c2
Compare
A new UI Storybook workflow builds ui/apps/chat's Storybook whenever ui/apps/chat or ui/lib/ui changes on master (or on demand) and uploads it to the static Space ggml-org/Llama-UI-storybook, with a Space card naming the commit it was built from. Files the new build no longer has are removed; the Space's .gitattributes stays. It runs only in ggml-org/llama.cpp, takes the UI's Hugging Face token (HF_TOKEN_UI_STATIC_OUTPUT), and the Space can be changed with the HF_SPACE_UI_STORYBOOK variable. Assisted-by: Claude (Opus 5.5 Medium)
The Library checks job type-checked and packed ui/lib/ui but never ran its tests, so the library's stories, which now hold every library component's, went untested in CI. It installs Chromium and runs `npm test`. Assisted-by: Claude (Opus 5.5 Medium)
Menus, popovers, dialogs and the other matte-float panels carry a 1px border that the surface made transparent, and drew their inner highlight as an inset shadow. An inset shadow sits inside the border, so the 1px of fill between it and the outer ring showed as a second edge. The border now draws the highlight, right inside the ring. Assisted-by: Claude (Opus 5.5 Medium)
allozaur
force-pushed
the
allozaur/docs/llama-ui-storybook-upstream
branch
from
November 17, 2026 22:35
cfcb6c2 to
2ee78eb
Compare
allozaur
marked this pull request as ready for review
November 17, 2026 23:17
ServeurpersoCom
approved these changes
Nov 18, 2026
This was referenced Nov 18, 2026
Annieren
pushed a commit
to Annieren/llama.cpp-upstream
that referenced
this pull request
Nov 23, 2026
* ui: Llama UI's own Storybook in ui/lib/ui The library gets its Storybook (`npm run storybook`, `npm run build-storybook`) with a story for everything it holds, under Llama UI: the foundations, the 29 base components (as actions, forms, display, overlays and navigation), the app components (ActionIcon, SearchInput, SyntaxHighlightedCode), the Model UI and the native app mockups. The stories import the package by its published names, aliased onto src/lib, run as tests under `npm test` (the storybook project in vite.config.ts), and are type-checked with the rest of the package. `npm run dev` starts Storybook next to the SvelteKit check page; the toolbar switches the color mode and the surface theme, and pages that are mostly prose are .svx, through mdsvex. Assisted-by: Claude (Opus 5.5 Medium) * ui: a Storybook for Llama Chat Llama Chat's Storybook gets an introduction, Agents › Design guidelines (DESIGN.md), Llama UI's stories as the library has them, and Llama Chat: its own foundations (safe areas, the splash screens), then one section per src/lib/components/app/<area> (Chat with the chat screen, form, messages, attachments and tabs; Content, Models, MCP, Navigation, Settings, Dialogs, Forms, Actions, Badges, Misc, Servers and PWA), each accessibility story next to its component's. It replaces the flat pages it had (chat message, chat form, markdown content, the PWA refresh alert and their fixtures, and the ChatForm single-row exploration). The stories run on the new tokens and surfaces with the color mode and surface theme in the toolbar (by mode-watcher's key, the ColorMode and SurfaceTheme enums and applySurfaceTheme), and pages that are mostly prose are .svx in an editorial frame (AGENTS.md says how to write them and where a story goes). The story tests run Llama Chat's stories and leave the library's to the library. The brand and communications pages are in ggml-org/llama-brand; the logo files come from @ggml-org/llama-brand. Assisted-by: Claude (Opus 5.5 Medium) * ui: let the ChatScreen story store its reply before the next one starts The ContinueConversation story ended while its reply was still being stored, and the next story reset the stores under it. It now waits for the reply to finish. Assisted-by: Claude (Fable 5.2) * ui: publish the Storybook to its Hugging Face Space on every UI change A new UI Storybook workflow builds ui/apps/chat's Storybook whenever ui/apps/chat or ui/lib/ui changes on master (or on demand) and uploads it to the static Space ggml-org/Llama-UI-storybook, with a Space card naming the commit it was built from. Files the new build no longer has are removed; the Space's .gitattributes stays. It runs only in ggml-org/llama.cpp, takes the UI's Hugging Face token (HF_TOKEN_UI_STATIC_OUTPUT), and the Space can be changed with the HF_SPACE_UI_STORYBOOK variable. Assisted-by: Claude (Opus 5.5 Medium) * ui: run the library's tests, its stories among them, in CI The Library checks job type-checked and packed ui/lib/ui but never ran its tests, so the library's stories, which now hold every library component's, went untested in CI. It installs Chromium and runs `npm test`. Assisted-by: Claude (Opus 5.5 Medium) * ui: draw a floating panel's rim on its border, so its edge is one line Menus, popovers, dialogs and the other matte-float panels carry a 1px border that the surface made transparent, and drew their inner highlight as an inset shadow. An inset shadow sits inside the border, so the 1px of fill between it and the outer ring showed as a second edge. The border now draws the highlight, right inside the ring. Assisted-by: Claude (Opus 5.5 Medium)
Nindaleth
pushed a commit
to Nindaleth/llama.cpp
that referenced
this pull request
Nov 26, 2026
* ui: Llama UI's own Storybook in ui/lib/ui The library gets its Storybook (`npm run storybook`, `npm run build-storybook`) with a story for everything it holds, under Llama UI: the foundations, the 29 base components (as actions, forms, display, overlays and navigation), the app components (ActionIcon, SearchInput, SyntaxHighlightedCode), the Model UI and the native app mockups. The stories import the package by its published names, aliased onto src/lib, run as tests under `npm test` (the storybook project in vite.config.ts), and are type-checked with the rest of the package. `npm run dev` starts Storybook next to the SvelteKit check page; the toolbar switches the color mode and the surface theme, and pages that are mostly prose are .svx, through mdsvex. Assisted-by: Claude (Opus 5.5 Medium) * ui: a Storybook for Llama Chat Llama Chat's Storybook gets an introduction, Agents › Design guidelines (DESIGN.md), Llama UI's stories as the library has them, and Llama Chat: its own foundations (safe areas, the splash screens), then one section per src/lib/components/app/<area> (Chat with the chat screen, form, messages, attachments and tabs; Content, Models, MCP, Navigation, Settings, Dialogs, Forms, Actions, Badges, Misc, Servers and PWA), each accessibility story next to its component's. It replaces the flat pages it had (chat message, chat form, markdown content, the PWA refresh alert and their fixtures, and the ChatForm single-row exploration). The stories run on the new tokens and surfaces with the color mode and surface theme in the toolbar (by mode-watcher's key, the ColorMode and SurfaceTheme enums and applySurfaceTheme), and pages that are mostly prose are .svx in an editorial frame (AGENTS.md says how to write them and where a story goes). The story tests run Llama Chat's stories and leave the library's to the library. The brand and communications pages are in ggml-org/llama-brand; the logo files come from @ggml-org/llama-brand. Assisted-by: Claude (Opus 5.5 Medium) * ui: let the ChatScreen story store its reply before the next one starts The ContinueConversation story ended while its reply was still being stored, and the next story reset the stores under it. It now waits for the reply to finish. Assisted-by: Claude (Fable 5.2) * ui: publish the Storybook to its Hugging Face Space on every UI change A new UI Storybook workflow builds ui/apps/chat's Storybook whenever ui/apps/chat or ui/lib/ui changes on master (or on demand) and uploads it to the static Space ggml-org/Llama-UI-storybook, with a Space card naming the commit it was built from. Files the new build no longer has are removed; the Space's .gitattributes stays. It runs only in ggml-org/llama.cpp, takes the UI's Hugging Face token (HF_TOKEN_UI_STATIC_OUTPUT), and the Space can be changed with the HF_SPACE_UI_STORYBOOK variable. Assisted-by: Claude (Opus 5.5 Medium) * ui: run the library's tests, its stories among them, in CI The Library checks job type-checked and packed ui/lib/ui but never ran its tests, so the library's stories, which now hold every library component's, went untested in CI. It installs Chromium and runs `npm test`. Assisted-by: Claude (Opus 5.5 Medium) * ui: draw a floating panel's rim on its border, so its edge is one line Menus, popovers, dialogs and the other matte-float panels carry a 1px border that the surface made transparent, and drew their inner highlight as an inset shadow. An inset shadow sits inside the border, so the 1px of fill between it and the outer ring showed as a second edge. The border now draws the highlight, right inside the ring. Assisted-by: Claude (Opus 5.5 Medium)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Llama UI and Llama Chat get Storybooks with two jobs: documentation that people and coding agents read for context, and a test environment in which every story runs as a test. It follows #32468, which brought in Llama UI without its Storybook.
Additional information
flowchart LR subgraph code["In the repo, next to the code"] D["DESIGN.md"] L["Llama UI stories<br/>ui/lib/ui"] C["Llama Chat stories and pages<br/>ui/apps/chat"] end subgraph docs["Documentation, for people and agents"] SB["Llama Chat's Storybook<br/>Llama UI and Llama Chat sections"] HF["Hugging Face Space<br/>ggml-org/llama-ui-storybook"] end subgraph tests["Testing, in CI"] LT["Library checks<br/>npm test"] CT["E2E Tests<br/>story tests"] end D --> SB L --> SB C --> SB SB -->|"on master"| HF L --> LT C --> CTDESIGN.md). It's published to a Hugging Face Space on every UI change onmaster.npm test, now in CI, and Llama Chat's in its story tests.Six commits, each reviewable alone: the library's Storybook, Llama Chat's, a story fix, the deploy workflow, the library's tests in CI and a fix to the floating panels' edge. The deploy needs
HF_TOKEN_UI_STATIC_OUTPUTto have write access to the Space. The brand pages live inggml-org/llama-brand, with their own Storybook.What changed
ui/lib/ui/tests/stories): Foundations, Components (the 29 base components as Actions, Forms, Display, Overlays and Navigation), App components (ActionIcon, SearchInput, SyntaxHighlightedCode), Models and Mockups.ui/apps/chat/tests/stories): its own Foundations (Safe areas, Brand), then one folder persrc/lib/components/app/<area>: Chat (screen, form, messages, attachments, tabs), Content, Models, MCP, Navigation, Settings, Dialogs, Forms, Actions, Badges, Misc, Servers and PWA. Each accessibility story sits next to its component's.@ggml-org/llama-ui/..., aliased ontosrc/lib), run as its tests (npm test, in Chromium) and are covered by its type check.AGENTS.mdsays where a new story goes.DESIGN.md). They replace the flat pages the Storybook had: chat message, chat form, markdown content, the PWA refresh alert and their fixtures, and the ChatForm single-row exploration.ColorModeandSurfaceThemeenums andapplySurfaceThemefrom the app..svx(Markdown with Svelte components in it, through mdsvex), set in an editorial frame.@ggml-org/llama-brand, which Llama Chat already depends on.ui/apps/chat's Storybook wheneverui/apps/chatorui/lib/uichanges onmaster, and on demand. It uploads the build to the static Spaceggml-org/llama-ui-storybookand removes files the new build no longer has. It runs only inggml-org/llama.cpp.matte-floatpanels drew their inner highlight as an inset shadow inside a transparent 1px border, so the fill between it and the outer ring showed as a second edge. The border now draws the highlight, right inside the ring, and the edge is one line.Known gaps
npm run checkinui/apps/chatpasses as CI runs it, with only Chat's dependencies installed. Ifui/lib/ui/node_modulesis also installed, it reports errors from a second copy of Svelte (5.57.2 in the library, 5.57.3 in Chat). That also happens on master.Testing
ui/lib/ui: the type check (stories included) and prepack pass, and so do its 63 tests, story tests included. Its Storybook builds.ui/apps/chat, with only its own dependencies installed as in CI:npm run build-storybookbuilds with the library's stories in it (218 entries), andnpm run storybookserves.Requirements
Claude (Opus 5.5 Medium)