Repository navigation
feat(appkit): design pages report render failures and success - #745
Merged
Merged
Conversation
…ures DesignPage now sets data-design-rendered on its shell once the page commits a render without an error (an empty page counts), and removes it when an error replaces the page. A render error before any good render always shows its message inside [data-design-error]: the errorFallback option, used only by the stream page to blank it, is gone. The stream page shows a published version that fails to load or evaluate as [data-design-error] right away; the next good publish replaces it. Before any version is published it stays pending: the server marks the page's root data-published once one is out. Documents the pending, rendered, last-good and error states next to DesignPage and in the design plugin docs. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: mario.cadenas <mario.cadenas@databricks.com>
The board checks each commit once; the check of the previous commit failed before running anything (pnpm wasn't installed in its shell). No code change. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: mario.cadenas <mario.cadenas@databricks.com>
From review of the rendered marker: - data-design-rendered is removed in the commit an error replaces the page (a layout effect cleanup), so a MutationObserver never sees it beside [data-design-last-good] or [data-design-error]. - A thrown non-Error (a string, null) shows as its text, instead of an empty reason or a blank root. - errorFallback is back, for compatibility; a fallback that renders nothing falls back to the message, so the error node is never empty. - Tests: the observer contract outside act(), non-Error throws, errorFallback, and on the stream page, rendered then a broken hot update (last good frame) then a fixed one rendering again. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: mario.cadenas <mario.cadenas@databricks.com>
DesignPage now owns the page's Suspense boundary (pendingFallback), with the rendered marker inside it, so a page showing a Suspense fallback isn't marked rendered; the marker comes back when the page shows again. The design plugin passes its readiness-holding Pending as pendingFallback. An errorFallback that shows no text (null, false, "") gives way to the message before the paint, so [data-design-error] is never empty. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: mario.cadenas <mario.cadenas@databricks.com>
Contributor
📦 Bundle size reportCompared against
|
| dist | raw | gzip |
|---|---|---|
| JS (runtime) | 1.4 MB (+1.2 KB) | 500 KB (+461 B) |
| Type declarations | 483 KB | 174 KB |
| Source maps | 2.7 MB (+1.5 KB) | 929 KB (+552 B) |
| Other | 11 KB | 3.7 KB |
| Total | 4.6 MB (+2.7 KB) | 1.6 MB (+1013 B) |
Per-entry composition (own code — deps external (as shipped))
| Entry | Initial (gz) | Lazy (gz) | Total (gz) | node_modules (min) | Own code (min) |
|---|---|---|---|---|---|
. |
118 KB | 2.4 KB | 121 KB | external | 378 KB |
./beta |
115 KB (+452 B) | 484 B | 116 KB (+452 B) | external | 342 KB (+1.1 KB) |
./testing |
47 KB | 38 KB | 85 KB | external | 246 KB |
./tsdown |
520 B | 0 B | 520 B | external | 813 B |
./type-generator |
31 KB | 0 B | 31 KB | external | 90 KB |
Chunks:
| Entry | Chunk | Load | Size (gz) |
|---|---|---|---|
. |
index.js |
initial | 114 KB |
. |
utils.js |
initial | 4.6 KB |
. |
remote-tunnel-manager.js |
lazy | 2.4 KB |
./beta |
beta.js |
initial | 95 KB |
./beta |
modular.js |
initial | 6.1 KB |
./beta |
stream-manager.js |
initial | 5.9 KB |
./beta |
service-context.js |
initial | 4.3 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 | 177 B |
./beta |
index.js |
lazy | 115 B |
./testing |
manifest.js |
initial | 33 KB |
./testing |
index.js |
initial | 10 KB |
./testing |
wide-event-emitter.js |
initial | 2.9 KB |
./testing |
index.js |
lazy | 34 KB |
./testing |
remote-tunnel-manager.js |
lazy | 2.4 KB |
./testing |
utils.js |
lazy | 1.8 KB |
./tsdown |
index.js |
initial | 520 B |
./type-generator |
index.js |
initial | 31 KB |
@databricks/appkit-ui
npm tarball (packed): 431 KB (+3.0 KB) — gzipped download (dist + bin; excludes release-only docs/NOTICE).
| dist | raw | gzip |
|---|---|---|
| JS (runtime) | 459 KB (+2.7 KB) | 158 KB (+927 B) |
| Type declarations | 283 KB (+1.3 KB) | 105 KB (+492 B) |
| Source maps | 912 KB (+5.2 KB) | 308 KB (+1.7 KB) |
| CSS | 16 KB | 3.2 KB |
| Total | 1.6 MB (+9.2 KB) | 574 KB (+3.0 KB) |
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 |
3.5 KB | 0 B | 3.5 KB | 0 B | 9.4 KB |
./react |
441 KB | 49 KB | 489 KB | 1.4 MB | 179 KB |
./react/beta |
16 KB (+289 B) | 0 B | 16 KB (+289 B) | 25 KB | 23 KB (+857 B) |
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 | 3.5 KB |
./react |
index.js |
initial | 439 KB |
./react |
tslib |
initial | 2.1 KB |
./react |
apache-arrow |
lazy | 49 KB |
./react/beta |
beta.js |
initial | 16 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 45213925690 -R databricks/appkit -n appkit-template-0.102.0-pr.d128908-work-12-design-pages-report-render-fai-745 -D appkit-pr-745 \
&& unzip -o "appkit-pr-745/appkit-template-0.102.0-pr.d128908-work-12-design-pages-report-render-fai-745.zip" -d "appkit-pr-745" \
&& databricks apps init --template "appkit-pr-745"The template pins |
…lish DesignPage now copies the last good frame only while the shell is marked rendered, so a visible Suspense fallback is never restored in place of an error before the page has rendered. The page's first frame is copied as soon as the marker goes on, without waiting for an animation frame (a hidden frame gets none). The stream host trusted the data-published flag from when its HTML was served, so a first publish whose event came before its listener left a failed import pending forever. A failed import with no known version now asks the server again (the page's HTML, served afresh). Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: mario.cadenas <mario.cadenas@databricks.com>
Each publish starts a new import of the streamed page, and imports can finish out of order, so an older failed (or successful) import could replace the error of a newer published draft. Each mount now takes a number, and only the latest one renders its outcome. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: mario.cadenas <mario.cadenas@databricks.com>
The last good frame was copied from a passive effect or an animation frame, so a failure in the task the page committed in (its first commit, an update or a retry) lost that frame, and a hidden frame (no animation frames) kept only the first one. DesignPage now tracks whether the page itself is on screen (layout effects, so never the error, a copy or a Suspense fallback), and copies it just before an error replaces it (getSnapshotBeforeUpdate), and after each DOM change while it shows, for a fallback that hides it before an error. Every transition between pending, rendered, last-good and error, on a design page and on a stream page (first and later renders, failures in the same task and later, suspends, retries, out-of-order imports and publishes), is now one table-driven test, run outside act() and in a hidden frame too, checking what a builder must never see on the way. It replaces the one-off transition tests, and the transitions are documented. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: mario.cadenas <mario.cadenas@databricks.com>
pffigueiredo
approved these changes
Nov 23, 2026
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.
App Builder's design flow shows streamed drafts through the design plugin. Today a draft that fails to render can't be told apart from one that rendered, so the preview shows a blank frame instead of an error. This makes design pages say what happened, with explicit markers on the page shell.
Changes
DesignPagesetsdata-design-renderedonce the page has rendered without an error, an empty page included. The marker isn't set while the page suspends:DesignPagenow owns theSuspenseboundary through a newpendingFallbackprop, and the plugin passes its readiness-holdingPendingcomponent there.[data-design-error]. A fallback that renders no text (null,false,"") is replaced by the message, and a customerrorFallbackstill works.errorFallback: () => null. A failed first import now shows right away, and the page stays pending until a version is published (data-publishedon#root).docs/docs/plugins/design.md.Tests
design-page.test.tsxand for the stream page. Each new test fails on the old code.rendered;errorFallback={() => false}shows the message.Not checked
errorFallbackthat shows only an icon (no text) gets replaced by the message.This pull request and its description were written by Isaac.