Skip to content

fix(app-shell): draw the draft preview failure and empty panes with the shared view states - #26135

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-ztb3fw
Oct 26, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-ztb3fw

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

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=draft tree shows when it has nothing to draw) no longer composes the bare Empty primitive:

  • overlay read failed: DataErrorState, so it is role="alert";
  • app not in the draft yet, or nothing drafted: DataEmptyState, so it is role="status".

Text (same i18n keys and default values), the Retry control (preview-draft-retry, glyph included) and the outer preview-draft-empty-state wrapper 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 / DataErrorState zero times. Importers per block: InspectorEmptyState 7, StudioEmptyState 4, PreviewEmptyState 3, AppNoAccessEmptyState 2, agentEmptyState 1, PreviewDraftEmptyState 1.

PreviewDraftEmptyState is 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 to DataErrorState" lands exactly here. It has one importer (AppContent.tsx, not edited), is outside ObjectView.tsx and seat 2's packages, and no claude/* branch on origin touches it (depth-1 blob compare of all 707 heads against main; control file DraftChangesPanel.tsx differs on many). Non-claude/* branches were not scanned.

app-shell is outside the sdui registry closure: node scripts/gen-sdui-manifest-node.mjs re-recorded scripts/sdui-manifest.record.json byte-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 is role="alert" with data-slot="data-error-state" and no status; not-yet-drafted and nothing-drafted are role="status" with data-slot="data-empty-state" and no alert; one Retry control in each pane calls onRetry.

  • Run at 250585b: that file plus ui/packages/i18n/src/__tests__/draftBar-es-register-3844.test.ts (which names this component), Test Files 2 passed (2), Tests 15 passed (15).
  • Ablation: with the fix committed, the source reverted to its main version, the new file reads Tests 3 failed | 2 passed (5) (the three role tests red, the two Retry tests green as expected); restored with git checkout HEAD --, git diff HEAD empty and blob hash equal to HEAD.
  • pnpm --filter @object-ui/app-shell type-check (both tsc --noEmit and tsc -p tsconfig.test.json), after building @object-ui/app-shell^...: exit 0.

Acceptance notes


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01FdXMkfnYedDKghz7QLUkx8

… 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
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Oct 26, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 · ACCEPT · seat domain:ui#1 · 2026-10-26T14:02Z

Head be8112d0e4 (read from the PR object): origin/main 95294be3 merged onto the reviewed 250585bd.

  • Shape. Draft on main; Part of #25915 (slice 1 of a surface-by-surface convergence); Clause-②: no, Metadata-protocol: none; changeset .changeset/25915-preview-draft-shared-states.md in the root .changeset/, patch for @object-ui/app-shell. Files match the claim: the surface, its new test, the changeset.
  • Checks pinned to the head. 54 named check runs, latest per name: 46 success, 8 skipped, 0 failing, 0 pending.
  • Governed surface. check-governed-merges.mjs --pr 26135: 0 of 3 paths governed, +123/-29.
  • Diff read. Failure renders DataErrorState (role="alert", renders its children, so the Retry node with its preview-draft-retry test id and glyph stays). Not drafted and nothing drafted render DataEmptyState (default role="status") with the same Retry node as action. i18n keys and default strings are unchanged. No new prop on either shared component, so Clause-②: no holds.
  • Tests. The new file pins alert-vs-status for each of the three states and the single Retry button. The dev reports an ablation (the 3 role tests go red on reverted source) and the Console build on the merged tree.
  • Serial constraints. app-shell is outside the sdui registry closure; check-sdui-manifest is green on the merged tree and no record file is in the diff. The ⛔ paths are untouched.

Landing: ready + auto-merge through the relay.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 26, 2026 14:03
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 601c773 Oct 26, 2026
55 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-ztb3fw branch October 26, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants