Repository navigation
feat(app)!: scaffold data apps from published SDK examples - #187
francoischalifour wants to merge 2 commits into
Conversation
Use the pinned @altertable/data-app-examples 0.78.0 package as the canonical starter at build time instead of maintaining its source, guides, and tools in the CLI repository. Keep only the frozen registry resolution locally. Generate the development fixture from the same payload shipped in releases. Prepare app identity with public manifest tooling and extract directory/file scope statically before granting lakehouse access. Keep compiler and template packages outside the runtime bundle so scaffolding remains offline. Execute operation checks through the public SDK client and preserve app source during package upgrades. Verify template fidelity, frozen installs, published-package upgrades, registered-query boundaries, browser states, npm consumption, and native CLI previews. BREAKING CHANGE: Local app dev and lint require a shared literal app.ts instead of app.json. Existing projects must adapt their own declaration, operations, and local server to SDK 0.78; package upgrade preserves source and does not perform that source migration.
|
Reviewed e0835e5. The local full non-Docker gate passes: static checks, 880 CLI unit tests, 157 black-box tests, six desktop/phone browser tests and extracted npm-consumer smoke. I also compiled the Linux x64 binary and passed its native scaffold/install/lint/build/directory-preview/file-preview smoke outside the checkout. The phone dark-theme screenshot looks contained and usable. Approval is pending the red required gate: Repository and integration passes those app/package checks, then |
Avoid importing the SDK manifest compiler and reading starter templates for every source CLI invocation. Load and memoize the payload on demand, and pass it explicitly to the pure version and peer helpers. This removes the startup overhead that caused the five-second lakehouse integration test to time out in CI. Keep the original test deadline and the embedded npm/native payload contract.
albert20260301
left a comment
There was a problem hiding this comment.
Reviewed the 13-file delta through 4550f41: scaffold tools now load only during app execution, with a cached source payload and an equivalent embedded loader in packaged builds. Local type/lint/format checks, all 72 app tests, extracted npm-consumer smoke and a fresh Linux x64 native end-to-end app smoke pass.
Required CI is now green, including the previously timed-out mock integration flow, minimum-Bun compatibility and all four native compile jobs. This resolves the verification blocker in my earlier comment. The earlier full local gate and desktop/phone browser checks cover the unchanged starter integration. Existing app.json projects still require the documented source migration; upgrade preserves their source and identity.
|
|
||
| function appLiteral(value: string): string { | ||
| return ( | ||
| "'" + |
There was a problem hiding this comment.
Codex found that
could we match the starter’s formatter here? For an org like
O'Brien, it prefers double quotes, so the generatedapp.tsfails its firstapp lint.
What
Scaffold apps from the pinned
@altertable/data-app-examples@0.78.0package and remove the locally maintained starter. The CLI keeps its frozen lockfile, prepares app identity, and embeds the canonical example in npm/native builds soapp createremains offline. Setup generates the development fixture from that same payload. Template tools load on demand during app execution to keep unrelated source CLI commands fast.Align file preview, static scope verification, and operation checks with SDK 0.78.0. Source, guides, and component behavior belong to the SDK; the CLI owns distribution and consumer integration tests.
Why
The existing SDK 0.74.0 scaffold uses different declaration, server, and operation contracts. Consuming the published examples package supplies the current starter without maintaining another copy.
Compatibility
Breaking: directory dev and lint now require a shared literal
app.tsdeclaration. Existingapp.jsonprojects need a source migration retaining their identity, queries, and UI.app upgradepreserves source and updates dependencies and the lockfile only.The example uses fictional inline SQL and creates no lakehouse objects. Integration tests mock the external lakehouse HTTP boundary; published SDK packages, the Bun server, and operation clients are real.
Checklist
CHANGELOG.mdupdated