From 402e3df11a849cf3d19ba1c0e3c1bbdbd6e89013 Mon Sep 17 00:00:00 2001 From: ggbdpq Date: Wed, 2 Sep 2026 06:59:50 +0800 Subject: [PATCH] fix(desktop): load desktop stories on Windows with a config-relative glob The desktop stories glob was built with resolve(REPO_ROOT, ...), which on Windows hands the globber a backslash absolute path; glob matchers treat backslashes as escape characters, so the pattern matched nothing and Storybook silently indexed only packages/ui/stories (53 entries, zero desktop story files). The neighboring packages/ui entry already uses a forward-slash config-relative glob, which is why those kept working. Use the same config-relative form for the desktop stories ('../stories/ **/*.stories.@(ts|tsx)'). index.json goes from 53 entries to 251 on Windows, including all 11 desktop story files; Linux behavior is unchanged since the relative glob resolves against the same config dir. Fixes #4516 Generated-by: GLM-5.3-Flash (ZCode) --- apps/desktop/.storybook/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/desktop/.storybook/main.ts b/apps/desktop/.storybook/main.ts index 8aa012a7dd..d1040d7eac 100644 --- a/apps/desktop/.storybook/main.ts +++ b/apps/desktop/.storybook/main.ts @@ -33,7 +33,7 @@ const STORYBOOK_NODE_CRYPTO_BOUNDARY = resolve( const config: StorybookConfig = { stories: [ '../../../packages/ui/stories/**/*.stories.@(ts|tsx)', - resolve(REPO_ROOT, 'apps/desktop/stories/**/*.stories.@(ts|tsx)'), + '../stories/**/*.stories.@(ts|tsx)', ], framework: { name: '@storybook/react-vite',