Skip to content

feat(app)!: scaffold data apps from published SDK examples - #187

Open
francoischalifour wants to merge 2 commits into
mainfrom
fc/data-app-sdk-078
Open

francoischalifour wants to merge 2 commits into
mainfrom
fc/data-app-sdk-078

Conversation

@francoischalifour

@francoischalifour francoischalifour commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

What

Scaffold apps from the pinned @altertable/data-app-examples@0.78.0 package and remove the locally maintained starter. The CLI keeps its frozen lockfile, prepares app identity, and embeds the canonical example in npm/native builds so app create remains 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.ts declaration. Existing app.json projects need a source migration retaining their identity, queries, and UI. app upgrade preserves 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

  • Tests added or updated
  • CHANGELOG.md updated
  • Breaking change noted in commit footer and changelog

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.
@albert20260301

Copy link
Copy Markdown
Contributor

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 tests/integration.e2e.ts times out after 5,000 ms in the combined upload/upsert/query/append/debug flow (30 assertions reached). The log does not identify a failed assertion or establish a source regression. I have not reproduced that Docker-backed flow locally or rerun CI; François owns resolving that remaining verification before approval.

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 albert20260301 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (
"'" +

@robinvrd robinvrd Nov 19, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex found that

could we match the starter’s formatter here? For an org like O'Brien, it prefers double quotes, so the generated app.ts fails its first app lint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants