Uh oh!
There was an error while loading. Please reload this page.
fix(ai-build): name the empty draft preview + elevate Publish CTA (cloud#654) - #2040
Merged
Conversation
…oud#654)
Draft preview (?preview=draft) with auto-publish OFF renders empty —
dashboards at 0, lists "Nothing here yet" — because seed/sample rows load
only on publish. During the AI-build magic moment that reads as a hollow,
broken shell: the worst emotional drop right after "I built it for you".
This is a UI problem, not a cloud auto-publish change (the kill-switch is
deliberate). The DraftPreviewBar (sticky preview chrome above the app
content) now, while changes are pending:
- adds a prominent hint band — "Sample data appears once you publish" — so
an empty preview is explained, never mistaken for a failed build;
- elevates Publish to the dominant CTA ("Publish to see it live", primary,
larger) instead of a low-key third button; Changes/Exit stay secondary.
The auto-publish norm (known-zero pending drafts) is untouched: still a thin
neutral indicator with no Publish affordance. i18n EN + ZH; other locales
fall back to the English defaultValue.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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 (cloud#654)
In ObjectStack's AI Build magic flow, the chat opens a Live preview of the freshly-built app (
?preview=draft). When auto-publish is OFF (draft mode), that preview renders empty — dashboards show0, lists show "Nothing here yet" — because seed/sample rows load only on Publish. So the user describes their app → the AI says it's built → the preview looks like a hollow, broken shell. That's the biggest emotional drop in the whole magic moment, right after "I built it for you."This is a objectui UX problem, not a cloud auto-publish change. cloud defaults to auto-publish (so the default deployment doesn't reproduce this); only with the kill-switch off does the draft preview come up empty. The kill-switch semantics are deliberate and must not change — the fix belongs in the preview chrome.
Fix
The
DraftPreviewBar(the sticky ADR-0037 preview chrome rendered directly above the previewed app content) is enhanced only while changes are pending:Changes/Exitstay as secondary outline controls.The auto-publish norm is untouched: when we know there are zero pending drafts, the bar stays a thin neutral indicator with no Publish affordance and no hint (existing behaviour + test preserved). An unknown count (fetch failed) still keeps the helpful path.
Before → After (pending-changes state)
[👁 Draft preview — unpublished changes…] [Changes (N)] [Publish] [Exit]— one thin amber strip; Publish is the smallest, third-ranked control; nothing explains why the app is empty.[👁 Draft preview — …] [Changes (N)] [Exit]. Row 2 (hint band):[✨ Sample data appears once you publish / Publish to load example records and make it live] [🚀 Publish to see it live]— primary, prominent.i18n added for EN + ZH; other locales fall back to the English
defaultValue(the existing pattern for this bar).What I did NOT do (deliberately)
plugin-list's "Nothing here yet" itself preview-aware).plugin-listcorrectly does not depend onapp-shell, so the draft-preview signal isn't available there without new cross-package plumbing; the sticky banner sits directly above those empty views in the same viewport and carries the message prominently.Verification
App-showcase does not run the AI-build flow, so this exact preview surface cannot be reproduced end-to-end there — verification is code + compile + unit test + real DOM render (no E2E claimed):
pnpm --filter "@object-ui/app-shell..." build— full dep chain compiles,app-shelltscclean.@object-ui/app-shelltests: 942 passed (121 files).@object-ui/i18ntests: 165 passed (16 files) — locale key-parity intact.DraftPreviewBar.test.tsx: hint band + "Publish to see it live" CTA appear with pending drafts; both stay hidden in the known-zero auto-publish state; both survive an unknown (fetch-failed) count.Changes (2)/Exit,h-9outline) → hint band (draft-preview-sample-hint: Sparkles + title + body +bg-primary h-10 shadow-smPublish).Rollout note
This changes only objectui. To reach the running stack, cloud's
.objectui-shamust be bumped to the merged commit — not done here (left to the cloud-side update flow).Closes objectstack-ai/cloud#654
🤖 Generated with Claude Code