Skip to content

Commit ff6a375

Browse files
committed
Setup builder
1 parent 61f3db1 commit ff6a375

19 files changed

Lines changed: 2707 additions & 493 deletions

File tree

apps/backend/src/app/api/latest/setup-prompt/route.ts

Lines changed: 0 additions & 33 deletions
This file was deleted.

apps/e2e/tests/backend/endpoints/api/v1/setup-prompt.test.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

claude/CLAUDE-KNOWLEDGE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,3 +386,12 @@ A: Use a strict root `postinstall` script that rewrites only Next `>=16` app-pag
386386

387387
Q: Why can Turbo-pruned Docker builds fail with `Cannot find module /app/scripts/postinstall-patch-next-async-debug-info.mjs` during `pnpm install`?
388388
A: In pruned builder stages, we copy `/app/out/json` and run `pnpm install` before copying `/app/out/full`. The root `package.json` still runs `postinstall: node ./scripts/postinstall-patch-next-async-debug-info.mjs`, but that script is not present yet. Fix by copying `scripts/postinstall-patch-next-async-debug-info.mjs` into the builder stage before `pnpm install` (for all Dockerfiles using the prune pattern).
389+
390+
Q: How is the Mintlify setup prompt generated?
391+
A: `scripts/generate-setup-prompt-docs.ts` writes both `docs-mintlify/snippets/home-prompt-island.jsx` and `docs-mintlify/guides/getting-started/setup.mdx` from `getSdkSetupPrompt("ai-prompt", { tanstackQuery: false })`. Root `codegen` runs it once, and root dev scripts run `generate-setup-prompt-docs:watch` so edits to `packages/stack-shared/src/ai/prompts.ts` refresh the checked-in generated docs files.
392+
393+
Q: Why should the Mintlify setup prompt page avoid a custom `SetupPromptBlock` component?
394+
A: Mintlify SSR ignores non-standard React components, so `docs-mintlify/guides/getting-started/setup.mdx` should render the prompt block with inline standard elements. The generated page uses a plain `<textarea defaultValue={generatedSetupPromptText} />` plus a standard `<button>` instead of `<SetupPromptBlock />`.
395+
396+
Q: How should the generated Mintlify setup wizard filter tabs?
397+
A: Generate all markdown tab panels directly into `docs-mintlify/guides/getting-started/setup.mdx` so Mintlify transforms the markdown at build time, then use inline client handlers to show/hide standard tab buttons and panels based on selected `sdkSetupTools`. For tab buttons with `inline-flex`, set `style.display` explicitly when hiding; the HTML `hidden` attribute alone can be overridden by the display utility class.

docs-mintlify/guides/getting-started/setup.mdx

Lines changed: 1752 additions & 70 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)