Skip to content

Commit 900c28e

Browse files
committed
(scripted) Restructure frontend so processor and editor are more distinct in the tree
1 parent 98c1e56 commit 900c28e

3,254 files changed

Lines changed: 10256 additions & 10140 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
File renamed without changes.

frontend/.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/storybook-static
1616

1717
/editor/build
18-
/editor/dist
18+
/dist
1919

2020
# misc
2121
.DS_Store
@@ -40,12 +40,12 @@ playwright-report
4040
test-results
4141

4242
# auto-generated files
43-
/editor/src/assets/material-symbols-icons.json
44-
/editor/src/assets/material-symbols-icons.d.ts
43+
/src/assets/material-symbols-icons.json
44+
/src/assets/material-symbols-icons.d.ts
4545

4646
# dev update testing - keys, built bundles, screenshots, and generated config override
4747
/scripts/dev-update-test/.keys/
4848
/scripts/dev-update-test/.update-dist/
4949
/scripts/dev-update-test/screenshots/
50-
/editor/src-tauri/tauri.conf.dev-update.json
50+
/src-tauri/tauri.conf.dev-update.json
5151
.a11y-scan/

frontend/.prettierignore

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
dist/
2-
editor/dist/
2+
dist/
33
# Tauri/Cargo build output (binary assets named *.js etc. confuse Prettier).
44
# Match nested target/ dirs too - provisioner/ and thumbnail-handler/ each
55
# have their own Cargo workspace under src-tauri/.
6-
editor/src-tauri/**/target/
7-
editor/src-tauri/gen/
6+
src-tauri/**/target/
7+
src-tauri/gen/
88
node_modules/
9-
editor/public/vendor/
9+
public/vendor/
1010
# Auto-generated by MSW (`msw init`); regenerated verbatim, not hand-formatted.
11-
editor/public/mockServiceWorker.js
11+
public/mockServiceWorker.js
1212
# Auto-generated OG/social-preview metadata (scripts/generate-og-metadata.mjs); regenerated verbatim.
13-
editor/public/og-metadata.json
14-
editor/public/og-metadata.saas.json
15-
editor/src/core/data/ogImageMap.json
13+
public/og-metadata.json
14+
public/og-metadata.saas.json
15+
src/editor/core/data/ogImageMap.json
1616
# Auto-generated portal docs manifest (scripts/sync-portal-docs.mts); regenerated verbatim.
17-
editor/src/portal/generated/docsManifest.json
18-
editor/public/pdfjs*/
19-
editor/public/js/thirdParty/
20-
editor/public/css/cookieconsent.css
17+
src/processor/proprietary/generated/docsManifest.json
18+
public/pdfjs*/
19+
public/js/thirdParty/
20+
public/css/cookieconsent.css
2121
# Build / test artifacts that may exist locally even though they're gitignored
2222
storybook-static/
2323
playwright-report/
24-
editor/playwright-report/
24+
playwright-report/
25+
test-results/
2526
test-results/
26-
editor/test-results/
2727
*.min.*
2828
*.md
2929
*.wxs
30-
editor/src/output.css
30+
src/output.css

frontend/.storybook/a11y-baseline.json

Lines changed: 850 additions & 840 deletions
Large diffs are not rendered by default.

frontend/.storybook/a11y-scan.mjs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,14 @@ if (args.length > 0) {
5959
// checked before it is added to the index.
6060
files = [
6161
...new Set([
62-
...git(
63-
"ls-files",
64-
"--",
65-
"editor/src/**/*.stories.ts",
66-
"editor/src/**/*.stories.tsx",
67-
),
62+
...git("ls-files", "--", "src/**/*.stories.ts", "src/**/*.stories.tsx"),
6863
...git(
6964
"ls-files",
7065
"--others",
7166
"--exclude-standard",
7267
"--",
73-
"editor/src/**/*.stories.ts",
74-
"editor/src/**/*.stories.tsx",
68+
"src/**/*.stories.ts",
69+
"src/**/*.stories.tsx",
7570
),
7671
]),
7772
].sort();

frontend/.storybook/main.ts

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import tsconfigPaths from "vite-tsconfig-paths";
66
* Storybook 9 ships essentials, interactions, and docs as built-ins, so the
77
* addon list is just the extras we want: theme switching + a11y auditing.
88
*
9-
* Story files live next to their components under editor/src/ (which includes
10-
* the portal layer at editor/src/portal/). MDX docs pages live in
11-
* editor/src/portal/docs/.
9+
* Story files live next to their components under src/editor/ (which includes
10+
* the portal layer at src/processor/proprietary/). MDX docs pages live in
11+
* src/processor/proprietary/docs/.
1212
*/
1313
const config: StorybookConfig = {
1414
stories: [
15-
"../editor/src/portal/**/*.mdx",
16-
"../editor/src/**/*.stories.@(ts|tsx)",
15+
"../src/processor/proprietary/**/*.mdx",
16+
"../src/**/*.stories.@(ts|tsx)",
1717
],
1818
addons: [
1919
"@storybook/addon-themes",
@@ -29,25 +29,25 @@ const config: StorybookConfig = {
2929
},
3030
// Serve the MSW worker file from the portal's public dir so Storybook can
3131
// intercept network calls the same way the dev portal does.
32-
staticDirs: ["../editor/public"],
32+
staticDirs: ["../public"],
3333
viteFinal: async (config) => {
34-
// Wire the @portal/* alias directly on the Storybook bundler so portal
34+
// Wire the @processor/* alias directly on the Storybook bundler so portal
3535
// story imports resolve without needing the portal's vite config.
3636
config.resolve = config.resolve ?? {};
3737
config.resolve.alias = {
3838
...(config.resolve.alias ?? {}),
39-
"@portal": resolve(__dirname, "../editor/src/portal"),
39+
"@processor": resolve(__dirname, "../src/processor/proprietary"),
4040
// Direct layer aliases so .storybook config files (preview.tsx), which sit
4141
// outside src/ and so aren't covered by tsconfigPaths, can import layer
4242
// modules (e.g. the auth supabase client that moved into proprietary).
43-
"@proprietary": resolve(__dirname, "../editor/src/proprietary"),
44-
"@core": resolve(__dirname, "../editor/src/core"),
43+
"@proprietary": resolve(__dirname, "../src/editor/proprietary"),
44+
"@core": resolve(__dirname, "../src/editor/core"),
4545
// Public assets (e.g. the en-US translation TOML loaded ?raw by preview.tsx).
4646
// No src alias covers public/, so this lets the config use an alias rather
4747
// than a relative path.
48-
"@public": resolve(__dirname, "../editor/public"),
48+
"@public": resolve(__dirname, "../public"),
4949
};
50-
// Editor stories import via @app/* (proprietary→core fallback), @core/* and
50+
// Editor stories import via @editor/* (proprietary→core fallback), @core/* and
5151
// @proprietary/*. Resolve them exactly the way the editor's own build does —
5252
// through vite-tsconfig-paths against the proprietary vite tsconfig — so the
5353
// shared Storybook can host editor components without duplicating the alias
@@ -67,9 +67,7 @@ const config: StorybookConfig = {
6767
});
6868
config.plugins.push(
6969
tsconfigPaths({
70-
projects: [
71-
resolve(__dirname, "../editor/tsconfig.proprietary.vite.json"),
72-
],
70+
projects: [resolve(__dirname, "../tsconfig.proprietary.vite.json")],
7371
}),
7472
);
7573
// Point apiClient.saas at a mock origin so the SaaS-backed billing stories

frontend/.storybook/preview.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ import { withThemeByDataAttribute } from "@storybook/addon-themes";
1414
void React;
1515

1616
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
17-
import { TierProvider, type Tier } from "@portal/contexts/TierContext";
18-
import { LinkProvider, type LinkState } from "@portal/contexts/LinkContext";
19-
import { ThemeProvider, useTheme } from "@portal/contexts/ThemeContext";
20-
import { UIProvider } from "@portal/contexts/UIContext";
21-
import { SuiProvider } from "@portal/theme/SuiProvider";
22-
import { handlers } from "@portal/mocks/handlers";
17+
import { TierProvider, type Tier } from "@processor/contexts/TierContext";
18+
import { LinkProvider, type LinkState } from "@processor/contexts/LinkContext";
19+
import { ThemeProvider, useTheme } from "@processor/contexts/ThemeContext";
20+
import { UIProvider } from "@processor/contexts/UIContext";
21+
import { SuiProvider } from "@processor/theme/SuiProvider";
22+
import { handlers } from "@processor/mocks/handlers";
2323
import { configureSupabase } from "@proprietary/auth/supabase/supabaseClient";
2424
import i18next from "i18next";
2525
import { initReactI18next } from "react-i18next";
@@ -36,7 +36,7 @@ import "@core/tokens/base.css";
3636
// async fetch (Storybook has no backend to serve /locales/). t(key) then renders
3737
// the shipped copy (e.g. "No sources connected yet") rather than the raw key.
3838
const localeModules = import.meta.glob<string>(
39-
"../editor/public/locales/*/translation.toml",
39+
"../public/locales/*/translation.toml",
4040
{ query: "?raw", import: "default", eager: true },
4141
);
4242

0 commit comments

Comments
 (0)