Repository navigation
Conversation
Vite and `tsx watch` only strip types, so the preview runs fine with type errors and they first surface when deployment validation runs the app's `typecheck` script. In dev, the server now runs that same script in the background at startup and after TypeScript changes, and logs its errors as `[appkit:server:typecheck]`. It is inert without a `typecheck` script. The template's `typecheck` is now `tsc -b`, so one run reports client and server errors; `&&` hid client errors whenever the server check failed. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Fabian Jakobs <fabian.jakobs@databricks.com>
Contributor
📦 Bundle size reportCompared against
|
| dist | raw | gzip |
|---|---|---|
| JS (runtime) | 1.3 MB (+2.8 KB) | 461 KB (+1.3 KB) |
| Type declarations | 465 KB | 169 KB (-1 B) |
| Source maps | 2.5 MB (+5.1 KB) | 861 KB (+2.1 KB) |
| Other | 11 KB | 3.7 KB |
| Total | 4.3 MB (+8.0 KB) | 1.5 MB (+3.3 KB) |
Per-entry composition (own code — deps external (as shipped))
| Entry | Initial (gz) | Lazy (gz) | Total (gz) | node_modules (min) | Own code (min) |
|---|---|---|---|---|---|
. |
107 KB (+495 B) | 2.5 KB | 109 KB (+495 B) | external | 345 KB (+1.2 KB) |
./beta |
103 KB | 482 B | 104 KB | external | 310 KB |
./testing |
45 KB (-1 B) | 33 KB (+491 B) | 78 KB (+490 B) | external | 225 KB (+1.2 KB) |
./tsdown |
520 B | 0 B | 520 B | external | 813 B |
./type-generator |
26 KB | 0 B | 26 KB | external | 74 KB |
Chunks:
| Entry | Chunk | Load | Size (gz) |
|---|---|---|---|
. |
index.js |
initial | 102 KB |
. |
utils.js |
initial | 4.6 KB |
. |
remote-tunnel-manager.js |
lazy | 2.5 KB |
./beta |
beta.js |
initial | 83 KB |
./beta |
modular.js |
initial | 6.0 KB |
./beta |
stream-manager.js |
initial | 5.9 KB |
./beta |
service-context.js |
initial | 4.2 KB |
./beta |
databricks.js |
initial | 3.3 KB |
./beta |
client.js |
initial | 647 B |
./beta |
index.js |
initial | 20 B |
./beta |
supervisor-api.js |
lazy | 192 B |
./beta |
databricks.js |
lazy | 176 B |
./beta |
index.js |
lazy | 114 B |
./testing |
manifest.js |
initial | 32 KB |
./testing |
index.js |
initial | 10 KB |
./testing |
wide-event-emitter.js |
initial | 2.9 KB |
./testing |
index.js |
lazy | 28 KB |
./testing |
remote-tunnel-manager.js |
lazy | 2.5 KB |
./testing |
utils.js |
lazy | 1.8 KB |
./tsdown |
index.js |
initial | 520 B |
./type-generator |
index.js |
initial | 26 KB |
@databricks/appkit-ui
npm tarball (packed): 397 KB (-4 B) — gzipped download (dist + bin; excludes release-only docs/NOTICE).
| dist | raw | gzip |
|---|---|---|
| JS (runtime) | 429 KB | 147 KB |
| Type declarations | 267 KB | 98 KB (-1 B) |
| Source maps | 853 KB | 286 KB |
| CSS | 16 KB | 3.2 KB |
| Total | 1.5 MB | 534 KB (-1 B) |
Per-entry composition (consumer bundle — deps bundled, peerDeps external)
| Entry | Initial (gz) | Lazy (gz) | Total (gz) | node_modules (min) | Own code (min) |
|---|---|---|---|---|---|
./js |
5.3 KB | 49 KB | 55 KB | 208 KB | 14 KB |
./js/beta |
2.1 KB | 0 B | 2.1 KB | 0 B | 5.0 KB |
./react |
433 KB | 49 KB | 481 KB | 1.3 MB | 177 KB |
./react/beta |
4.9 KB | 0 B | 4.9 KB | 0 B | 12 KB |
Chunks:
| Entry | Chunk | Load | Size (gz) |
|---|---|---|---|
./js |
index.js |
initial | 5.2 KB |
./js |
chunk |
initial | 120 B |
./js |
apache-arrow |
lazy | 49 KB |
./js/beta |
beta.js |
initial | 2.1 KB |
./react |
index.js |
initial | 431 KB |
./react |
tslib |
initial | 2.1 KB |
./react |
apache-arrow |
lazy | 49 KB |
./react/beta |
beta.js |
initial | 4.9 KB |
Contributor
🤖 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 42243386058 -R databricks/appkit -n appkit-template-0.90.0-pr.d4601a2-fjakobs-la-2186-typecheck-in-build-loop-715 -D appkit-pr-715 \
&& unzip -o "appkit-pr-715/appkit-template-0.90.0-pr.d4601a2-fjakobs-la-2186-typecheck-in-build-loop-715.zip" -d "appkit-pr-715" \
&& databricks apps init --template "appkit-pr-715"The template pins |
MarioCadenas
approved these changes
Nov 6, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In development, the AppKit server builds the app with Vite (client) and
tsx watch(server). Both only strip types. An app with type errors still renders in the dev preview, HMR applies the edits, and the server even runs the badly typed code. The dev log says nothing. The errors first appear whendatabricks apps validateordatabricks apps deployruns the app'stypecheckscript.A developer, or a coding agent working in the dev loop, gets no signal until they ask to deploy. Then they have to fix, re-verify and deploy again.
A second gap made this worse: the template's
typecheckscript wastsc -b tsconfig.server.json && tsc -b tsconfig.client.json. When the server check failed, the&&stopped the run, so client errors were never printed. Fixing the server errors and deploying again only revealed the client errors on the next attempt.Fix
Dev server reports type errors. A new Vite plugin,
packages/appkit/src/plugins/server/typecheck-vite-plugin.ts, is registered inViteDevServerand only runs in development. It runs the app's owntypecheckscript, the same check deployment validation runs, in the background:tsx watchrestarts the process on server edits, so this covers server changes).ts/.tsx/.mts/.ctschanges seen by Vite's watcher, debounced. The watcher also coversshared/, so regeneratedappkit-typesre-trigger the check.[appkit:server:typecheck] Type errors found. The app still runs, but deployment validation fails until they are fixed:followed by the tsc output.No type errors.is logged on the first clean run and after errors are fixed.package.jsonhas notypecheckscriptIt never blocks startup or requests, so the preview behaves exactly as before.
Template:
typecheckis nowtsc -b. The roottsconfig.jsonalready references both projects, so one run reports client and server errors together.Docs:
local-development.mdxexplains the background check. The LLM checklist inllm-guide.md, which ships in the package'sCLAUDE.md/llms.txt, now says thetypecheckscript must pass and that the dev server logs type errors.Tests
packages/appkit/src/plugins/server/tests/typecheck-vite-plugin.test.tsuses a real temp project with a small stand-intypecheckscript and a fake watcher. It covers:typecheckscript.tsxchangeVerification
The repro app was scaffolded from this template with
databricks apps init --template ./template, plus one type error inclient/src/App.tsxand one inserver/server.ts.Before (published AppKit):
pnpm run dev:/returns 200 and the server runs the bad value. The dev log has no type errors, including after edits.databricks apps deployagainst a Databricks workspace fails validation and reports only the server error.After (this branch, packed and installed into the same app):
pnpm run devlogs both errors about a second after startup, and/still returns 200.tsxrestart, and the log saysNo type errors.Breaking the client again brings the error back.databricks apps validate, anddatabricks apps deployagainst a Databricks workspace, report both client and server errors in one run.tscprocesses are left behind.Mode: production (static)and no type-check activity, so the check stays dev-only.Repo checks:
pnpm build && pnpm docs:build,pnpm check:fix && pnpm -r typecheck, andpnpm testall pass.This pull request and its description were written by Isaac.