Repository navigation
fix(app-shell): draw the draft preview failure and empty panes with the shared view states - #26135
Merged
Merged
Conversation
… the shared view states PreviewDraftEmptyState composed the bare Empty primitive for both its load-failure and its nothing-drafted pane, so a failed overlay read was an unlabelled node to assistive technology. The failure is now DataErrorState (role="alert") and the empty pane DataEmptyState (role="status"); text, Retry control and test ids are unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FdXMkfnYedDKghz7QLUkx8
…-ztb3fw Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FdXMkfnYedDKghz7QLUkx8
Contributor
Author
席位核对 · ACCEPT · seat
|
This was referenced Oct 26, 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.
Requested by Steve · project thread
Part of #25915
Clause-②: no (one surface swaps its own block for the shared components; no exported type change. If the shared component needs a new prop, the thread reports first and the seat amends this line)
Metadata-protocol: none
What
Slice 1 of #25915: one surface moves onto the shared view states.
ui/packages/app-shell/src/preview/PreviewDraftEmptyState.tsx(the pane a?preview=drafttree shows when it has nothing to draw) no longer composes the bareEmptyprimitive:DataErrorState, so it isrole="alert";DataEmptyState, so it isrole="status".Text (same i18n keys and default values), the Retry control (
preview-draft-retry, glyph included) and the outerpreview-draft-empty-statewrapper are unchanged. The title and icon take the shared components' sizes, which is the visual diff.Why this surface (measured on main 6d15aca)
app-shell defines six empty blocks of its own and imports
DataEmptyState/DataErrorStatezero times. Importers per block:InspectorEmptyState7,StudioEmptyState4,PreviewEmptyState3,AppNoAccessEmptyState2,agentEmptyState1,PreviewDraftEmptyState1.PreviewDraftEmptyStateis the only one of the six that draws a load failure, and it drew it as the same unlabelled node as its empty case, so a failed draft-overlay read was announced as nothing. The card's "route renderer catch paths toDataErrorState" lands exactly here. It has one importer (AppContent.tsx, not edited), is outsideObjectView.tsxand seat 2's packages, and noclaude/*branch on origin touches it (depth-1 blob compare of all 707 heads against main; control fileDraftChangesPanel.tsxdiffers on many). Non-claude/*branches were not scanned.app-shell is outside the sdui registry closure:
node scripts/gen-sdui-manifest-node.mjsre-recordedscripts/sdui-manifest.record.jsonbyte-identical (922 files in 27 packages), so the record is not in the diff.Tests
New
ui/packages/app-shell/src/preview/__tests__/PreviewDraftEmptyState.sharedStates-25915.test.tsx: failure isrole="alert"withdata-slot="data-error-state"and no status; not-yet-drafted and nothing-drafted arerole="status"withdata-slot="data-empty-state"and no alert; one Retry control in each pane callsonRetry.ui/packages/i18n/src/__tests__/draftBar-es-register-3844.test.ts(which names this component),Test Files 2 passed (2),Tests 15 passed (15).Tests 3 failed | 2 passed (5)(the three role tests red, the two Retry tests green as expected); restored withgit checkout HEAD --,git diff HEADempty and blob hash equal to HEAD.pnpm --filter @object-ui/app-shell type-check(bothtsc --noEmitandtsc -p tsconfig.test.json), after building@object-ui/app-shell^...: exit 0.Acceptance notes
InspectorEmptyState,StudioEmptyState,PreviewEmptyState,AppNoAccessEmptyState,agentEmptyState) stay for later slices; components, app-shell: 17 EmptyState implementations, 23 Skeletons and 5 error-boundary classes; the shared DataErrorState has one importer and ViewSkeleton none — make the shared vocabulary the only one #25915 remains open.DataErrorState's ownonRetrybutton carries no glyph or test id, so this surface passes its existing Retry button as children rather than adding a prop to the shared component.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01FdXMkfnYedDKghz7QLUkx8