refactor(webui): separate presentation views and expand component gallery (#6179)

* refactor(webui): organize shared components with an internal gallery

* refactor(webui): decouple views and expand component gallery

* fix(docker): include channel sources in WebUI build

* refactor(webui): cover all channel interfaces in gallery

* docs(webui): remove manual paragraph wrapping
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-14 00:11:00 +08:00
1 parent db804ef94a
commit 30e43aec82
109 files changed
+7874 -3459

No files matched your search

+3 -2
View File
@@ -3,6 +3,7 @@ import react from "@vitejs/plugin-react";
import { readFileSync, writeFileSync } from "node:fs";
import path from "node:path";
import { gzipSync } from "node:zlib";
import { componentGallery } from "./src/dev/gallery/inventory-plugin";
const GZIP_MIN_BYTES = 4 * 1024;
const GZIP_ASSET_PATTERN = /\.(?:css|html|js|json|mjs|svg)$/i;
@@ -119,7 +120,7 @@ export default defineConfig(({ mode }) => {
const hmrPath = "/__nanobot_vite_hmr";
return {
plugins: [react(), guardWebuiEntryChunk(), gzipWebuiAssets()],
plugins: [react(), componentGallery(path.resolve(__dirname, "..")), guardWebuiEntryChunk(), gzipWebuiAssets()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
@@ -176,7 +177,7 @@ export default defineConfig(({ mode }) => {
coverage: {
provider: "v8",
include: ["src/**/*.{ts,tsx}"],
exclude: ["src/tests/**", "src/**/*.d.ts"],
exclude: ["src/tests/**", "src/dev/**", "src/**/*.d.ts"],
reporter: ["text", "json-summary"],
thresholds: {
statements: 85,