Repository navigation
Serve TSX drafts from the design plugin (A/B with HTML) - #707
MarioCadenas merged 3 commits into
Conversation
appkit design tsx-drafts writes a shared client/src/design/mock.ts and 3 appkit-ui pages at /design/<name>-a|b|c (KIT-37's writer: one cached system prompt, mock export list streamed first, tsc + up to 2 fix rounds, a page lands in pages/ only once it compiles). /design/__status reports each under tsx: writing, type-checking, rendering, ready or failed. appkit design lock-in keeps one as /design (or the home page with --home) and deletes the others. HTML drafts are unchanged. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
|
Review 1 · Pass · 2 minor Does the change do what the task asked? Yes. Gate: major and worse must be fixed. The TSX draft path is built as asked: a writer CLI that reuses KIT-37's prompt files and runs tsc with up to 2 fix rounds, staging so a page only shows once it compiles, a tsx section in /design/__status, and lock-in. The HTML path is not touched, and the branch is pushed. I did not repeat the live AI Gateway run, so the end-to-end claims rest on the author's report plus the unit tests I ran. Not required (below the gate)
|
…es them Drop the appkit design tsx-drafts and lock-in commands and their prompt files: App Builder owns prompting, mock data, type-check and lock-in. /design/__status now reports per page compiled / compileError (built server-side) and a state (compile-error, rendering, ready, failed) from the plugin's own knowledge instead of a writer's status.json. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
|
Review 2 · Fail · 1 major, 1 minor Does the change do what the task asked? Yes. Gate: major and worse must be fixed. The branch adds per-page compiled/compileError/state to /design/__status on top of KIT-1's TSX page serving, leaves HTML drafts alone, and documents what a builder writes. The design tests pass. The one real gap: the docs leave out the Tailwind step the agent says it needed in its own live run. Required
Not required (below the gate)
|
🤖 AppKit PR bot🔬 Run evalsStart an eval for this PR from the evals-monitor app: Go to Evals Monitor → 📦 Try this PR's app templateScaffolds a new app from this PR's SDK build. Run it in any folder (requires the GitHub CLI — gh run download 41927351703 -R databricks/appkit -n appkit-template-0.90.0-pr.cd41c28-work-38-serve-tsx-drafts-from-the-desi-707 -D appkit-pr-707 \
&& unzip -o "appkit-pr-707/appkit-template-0.90.0-pr.cd41c28-work-38-serve-tsx-drafts-from-the-desi-707.zip" -d "appkit-pr-707" \
&& databricks apps init --template "appkit-pr-707"The template pins |
Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
|
Review 3 · Pass · 1 minor Does the change do what the task asked? Yes. Gate: major and worse must be fixed. F3 is fixed: the TSX drafts section of the design plugin docs now tells the builder to touch client/src/index.css after moving a page in, and explains why. F4 was deliberately left as is: every status poll still compiles each page's module graph, and nobody has measured what that costs. Not required (below the gate)
|
b987252
into
work/1-design-plugin-dev-only-design-
TSX drafts now run in the design plugin next to the HTML drafts, on branch
work/38-serve-tsx-drafts-from-the-desi(one commit,9ff9dc62a, nothing merged). I ran it live through the AI Gateway in an app scaffolded fromtemplate/, and it works end to end.Results of the live runs:
readyin light and dark mode, and/design/__statusshowedtsxmoving through writing → type-checking → rendering → ready./design(ready: true) and the app's owntscstill passes.pnpm -r typecheck,pnpm checkand knip are clean.What I added:
appkit design tsx-drafts --prompt … --answers … --name <prefix>: KIT-37's writer, reused with its prompt files (components.schema.json, the appkit-ui export list, the example page and mock), with up to 2 fix rounds after the type check.client/src/design/.staging/, and a page moves intopages/only once it compiles.--print-promptprints the cached system prompt.appkit design lock-in <name> [--home]: keeps the chosen page as/design/index.tsx, or with--homeasclient/src/pages/home/HomePage.tsx. It deletes the other drafts; the only change to the code is the../mockimport becoming./mock.tsxsection in/design/__status: each draft showswriting,type-checking,rendering,readyorfailed.readyandfailedcome from what the page reports from the browser./design/<name>pages, so the plugin's existing per-page error boundary andappkit:design-readymessage already cover them. The HTML draft path is untouched.docs/docs/plugins/design.md.Bug fixed during the live run: Tailwind didn't style a newly added page until the stylesheet changed. The writer now touches
client/src/index.css, as KIT-37 did.How to consume it: tarballs
databricks-appkit-0.90.0.tgzanddatabricks-appkit-ui-0.90.0.tgzare in~/.herdr-projects/reports/app-kit/38/. Install both asfile:dependencies; both are needed because theappkitcommand comes from the appkit-ui package. The closing note has the exact commands, the checksums and how to rebuild them.Caveats:
--homedoesn't editApp.tsx; the agent still has to route the page at/.pnpm store pruneonce on the global pnpm store while reinstalling the test app.Also noticed:
packages/appkit/src/plugins/design/vite-plugin.ts: hand-written pages added while the dev server runs have the same Tailwind styling gap.lint-staged automatic backup (2b8879a)entry is sitting in the shared git stash; it isn't from this task.Task: KIT-38 (app-kit/38)