refactor: standardize dev-playground on the app template - #541
Draft
MarioCadenas wants to merge 1 commit into
Draft
refactor: standardize dev-playground on the app template#541MarioCadenas wants to merge 1 commit into
MarioCadenas wants to merge 1 commit into
Conversation
Reshape apps/dev-playground to match the `databricks apps init` template
layout while keeping it a monorepo-linked dogfood app.
- Single package: fold the nested client/package.json in; adopt the
template tsconfig.{shared,server,client} + tsdown.server.config.ts +
client vite.config; server entry becomes server/server.ts; pages live
at client/src/pages/<name>/<Name>Page.tsx.
- Migrate routing from TanStack Router to react-router 7
(createBrowserRouter in App.tsx, RootLayout/Outlet/NavLink,
errorElement); drop routeTree.gen.ts.
- Resolve the local SDK build via root pnpm.overrides
(@databricks/appkit{,-ui} -> workspace:*) while the app pins the
template's published version. The client vite config aliases appkit-ui
to its built dist because its exports `development` condition points at
source using appkit-ui's internal @/ alias, which an external bundler
cannot resolve.
- Simplify deploy-playground.ts for the single package (both SDK tarballs
into one package.json; drop the client/package.json injection and the
prepared-files config swaps).
- Fix pre-existing drift vs current appkit surfaced by the new tsc-gated
build: appkit-ui chart prop renames, AgentEvent -> AgentChatEvent,
framework-provided plugin cache, and ChartData/e.path guards.
Lint, format, typecheck, and build are green; verified on a live dev
server (routes render, appkit-ui resolves to dist).
Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
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 32252985324 -R databricks/appkit -n appkit-template-0.61.1-pr.94abf32-playground-standard-541 -D appkit-pr-541 \
&& unzip -o "appkit-pr-541/appkit-template-0.61.1-pr.94abf32-playground-standard-541.zip" -d "appkit-pr-541" \
&& databricks apps init --template "appkit-pr-541"The template pins |
MarioCadenas
marked this pull request as draft
August 19, 2026 12:42
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.
What
Standardizes
apps/dev-playgroundon thedatabricks apps inittemplate layout while keeping it a monorepo-linked dogfood app. No behavior/feature changes — same plugins, routes, and demos, restructured.Why
The playground had drifted from the template (nested
client/package.json, TanStack Router, bespoke tsconfig/deploy config-swaps). Aligning it means template regressions get dogfooded, and contributors see one canonical structure.Changes
client/package.jsonin; adopt templatetsconfig.{shared,server,client}+tsdown.server.config.ts+ clientvite.config; server entry →server/server.ts; pages atclient/src/pages/<name>/<Name>Page.tsx.createBrowserRouterinApp.tsx,RootLayout/Outlet/NavLink, routeerrorElement);routeTree.gen.tsremoved.pnpm.overridespins@databricks/appkit{,-ui}→workspace:*; the app'spackage.jsonkeeps the template's pinned version, so the app file is byte-identical to a scaffold but installs link intopackages/.exportsdevelopmentcondition points at TS source that uses appkit-ui's internal@/alias (unresolvable by an external bundler), so the client pins appkit-ui's builtdist(kept fresh bybuild:watch; matches prod/deploy). Server/build resolve via the override alone.deploy-playground.tssimplified for one package (both SDK tarballs into a singlepackage.json; dropped theclient/package.jsoninjection +prepared-files/config swaps). Appbuildusesnpm runfor Databricks parity.tsc-gated build: appkit-ui chart prop renames (curveType→smooth,showDots→showSymbol,showLabel→showLabels),AgentEvent→AgentChatEvent, framework-provided plugin cache,ChartData/e.pathguards.Deviations from the template (monorepo-justified)
Stays pnpm (not npm), lints via root oxlint (no per-app eslint), keeps postcss tailwind, keeps vite
dedupefor react, and omits the typegen lifecycle hooks (would break workspace install ordering).Testing
pnpm --filter=dev-playground typecheck— clean (cache-free)pnpm --filter=dev-playground build(tsc + tsdown + vite) — greenoxlint+oxfmt --check— cleanNote for reviewers
pnpm -r typecheckshows a pre-existing failure inpackages/appkit's own source (implicit-any+ ashared/workspace-clientresolution error) — independent of this PR (nopackages/files are touched; dev-playground passes within that run).Known follow-up (not in this PR)
appkit.filesis inferred bycreateAppas a non-callable union (FilesExport | agents registry) with this plugin set; worked around with a singleExtract<>narrowing inserver.ts. Looks like an appkit-side inference issue worth a real fix.