FN-8628: add Factory Dark dashboard theme

Add a low-light industrial dashboard color theme with first-paint support and release documentation.

- Register Factory Dark across persisted theme types, selector metadata, and desktop/dashboard bootstrap validators.
- Define dark and light Factory Dark tokens, swatches, and selector styling.
- Cover theme registration, tokens, bootstrap behavior, and UI theme-option counts.
- Add a minor @runfusion/fusion changeset and document the theme.

Files changed:
 .changeset/fn-8628-factory-dark-theme.md           |   7 ++
 docs/dashboard-guide.md                            |   3 +-
 docs/settings-reference.md                         |   2 +-
 packages/core/src/types/execution-and-ui.ts        |   2 +
 .../app/__tests__/factory-dark-theme.test.ts       | 106 +++++++++++++++++++++
 .../dashboard/app/components/ThemeSelector.css     |  14 +++
 .../components/__tests__/ThemeDropdown.test.tsx    |   2 +-
 .../components/__tests__/ThemeSelector.test.tsx    |   2 +-
 .../__tests__/CommandCenterControls.test.tsx       |   2 +-
 packages/dashboard/app/components/themeOptions.ts  |   1 +
 packages/dashboard/app/index.html                  |   2 +-
 packages/dashboard/app/public/theme-data.css       |  86 ++++++++++++++++-
 packages/desktop/src/renderer/index.html           |   1 +
 13 files changed, 223 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-8628

Fusion-Task-Lineage: 6f3c7cd9-0130-482d-8aa8-ca47d48b134f

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
This commit is contained in:
gsxdsm
2026-07-31 13:54:54 -07:00
parent 851369a480
commit 24ef266e48
13 changed files with 223 additions and 7 deletions

View File

@@ -0,0 +1,7 @@
---
"@runfusion/fusion": minor
---
summary: Add the Factory Dark dashboard color theme for low-light factory-style operation.
category: feature
dev: Registers the `factory-dark` id across core, selector, first-paint, token, and swatch registries.

View File

@@ -2108,9 +2108,10 @@ Tokens in the table are stable. Renaming or removing one requires a deprecation
<!-- FNXC:DashboardTheming 2026-07-20-00:00: Aurora is a built-in persisted palette with navy/teal/violet dark surfaces and a misty light counterpart; keep this inventory and its count synchronized with COLOR_THEMES. -->
<!-- FNXC:DashboardTheming 2026-07-20-00:00: Calm is a built-in persisted palette with slate/sage dark surfaces and a misty blue-white light counterpart; keep this inventory and its count synchronized with COLOR_THEMES. -->
<!-- FNXC:DashboardTheming 2026-07-20-00:00: Dawn is a built-in persisted palette with indigo/amber dark surfaces and a dawn-white light counterpart; keep this inventory and its count synchronized with COLOR_THEMES. -->
<!-- FNXC:DashboardTheming 2026-07-31-20:39: Factory Dark is a built-in persisted graphite/steel palette with safety-orange accents and a concrete-gray light counterpart; keep this inventory and its count synchronized with COLOR_THEMES. -->
<!-- FNXC:DashboardTheming 2026-07-21-12:20: FN-8471 keeps the Settings current-theme row and Command Center compact trigger on one filterable shared list so operators can discover any rendered theme name without changing the persisted selection until they choose an option. -->
Dark/light modes via `data-theme`; fresh installs default to System mode so the resolved theme follows `prefers-color-scheme` until the user explicitly chooses Light, Dark, or System. 84 color themes via `data-color-theme` (lazy-loaded from `app/public/theme-data.css`), including Cobalt (saturated blue), Clay (warm terracotta), Moss (muted forest green), Aurora (navy/teal/violet dark surfaces with a misty blue-white light counterpart), Calm (low-stimulation slate/sage dark surfaces with a misty blue-white light counterpart), and Dawn (indigo/plum dark surfaces with muted amber accents and a dawn-white light counterpart), the Shadcn zinc-neutral theme with an orange default highlight/accent, Shadcn Custom (the same base with sanitized per-token color-picker overrides), and its color family: Shadcn Blue/Green/Red/Purple/Pink/Orange/Yellow, Shadcn Mono and Shadcn Mono Red/Blue/Green/Purple/Pink/Orange/Yellow (grayscale surfaces with color-specific accents; Shadcn Mono retains its selected id), Shadcn Black (pure black and white), Shadcn Gray (fully neutral zinc-gray accent), and Shadcn Gray Blue (blue-gray slate neutral surfaces with a muted slate-blue accent). Air is the minimal, borderless, paper-like preset with near-monochrome tokens and CSS-only chrome flattening. Glass Silver preserves the Glass theme's frosted translucent surfaces and transparent modal overlay behavior while using silver and graphite accents instead of purple/pink.
Dark/light modes via `data-theme`; fresh installs default to System mode so the resolved theme follows `prefers-color-scheme` until the user explicitly chooses Light, Dark, or System. 85 color themes via `data-color-theme` (lazy-loaded from `app/public/theme-data.css`), including Cobalt (saturated blue), Clay (warm terracotta), Moss (muted forest green), Aurora (navy/teal/violet dark surfaces with a misty blue-white light counterpart), Calm (low-stimulation slate/sage dark surfaces with a misty blue-white light counterpart), Dawn (indigo/plum dark surfaces with muted amber accents and a dawn-white light counterpart), and Factory Dark (graphite/steel dark surfaces, cool gunmetal borders, and restrained safety-orange accents with a concrete-gray light counterpart), the Shadcn zinc-neutral theme with an orange default highlight/accent, Shadcn Custom (the same base with sanitized per-token color-picker overrides), and its color family: Shadcn Blue/Green/Red/Purple/Pink/Orange/Yellow, Shadcn Mono and Shadcn Mono Red/Blue/Green/Purple/Pink/Orange/Yellow (grayscale surfaces with color-specific accents; Shadcn Mono retains its selected id), Shadcn Black (pure black and white), Shadcn Gray (fully neutral zinc-gray accent), and Shadcn Gray Blue (blue-gray slate neutral surfaces with a muted slate-blue accent). Air is the minimal, borderless, paper-like preset with near-monochrome tokens and CSS-only chrome flattening. Glass Silver preserves the Glass theme's frosted translucent surfaces and transparent modal overlay behavior while using silver and graphite accents instead of purple/pink.
Choose color themes from **Settings → Appearance** or from the Command Center **Overview** theme card. Settings merges its selector into the current-theme row, which opens the full color-theme list; Command Center keeps the compact `ThemeDropdown` trigger. Both use the same filterable list: type a visible theme name to narrow the displayed labels and color-chip swatches, then select an option to change the theme. Filtering alone never changes the chosen theme. The left sidebar active-item highlight and resize accent use the active theme's `--accent`, so they follow the selected Shadcn accent instead of staying fixed blue.

View File

@@ -67,7 +67,7 @@ Defaults from `DEFAULT_GLOBAL_SETTINGS`; key scope from `GLOBAL_SETTINGS_KEYS`.
|---|---|---:|---|
| <a id="anthropicauthpreference"></a>`anthropicAuthPreference` | `"api-key" \| "subscription"` | `"api-key"` | Which Anthropic credential wins when BOTH a raw API key and a Claude subscription OAuth login are configured. `"api-key"` keeps the historical precedence; `"subscription"` moves the raw key below the OAuth steps so a stale or revoked saved key cannot shadow a working subscription (the `401 invalid x-api-key` failure mode). Global, because credentials live in the global `~/.fusion/agent/auth.json`. Never removes a source — with one credential configured, resolution reaches it under either value. Surfaced in Settings → Authentication, where the two Anthropic cards show which credential is in use; the control appears only when both are connected. |
| `themeMode` | `"dark" \| "light" \| "system"` | `"system"` | Dashboard theme mode. Fresh installs follow the operating system light/dark preference until the user chooses Light, Dark, or System. |
| `colorTheme` | `ColorTheme` | `"shadcn-ember"` | Dashboard color theme preset. Aurora is a built-in navy/teal/violet palette with a misty light counterpart; Calm is a low-stimulation slate/sage palette with a misty light counterpart; Dawn uses indigo/plum dark surfaces, amber accents, and dawn-white light surfaces. Use `"shadcn-custom"` to show the separate custom shadcn color picker in Settings → Appearance and the Command Center theme card. |
| `colorTheme` | `ColorTheme` | `"shadcn-ember"` | Dashboard color theme preset. Aurora is a built-in navy/teal/violet palette with a misty light counterpart; Calm is a low-stimulation slate/sage palette with a misty light counterpart; Dawn uses indigo/plum dark surfaces, amber accents, and dawn-white light surfaces; Factory Dark uses graphite/steel surfaces, cool gunmetal borders, and restrained safety-orange accents with a concrete-gray light counterpart. Use `"shadcn-custom"` to show the separate custom shadcn color picker in Settings → Appearance and the Command Center theme card. |
| `shadcnCustomColors` | `Record<string, string>` | `undefined` | Optional shadcn design-token override map for `"shadcn-custom"` only. Keys are CSS token names such as `--accent`, `--bg`, `--surface`, `--card`, `--border`, `--text`, `--text-muted`, workflow status tokens, and `--color-success`/`--color-warning`/`--color-error`; values must be sanitized `#RGB` or `#RRGGBB` hex colors. Missing or invalid entries fall back to the `shadcn-custom` base defaults and are not applied to other themes. |
| `language` | `"en" \| "zh-CN" \| "zh-TW" \| "fr" \| "es" \| "ko"` | `undefined` | UI language for the dashboard and TUI. When unset, the dashboard detects from localStorage → browser language and the CLI from `--lang` flag → environment locale, falling back to `en`. Validated at the store write boundary (`validateLocale`); invalid values are dropped. Reset to auto-detect via the dashboard's "Auto" language option or `fn settings set language auto` (clears the persisted key). |
| `dashboardFontScalePct` | `number` | `100` | Dashboard font scale percentage used by Appearance settings. Valid range: `85` to `125`; applied pre-hydration via document root font-size so board typography (column headers/counts, task cards, and quick-entry text) scales with the setting from first paint. |

View File

@@ -142,6 +142,8 @@ export const COLOR_THEMES = [
"calm",
// FNXC:DashboardTheming 2026-07-20-00:00: Dawn is persisted immediately after Calm; keep this ID and order synchronized across core, selectors, and both first-paint validators so saved selections survive pre-hydration validation.
"dawn",
// FNXC:DashboardTheming 2026-07-31-20:39: Factory Dark must stay order-synchronized across core, selector metadata, and both first-paint validators so saved preferences survive pre-hydration validation.
"factory-dark",
"shadcn",
// FNXC:DashboardTheming 2026-06-30-00:00: Shadcn Ember is the default for unset installs; keep it adjacent to the shadcn base so dashboard options and bootstrap validators preserve published theme order while explicit legacy ids remain valid.
"shadcn-ember",

View File

@@ -0,0 +1,106 @@
import { readFileSync } from "node:fs";
import path from "node:path";
import { describe, expect, it } from "vitest";
import { COLOR_THEMES as CORE_COLOR_THEMES } from "@fusion/core";
import { COLOR_THEMES as DASHBOARD_COLOR_THEMES } from "../components/themeOptions";
const themeDataPath = path.resolve(__dirname, "../public/theme-data.css");
const themeSelectorPath = path.resolve(__dirname, "../components/ThemeSelector.css");
const dashboardIndexPath = path.resolve(__dirname, "../index.html");
const desktopIndexPath = path.resolve(__dirname, "../../../desktop/src/renderer/index.html");
const settingsReferencePath = path.resolve(__dirname, "../../../../docs/settings-reference.md");
/*
FNXC:DashboardTheming 2026-07-31-20:39:
Factory Dark is valid only when persistence, first-paint validators, selector metadata, tokens, and globally resolvable previews agree. This source contract catches a partial registration before a saved operator preference can flash or fall back.
*/
describe("Factory Dark color theme", () => {
const themeData = readFileSync(themeDataPath, "utf-8");
const themeSelector = readFileSync(themeSelectorPath, "utf-8");
const dashboardIndexHtml = readFileSync(dashboardIndexPath, "utf-8");
const desktopIndexHtml = readFileSync(desktopIndexPath, "utf-8");
const settingsReference = readFileSync(settingsReferencePath, "utf-8");
it("keeps persisted, selector, and first-paint registries in exact order", () => {
const coreIds = [...CORE_COLOR_THEMES];
const dashboardIds = DASHBOARD_COLOR_THEMES.map((theme) => theme.value);
const dashboardValidThemes = extractValidThemes(dashboardIndexHtml);
const desktopValidThemes = extractValidThemes(desktopIndexHtml);
expect(CORE_COLOR_THEMES.filter((theme) => theme === "factory-dark")).toHaveLength(1);
expect(DASHBOARD_COLOR_THEMES).toContainEqual({
value: "factory-dark",
label: "Factory Dark",
className: "theme-swatch-factory-dark",
});
expect(dashboardIds).toEqual(coreIds);
expect(dashboardValidThemes).toEqual(coreIds);
expect(desktopValidThemes).toEqual(coreIds);
for (const ids of [coreIds, dashboardIds, dashboardValidThemes, desktopValidThemes]) {
expect(new Set(ids).size).toBe(ids.length);
}
expect(dashboardIndexHtml).toContain("colorTheme = 'shadcn-ember'");
expect(desktopIndexHtml).toContain('colorTheme = "shadcn-ember"');
});
it("defines complete readable dark and light Factory Dark token blocks", () => {
const darkBlock = extractSelectorBlock(themeData, '[data-color-theme="factory-dark"]');
const lightBlock = extractSelectorBlock(themeData, '[data-color-theme="factory-dark"][data-theme="light"]');
const requiredTokens = [
"--bg:", "--surface:", "--card:", "--card-hover:", "--surface-hover:", "--border:", "--text:", "--text-muted:", "--text-dim:",
"--todo:", "--in-progress:", "--in-progress-rgb:", "--in-review:", "--triage:", "--done:", "--color-success:", "--color-warning:", "--color-error:", "--color-info:",
"--cta-bg:", "--cta-border:", "--cta-text:", "--cta-bg-hover:", "--cta-border-hover:", "--cta-glow:", "--accent:", "--accent-text:", "--logo-accent:", "--shadow-glow:", "--focus-ring:", "--focus-ring-strong:",
];
for (const block of [darkBlock, lightBlock]) {
for (const token of requiredTokens) expect(block).toContain(token);
}
for (const block of [darkBlock, lightBlock]) expect(block).not.toContain("rgba(");
expect(darkBlock).toContain("--bg: #0d0f10;");
expect(darkBlock).toContain("--accent: #e89532;");
expect(lightBlock).toContain("--bg: #eceef0;");
expect(lightBlock).toContain("--accent: #a95612;");
});
it("uses mode-specific global Factory Dark preview properties for an unselected swatch", () => {
const darkGlobals = extractSelectorBlock(themeData, ":root");
const lightGlobals = extractSelectorBlock(themeData, '[data-theme="light"]');
const darkSwatch = extractSelectorBlock(themeSelector, ".theme-swatch-factory-dark");
const lightSwatch = extractSelectorBlock(themeSelector, '[data-theme="light"] .theme-swatch-factory-dark');
for (const block of [darkGlobals, lightGlobals]) {
for (const sample of [1, 2, 3, 4]) expect(block).toContain(`--factory-dark-swatch-sample-${sample}:`);
}
for (const block of [darkSwatch, lightSwatch]) {
for (const sample of [1, 2, 3, 4]) {
expect(block).toContain(`--swatch-sample-${sample}: var(--factory-dark-swatch-sample-${sample});`);
}
expect(block).not.toContain("var(--accent)");
expect(block).not.toContain("var(--bg)");
}
});
it("lists Factory Dark in the published color-theme settings catalog", () => {
const colorThemeRow = settingsReference.split("\n").find((line) => line.startsWith("| `colorTheme` |"));
expect(colorThemeRow).toContain("Factory Dark");
});
});
function extractValidThemes(html: string): string[] {
const match = html.match(/var validThemes = \[([\s\S]*?)\];/);
if (!match) throw new Error("Could not find pre-hydration validThemes array");
return [...match[1].matchAll(/["']([^"']+)["']/g)].map((themeMatch) => themeMatch[1]);
}
function extractSelectorBlock(css: string, selector: string): string {
const startIdx = css.indexOf(`${selector} {`);
if (startIdx === -1) throw new Error(`Could not find selector block: ${selector}`);
const openBraceIdx = css.indexOf("{", startIdx);
let depth = 1;
for (let index = openBraceIdx + 1; index < css.length; index++) {
if (css[index] === "{") depth++;
if (css[index] === "}") depth--;
if (depth === 0) return css.slice(startIdx, index + 1);
}
throw new Error(`Could not find closing brace for selector block: ${selector}`);
}

View File

@@ -333,6 +333,13 @@
--swatch-sample-4: var(--dawn-swatch-sample-4);
}
.theme-swatch-factory-dark {
--swatch-sample-1: var(--factory-dark-swatch-sample-1);
--swatch-sample-2: var(--factory-dark-swatch-sample-2);
--swatch-sample-3: var(--factory-dark-swatch-sample-3);
--swatch-sample-4: var(--factory-dark-swatch-sample-4);
}
.theme-swatch-silver {
--swatch-sample-1: #27272a;
--swatch-sample-2: #3f3f46;
@@ -1181,6 +1188,13 @@
--swatch-sample-4: var(--dawn-swatch-sample-4);
}
[data-theme="light"] .theme-swatch-factory-dark {
--swatch-sample-1: var(--factory-dark-swatch-sample-1);
--swatch-sample-2: var(--factory-dark-swatch-sample-2);
--swatch-sample-3: var(--factory-dark-swatch-sample-3);
--swatch-sample-4: var(--factory-dark-swatch-sample-4);
}
[data-theme="light"] .theme-swatch-silver {
--swatch-sample-1: #fafafa;
--swatch-sample-2: #f4f4f5;

View File

@@ -6,7 +6,7 @@ import { ThemeDropdown } from "../ThemeDropdown";
import { readAppFile } from "../../test/cssFixture";
// FNXC:Theme 2026-07-16-14:30: FN-8146 pins the historical Settings-grid set, including restored shadcn-mono, so a removal from COLOR_THEMES cannot make the all-themes checks pass circularly.
const EXPECTED_THEME_IDS = ['default', 'ocean', 'forest', 'sunset', 'zen', 'berry', 'high-contrast', 'industrial', 'monochrome', 'slate', 'ash', 'air', 'graphite', 'silver', 'solarized', 'factory', 'factory-mono', 'ayu', 'one-dark', 'nord', 'dracula', 'gruvbox', 'tokyo-night', 'catppuccin-mocha', 'github-dark', 'everforest', 'rose-pine', 'kanagawa', 'night-owl', 'palenight', 'monokai-pro', 'slime', 'brutalist', 'neon-city', 'parchment', 'terminal', 'glass', 'glass-silver', 'horizon', 'vitesse', 'outrun', 'snazzy', 'porple', 'espresso', 'mars', 'poimandres', 'ember', 'rust', 'copper', 'foundry', 'carbon', 'sandstone', 'lagoon', 'frost', 'lavender', 'neon-bloom', 'sepia', 'cobalt', 'clay', 'moss', 'aurora', 'calm', 'dawn', 'shadcn', 'shadcn-ember', 'shadcn-custom', 'shadcn-blue', 'shadcn-green', 'shadcn-red', 'shadcn-purple', 'shadcn-pink', 'shadcn-orange', 'shadcn-yellow', 'shadcn-mono', 'shadcn-mono-red', 'shadcn-mono-blue', 'shadcn-mono-green', 'shadcn-mono-purple', 'shadcn-mono-pink', 'shadcn-mono-orange', 'shadcn-mono-yellow', 'shadcn-black', 'shadcn-gray', 'shadcn-gray-blue'] as const;
const EXPECTED_THEME_IDS = ['default', 'ocean', 'forest', 'sunset', 'zen', 'berry', 'high-contrast', 'industrial', 'monochrome', 'slate', 'ash', 'air', 'graphite', 'silver', 'solarized', 'factory', 'factory-mono', 'ayu', 'one-dark', 'nord', 'dracula', 'gruvbox', 'tokyo-night', 'catppuccin-mocha', 'github-dark', 'everforest', 'rose-pine', 'kanagawa', 'night-owl', 'palenight', 'monokai-pro', 'slime', 'brutalist', 'neon-city', 'parchment', 'terminal', 'glass', 'glass-silver', 'horizon', 'vitesse', 'outrun', 'snazzy', 'porple', 'espresso', 'mars', 'poimandres', 'ember', 'rust', 'copper', 'foundry', 'carbon', 'sandstone', 'lagoon', 'frost', 'lavender', 'neon-bloom', 'sepia', 'cobalt', 'clay', 'moss', 'aurora', 'calm', 'dawn', 'factory-dark', 'shadcn', 'shadcn-ember', 'shadcn-custom', 'shadcn-blue', 'shadcn-green', 'shadcn-red', 'shadcn-purple', 'shadcn-pink', 'shadcn-orange', 'shadcn-yellow', 'shadcn-mono', 'shadcn-mono-red', 'shadcn-mono-blue', 'shadcn-mono-green', 'shadcn-mono-purple', 'shadcn-mono-pink', 'shadcn-mono-orange', 'shadcn-mono-yellow', 'shadcn-black', 'shadcn-gray', 'shadcn-gray-blue'] as const;
function renderedThemeIds(listbox: HTMLElement) {
return within(listbox).getAllByRole("option").map((option) => {

View File

@@ -4,7 +4,7 @@ import type { ColorTheme } from "@fusion/core";
import { ThemeSelector } from "../ThemeSelector";
// FNXC:Theme 2026-07-16-14:30: FN-8146 pins the historical Settings-grid set, including restored shadcn-mono, so a removal from COLOR_THEMES cannot make the all-themes checks pass circularly.
const EXPECTED_THEME_IDS = ['default', 'ocean', 'forest', 'sunset', 'zen', 'berry', 'high-contrast', 'industrial', 'monochrome', 'slate', 'ash', 'air', 'graphite', 'silver', 'solarized', 'factory', 'factory-mono', 'ayu', 'one-dark', 'nord', 'dracula', 'gruvbox', 'tokyo-night', 'catppuccin-mocha', 'github-dark', 'everforest', 'rose-pine', 'kanagawa', 'night-owl', 'palenight', 'monokai-pro', 'slime', 'brutalist', 'neon-city', 'parchment', 'terminal', 'glass', 'glass-silver', 'horizon', 'vitesse', 'outrun', 'snazzy', 'porple', 'espresso', 'mars', 'poimandres', 'ember', 'rust', 'copper', 'foundry', 'carbon', 'sandstone', 'lagoon', 'frost', 'lavender', 'neon-bloom', 'sepia', 'cobalt', 'clay', 'moss', 'aurora', 'calm', 'dawn', 'shadcn', 'shadcn-ember', 'shadcn-custom', 'shadcn-blue', 'shadcn-green', 'shadcn-red', 'shadcn-purple', 'shadcn-pink', 'shadcn-orange', 'shadcn-yellow', 'shadcn-mono', 'shadcn-mono-red', 'shadcn-mono-blue', 'shadcn-mono-green', 'shadcn-mono-purple', 'shadcn-mono-pink', 'shadcn-mono-orange', 'shadcn-mono-yellow', 'shadcn-black', 'shadcn-gray', 'shadcn-gray-blue'] as const;
const EXPECTED_THEME_IDS = ['default', 'ocean', 'forest', 'sunset', 'zen', 'berry', 'high-contrast', 'industrial', 'monochrome', 'slate', 'ash', 'air', 'graphite', 'silver', 'solarized', 'factory', 'factory-mono', 'ayu', 'one-dark', 'nord', 'dracula', 'gruvbox', 'tokyo-night', 'catppuccin-mocha', 'github-dark', 'everforest', 'rose-pine', 'kanagawa', 'night-owl', 'palenight', 'monokai-pro', 'slime', 'brutalist', 'neon-city', 'parchment', 'terminal', 'glass', 'glass-silver', 'horizon', 'vitesse', 'outrun', 'snazzy', 'porple', 'espresso', 'mars', 'poimandres', 'ember', 'rust', 'copper', 'foundry', 'carbon', 'sandstone', 'lagoon', 'frost', 'lavender', 'neon-bloom', 'sepia', 'cobalt', 'clay', 'moss', 'aurora', 'calm', 'dawn', 'factory-dark', 'shadcn', 'shadcn-ember', 'shadcn-custom', 'shadcn-blue', 'shadcn-green', 'shadcn-red', 'shadcn-purple', 'shadcn-pink', 'shadcn-orange', 'shadcn-yellow', 'shadcn-mono', 'shadcn-mono-red', 'shadcn-mono-blue', 'shadcn-mono-green', 'shadcn-mono-purple', 'shadcn-mono-pink', 'shadcn-mono-orange', 'shadcn-mono-yellow', 'shadcn-black', 'shadcn-gray', 'shadcn-gray-blue'] as const;
function renderedThemeIds(listbox: HTMLElement) {
return within(listbox).getAllByRole("option").map((option) => {

View File

@@ -69,7 +69,7 @@ function expectCommandCenterUseOffset(testId: string, ratio: number) {
}
// FNXC:Theme 2026-07-16-14:30: FN-8146 pins the historical Settings-grid set, including restored shadcn-mono, so a removal from COLOR_THEMES cannot make the all-themes checks pass circularly.
const EXPECTED_THEME_IDS = ['default', 'ocean', 'forest', 'sunset', 'zen', 'berry', 'high-contrast', 'industrial', 'monochrome', 'slate', 'ash', 'air', 'graphite', 'silver', 'solarized', 'factory', 'factory-mono', 'ayu', 'one-dark', 'nord', 'dracula', 'gruvbox', 'tokyo-night', 'catppuccin-mocha', 'github-dark', 'everforest', 'rose-pine', 'kanagawa', 'night-owl', 'palenight', 'monokai-pro', 'slime', 'brutalist', 'neon-city', 'parchment', 'terminal', 'glass', 'glass-silver', 'horizon', 'vitesse', 'outrun', 'snazzy', 'porple', 'espresso', 'mars', 'poimandres', 'ember', 'rust', 'copper', 'foundry', 'carbon', 'sandstone', 'lagoon', 'frost', 'lavender', 'neon-bloom', 'sepia', 'cobalt', 'clay', 'moss', 'aurora', 'calm', 'dawn', 'shadcn', 'shadcn-ember', 'shadcn-custom', 'shadcn-blue', 'shadcn-green', 'shadcn-red', 'shadcn-purple', 'shadcn-pink', 'shadcn-orange', 'shadcn-yellow', 'shadcn-mono', 'shadcn-mono-red', 'shadcn-mono-blue', 'shadcn-mono-green', 'shadcn-mono-purple', 'shadcn-mono-pink', 'shadcn-mono-orange', 'shadcn-mono-yellow', 'shadcn-black', 'shadcn-gray', 'shadcn-gray-blue'] as const;
const EXPECTED_THEME_IDS = ['default', 'ocean', 'forest', 'sunset', 'zen', 'berry', 'high-contrast', 'industrial', 'monochrome', 'slate', 'ash', 'air', 'graphite', 'silver', 'solarized', 'factory', 'factory-mono', 'ayu', 'one-dark', 'nord', 'dracula', 'gruvbox', 'tokyo-night', 'catppuccin-mocha', 'github-dark', 'everforest', 'rose-pine', 'kanagawa', 'night-owl', 'palenight', 'monokai-pro', 'slime', 'brutalist', 'neon-city', 'parchment', 'terminal', 'glass', 'glass-silver', 'horizon', 'vitesse', 'outrun', 'snazzy', 'porple', 'espresso', 'mars', 'poimandres', 'ember', 'rust', 'copper', 'foundry', 'carbon', 'sandstone', 'lagoon', 'frost', 'lavender', 'neon-bloom', 'sepia', 'cobalt', 'clay', 'moss', 'aurora', 'calm', 'dawn', 'factory-dark', 'shadcn', 'shadcn-ember', 'shadcn-custom', 'shadcn-blue', 'shadcn-green', 'shadcn-red', 'shadcn-purple', 'shadcn-pink', 'shadcn-orange', 'shadcn-yellow', 'shadcn-mono', 'shadcn-mono-red', 'shadcn-mono-blue', 'shadcn-mono-green', 'shadcn-mono-purple', 'shadcn-mono-pink', 'shadcn-mono-orange', 'shadcn-mono-yellow', 'shadcn-black', 'shadcn-gray', 'shadcn-gray-blue'] as const;
function renderedThemeIds(listbox: HTMLElement) {
return within(listbox).getAllByRole("option").map((option) => {

View File

@@ -78,6 +78,7 @@ export const COLOR_THEMES: { value: ColorTheme; label: string; className: string
{ value: "aurora", label: "Aurora", className: "theme-swatch-aurora" },
{ value: "calm", label: "Calm", className: "theme-swatch-calm" },
{ value: "dawn", label: "Dawn", className: "theme-swatch-dawn" },
{ value: "factory-dark", label: "Factory Dark", className: "theme-swatch-factory-dark" },
{ value: "shadcn", label: "Shadcn", className: "theme-swatch-shadcn" },
{ value: "shadcn-ember", label: "Shadcn Ember (Default)", className: "theme-swatch-shadcn-ember" },
{ value: "shadcn-custom", label: "Shadcn Custom", className: "theme-swatch-shadcn-custom" },

View File

@@ -164,7 +164,7 @@
mode = 'system';
}
var colorTheme = localStorage.getItem('kb-dashboard-color-theme') || 'shadcn-ember';
var validThemes = ['default', 'ocean', 'forest', 'sunset', 'zen', 'berry', 'high-contrast', 'industrial', 'monochrome', 'slate', 'ash', 'air', 'graphite', 'silver', 'solarized', 'factory', 'factory-mono', 'ayu', 'one-dark', 'nord', 'dracula', 'gruvbox', 'tokyo-night', 'catppuccin-mocha', 'github-dark', 'everforest', 'rose-pine', 'kanagawa', 'night-owl', 'palenight', 'monokai-pro', 'slime', 'brutalist', 'neon-city', 'parchment', 'terminal', 'glass', 'glass-silver', 'horizon', 'vitesse', 'outrun', 'snazzy', 'porple', 'espresso', 'mars', 'poimandres', 'ember', 'rust', 'copper', 'foundry', 'carbon', 'sandstone', 'lagoon', 'frost', 'lavender', 'neon-bloom', 'sepia', 'cobalt', 'clay', 'moss', 'aurora', 'calm', 'dawn', 'shadcn', 'shadcn-ember', 'shadcn-custom', 'shadcn-blue', 'shadcn-green', 'shadcn-red', 'shadcn-purple', 'shadcn-pink', 'shadcn-orange', 'shadcn-yellow', 'shadcn-mono', 'shadcn-mono-red', 'shadcn-mono-blue', 'shadcn-mono-green', 'shadcn-mono-purple', 'shadcn-mono-pink', 'shadcn-mono-orange', 'shadcn-mono-yellow', 'shadcn-black', 'shadcn-gray', 'shadcn-gray-blue'];
var validThemes = ['default', 'ocean', 'forest', 'sunset', 'zen', 'berry', 'high-contrast', 'industrial', 'monochrome', 'slate', 'ash', 'air', 'graphite', 'silver', 'solarized', 'factory', 'factory-mono', 'ayu', 'one-dark', 'nord', 'dracula', 'gruvbox', 'tokyo-night', 'catppuccin-mocha', 'github-dark', 'everforest', 'rose-pine', 'kanagawa', 'night-owl', 'palenight', 'monokai-pro', 'slime', 'brutalist', 'neon-city', 'parchment', 'terminal', 'glass', 'glass-silver', 'horizon', 'vitesse', 'outrun', 'snazzy', 'porple', 'espresso', 'mars', 'poimandres', 'ember', 'rust', 'copper', 'foundry', 'carbon', 'sandstone', 'lagoon', 'frost', 'lavender', 'neon-bloom', 'sepia', 'cobalt', 'clay', 'moss', 'aurora', 'calm', 'dawn', 'factory-dark', 'shadcn', 'shadcn-ember', 'shadcn-custom', 'shadcn-blue', 'shadcn-green', 'shadcn-red', 'shadcn-purple', 'shadcn-pink', 'shadcn-orange', 'shadcn-yellow', 'shadcn-mono', 'shadcn-mono-red', 'shadcn-mono-blue', 'shadcn-mono-green', 'shadcn-mono-purple', 'shadcn-mono-pink', 'shadcn-mono-orange', 'shadcn-mono-yellow', 'shadcn-black', 'shadcn-gray', 'shadcn-gray-blue'];
// FNXC:DashboardTheming 2026-06-30-00:00: Unset startup theme is Shadcn Ember; explicit stored legacy ids such as "default" and "ocean" remain valid and must not be migrated.
// FNXC:DashboardTheming 2026-07-16-14:30: FN-8146 restores Shadcn Mono as a distinct persisted choice, so bootstrap must retain its stored id instead of remapping it to Mono Red.
if (!validThemes.includes(colorTheme)) {

View File

@@ -8,7 +8,7 @@
Theme token translucency uses color-mix(in srgb, var(--token) N%, transparent) or exact literal color-mix values for glass surfaces. Raw RGB alpha color functions are banned outside var() fallbacks by FN-6489.
============================================================ */
/* Aurora, Calm, and Dawn swatches stay globally resolvable while a different theme is active. */
/* Aurora, Calm, Dawn, and Factory Dark swatches stay globally resolvable while a different theme is active. */
:root {
--aurora-swatch-sample-1: #0a1022;
--aurora-swatch-sample-2: #162044;
@@ -22,6 +22,10 @@
--dawn-swatch-sample-2: #2a2248;
--dawn-swatch-sample-3: #efb66a;
--dawn-swatch-sample-4: #c8a4ff;
--factory-dark-swatch-sample-1: #0d0f10;
--factory-dark-swatch-sample-2: #1a1d1f;
--factory-dark-swatch-sample-3: #e89532;
--factory-dark-swatch-sample-4: #7fa6b8;
}
[data-theme="light"] {
@@ -37,6 +41,10 @@
--dawn-swatch-sample-2: #f1ddd7;
--dawn-swatch-sample-3: #9b5618;
--dawn-swatch-sample-4: #704eaa;
--factory-dark-swatch-sample-1: #eceef0;
--factory-dark-swatch-sample-2: #d9dde0;
--factory-dark-swatch-sample-3: #a95612;
--factory-dark-swatch-sample-4: #35687d;
}
/* OCEAN - Deep blues and cyans */
@@ -7592,6 +7600,82 @@ Dawn pairs deep indigo and plum dark surfaces with muted peach, amber, and viole
--focus-ring-strong: 0 0 0 2px color-mix(in srgb, var(--accent) 36%, transparent);
}
/*
FNXC:DashboardTheming 2026-07-31-20:39:
Factory Dark is the low-ambient-light industrial sibling of Factory: graphite and steel surfaces, cool gunmetal borders, and restrained safety-orange actions. Its concrete-gray light counterpart keeps the same visual identity with readable dark text; global previews remain independent of the active theme.
*/
[data-color-theme="factory-dark"] {
--bg: #0d0f10;
--surface: #141719;
--card: #1a1d1f;
--card-hover: #252a2d;
--surface-hover: color-mix(in srgb, var(--surface) 90%, var(--text) 10%);
--border: #3b454a;
--text: #f2f3f2;
--text-muted: #b6bec1;
--text-dim: #7d898e;
--todo: #8db6ca;
--in-progress: #6eb2ca;
--in-progress-rgb: 110, 178, 202;
--in-review: #a8b8c0;
--triage: #e89532;
--done: #89969a;
--color-success: #8fbf9a;
--color-warning: #e89532;
--color-error: #e47a6e;
--color-info: #6eb2ca;
--cta-bg: #d77b20;
--cta-border: #f1ad5a;
--cta-text: #1a1007;
--cta-bg-hover: #e89532;
--cta-border-hover: #ffd08c;
--cta-glow: 0 0 8px color-mix(in srgb, var(--cta-border) 30%, transparent);
--accent: #e89532;
--accent-text: #1a1007;
--logo-accent: var(--accent);
--shadow-glow: 0 0 12px color-mix(in srgb, var(--accent) 28%, transparent);
--focus-ring: 0 0 0 2px color-mix(in srgb, var(--accent) 24%, transparent);
--focus-ring-strong: 0 0 0 2px color-mix(in srgb, var(--accent) 36%, transparent);
}
[data-color-theme="factory-dark"][data-theme="light"] {
--bg: #eceef0;
--surface: #e2e5e7;
--card: #f7f8f8;
--card-hover: #d9dde0;
--surface-hover: color-mix(in srgb, var(--surface) 92%, var(--text) 8%);
--border: #aeb8bd;
--text: #20282c;
--text-muted: #536168;
--text-dim: #738087;
--todo: #35687d;
--in-progress: #24728c;
--in-progress-rgb: 36, 114, 140;
--in-review: #526871;
--triage: #a95612;
--done: #68767b;
--color-success: #386c48;
--color-warning: #a95612;
--color-error: #ad403a;
--color-info: #24728c;
--cta-bg: #a95612;
--cta-border: #85430d;
--cta-text: #ffffff;
--cta-bg-hover: #8f480e;
--cta-border-hover: #6f370a;
--cta-glow: 0 0 8px color-mix(in srgb, var(--cta-border) 24%, transparent);
--accent: #a95612;
--accent-text: #ffffff;
--logo-accent: var(--accent);
--shadow-glow: 0 0 10px color-mix(in srgb, var(--accent) 20%, transparent);
--focus-ring: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
--focus-ring-strong: 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent);
}
[data-color-theme="dawn"][data-theme="light"] {
--bg: #fff8f2;
--surface: #faeee8;

View File

@@ -78,6 +78,7 @@
"aurora",
"calm",
"dawn",
"factory-dark",
"shadcn",
"shadcn-ember",
"shadcn-custom",