From bedf797f46a78ccd005469fc6bfe95ec8c014b80 Mon Sep 17 00:00:00 2001 From: EthanHealy01 Date: Tue, 14 Jul 2026 13:34:29 +0100 Subject: [PATCH] fix(storybook): manager.tsx imports relatively (esbuild manager has no aliases) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The prior change aliased manager.tsx to @core, but Storybook's manager bundle (esbuild) doesn't resolve aliases — only the preview/Vite bundle does — so the storybook build failed. Revert manager.tsx to a relative import and scope a one-file no-restricted-imports exemption to .storybook/manager.tsx (the only file that genuinely can't use an alias). preview.tsx keeps @public (Vite-built). Verified: eslint clean + storybook build succeeds. --- frontend/.storybook/manager.tsx | 2 +- frontend/eslint.config.mjs | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/.storybook/manager.tsx b/frontend/.storybook/manager.tsx index 4f6b515203..663e629047 100644 --- a/frontend/.storybook/manager.tsx +++ b/frontend/.storybook/manager.tsx @@ -11,7 +11,7 @@ import { IconButton, WithTooltip } from "storybook/internal/components"; import { THEME_ACCENT_PRESETS as PRESETS, DEFAULT_ACCENT_COLOR, -} from "@core/constants/theme"; +} from "../editor/src/core/constants/theme"; function AccentPicker() { const [globals, updateGlobals] = useGlobals(); diff --git a/frontend/eslint.config.mjs b/frontend/eslint.config.mjs index 9793c60ac8..73b77ac83a 100644 --- a/frontend/eslint.config.mjs +++ b/frontend/eslint.config.mjs @@ -324,4 +324,13 @@ export default defineConfig( }, }, }, + // Storybook's MANAGER is bundled by esbuild with no alias resolution (only the + // preview/Vite bundle resolves @app/@core/etc). manager.tsx must therefore + // import editor code relatively — an alias would fail the manager build. + { + files: [".storybook/manager.tsx"], + rules: { + "no-restricted-imports": "off", + }, + }, );