Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

🧾 test: Require Every Appearance Key to Be Listed as Documented (#17357)

Marco Beretta920a82b93769
diff --git a/e2e/specs/mock/scenarios/theme-docs-keys.spec.ts b/e2e/specs/mock/scenarios/theme-docs-keys.spec.ts
new file mode 100644
index 0000000000..23750d5bf6
--- /dev/null
+++ b/e2e/specs/mock/scenarios/theme-docs-keys.spec.ts
@@ -0,0 +1,24 @@
+import { expect, test } from '@playwright/test';
+import { readFileSync } from 'node:fs';
+import { resolve } from 'node:path';
+
+const DOCUMENTED_PATH = resolve(
+ __dirname,
+ '../../../../packages/data-provider/specs/themedocs.json',
+);
+const REGISTRY_PATH = resolve(
+ __dirname,
+ '../../../../packages/data-provider/src/themes/registry.ts',
+);
+
+test.describe('theme docs appearance keys', () => {
+ test('@scenario:theme-docs-keys-listed lists each documented key once and in the registry', () => {
+ const documented = JSON.parse(readFileSync(DOCUMENTED_PATH, 'utf8')) as string[];
+ const registry = readFileSync(REGISTRY_PATH, 'utf8');
+
+ expect(documented.length).toBeGreaterThan(0);
+ expect(new Set(documented).size).toBe(documented.length);
+ const missing = documented.filter((key) => !new RegExp(`\\b${key}\\b`).test(registry));
+ expect(missing).toEqual([]);
+ });
+});
diff --git a/packages/data-provider/specs/themedocs.json b/packages/data-provider/specs/themedocs.json
new file mode 100644
index 0000000000..db55655a47
--- /dev/null
+++ b/packages/data-provider/specs/themedocs.json
@@ -0,0 +1,113 @@
+[
+ "alertScrimOpacity",
+ "authActionHeight",
+ "authActionRadius",
+ "authButtonHeight",
+ "authControlRadius",
+ "authFieldHeight",
+ "buttonHeight",
+ "buttonHeightCompact",
+ "buttonHeightLg",
+ "buttonHeightSm",
+ "buttonHeightXs",
+ "buttonNeutralBorderOpacity",
+ "buttonPaddingX",
+ "checkboxFillStyle",
+ "checkboxRadius",
+ "checkboxSize",
+ "chromeBorderAlpha",
+ "compactPanelRadius",
+ "composerActionRadius",
+ "controlFontWeight",
+ "controlGap",
+ "controlHeight",
+ "controlPaddingX",
+ "controlRadius",
+ "destructiveStyle",
+ "dialogHeaderGap",
+ "dialogPaddingX",
+ "dialogStroke",
+ "dialogTitleFontFamily",
+ "dialogTitleFontWeight",
+ "dialogTitleLeading",
+ "dialogTitleSize",
+ "disabledStyle",
+ "displayFontFamily",
+ "elevationDrag",
+ "elevationSurface",
+ "fieldFillStyle",
+ "fieldFocusStyle",
+ "fieldHeight",
+ "fieldHeightLg",
+ "fieldPaddingY",
+ "focusRingOffset",
+ "focusRingWidth",
+ "fontFamily",
+ "iconButtonSizeSm",
+ "iconSize",
+ "iconSizeLg",
+ "iconSizeMd",
+ "inlineCodeWeight",
+ "insetBorderAlpha",
+ "labelFontWeight",
+ "labelLeading",
+ "labelSize",
+ "largeSurfaceRadius",
+ "leading2xl",
+ "leading3xl",
+ "leadingBase",
+ "leadingLg",
+ "leadingSm",
+ "leadingXl",
+ "leadingXs",
+ "listMaxHeight",
+ "listMinWidth",
+ "menuPanelRadius",
+ "menuRadius",
+ "menuShadow",
+ "modalScrimOpacity",
+ "monoFontFamily",
+ "motionFast",
+ "motionNormal",
+ "popoverRadius",
+ "radius2xl",
+ "radius3xl",
+ "radiusLg",
+ "radiusMd",
+ "radiusSm",
+ "radiusXl",
+ "roundControlRadius",
+ "scrimOpacity",
+ "shadow2xl",
+ "shadow2xs",
+ "shadowLg",
+ "shadowMd",
+ "shadowSm",
+ "shadowXl",
+ "shadowXs",
+ "spaceCompact",
+ "spaceNormal",
+ "surfaceRadius",
+ "switchHeight",
+ "switchWidth",
+ "tabMinWidth",
+ "tabRadius",
+ "tableCellSpaceY",
+ "tableRowStroke",
+ "text1sm",
+ "text1xs",
+ "text2xl",
+ "text2xs",
+ "text3xl",
+ "text3xs",
+ "textBase",
+ "textLg",
+ "textSm",
+ "textXl",
+ "textXs",
+ "tooltipPaddingX",
+ "tooltipPaddingY",
+ "tooltipRadius",
+ "tooltipShadow",
+ "tooltipTextSize"
+]
diff --git a/packages/data-provider/specs/themedocs.spec.ts b/packages/data-provider/specs/themedocs.spec.ts
new file mode 100644
index 0000000000..330c16aef7
--- /dev/null
+++ b/packages/data-provider/specs/themedocs.spec.ts
@@ -0,0 +1,18 @@
+import documented from './themedocs.json';
+import { themeAppearanceProperties } from '../src/themes/registry';
+
+/**
+ * `themedocs.json` lists the appearance keys the librechat.ai theme page documents. A new
+ * appearance role fails here until the page has a row for it and the key is added to the list.
+ */
+describe('appearance keys documented on the theme page', () => {
+ const keys = Object.keys(themeAppearanceProperties);
+
+ it('lists every appearance key', () => {
+ expect(keys.filter((key) => !documented.includes(key))).toEqual([]);
+ });
+
+ it('lists no key the schema dropped', () => {
+ expect(documented.filter((key) => !keys.includes(key))).toEqual([]);
+ });
+});