Skip to content

Commit e571830

Browse files
committed
Generate and check Platform route types independently
1 parent fc8b927 commit e571830

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎apps/sim/package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"dev": "bun run build:cli-runtime && bun run dev:cache:cap && next dev --port 3000",
1212
"dev:platform": "cd platform && next dev --webpack --port 3100",
1313
"build:platform": "cd platform && next build --webpack",
14+
"type-check:platform": "cd platform && next typegen && tsc --noEmit",
1415
"test:platform:desktop": "playwright test --config platform/checks/desktop/playwright.config.ts",
1516
"test:platform:e2e": "playwright test --config platform/checks/playwright.config.ts",
1617
"start:platform": "cd platform && next start --port 3100",
@@ -41,7 +42,7 @@
4142
"test:watch": "vitest",
4243
"test:coverage": "vitest run --coverage",
4344
"email:dev": "email dev --dir components/emails",
44-
"type-check": "tsc --noEmit",
45+
"type-check": "tsc --noEmit && bun run type-check:platform",
4546
"lint": "biome check --write --unsafe .",
4647
"lint:check": "biome check .",
4748
"format": "biome format --write .",

‎apps/sim/platform/README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ The [Platform design contract](AGENTS.md) is authoritative. Use the repository's
5757

5858
```sh
5959
bun run check:platform-design
60+
bun run --cwd apps/sim type-check:platform
6061
bun run --cwd apps/sim build:platform
6162
bunx --no-install playwright install chromium
6263
bun run --cwd apps/sim test:platform:e2e
@@ -65,6 +66,8 @@ bun run --cwd apps/desktop build
6566
bun run --cwd apps/sim test:platform:desktop
6667
```
6768

69+
The Platform type check generates Next.js route types and checks the isolated project. The repository type check runs it alongside the existing app’s TypeScript project.
70+
6871
The browser suite starts separate production servers with fixtures enabled and disabled. Supply `PLATFORM_REPORT_PATH` to save JSON, failure screenshots and traces. Next uses webpack for this nested app: the installed Turbopack also discovers the parent Sim project's proxy and instrumentation. Watch for that boundary when upgrading Next.
6972

7073
The static check covers ownership, styling props, evidence, tokens, code usage and dependency direction. It cannot establish that a browser rendering matches Paper. Compare both themes, keyboard and pointer states, actual overflow, text scaling and widths between approved artboards. Build the standalone app before running the browser suite to test the current sources.

‎apps/sim/tsconfig.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"exclude": [
3333
"node_modules",
3434
".next",
35+
"platform",
3536
"**/*.test.ts",
3637
"**/*.test.tsx",
3738
"vitest.config.ts",

0 commit comments

Comments
 (0)