Repository navigation
Commit fbb7599
fix(app-shell): draw the app no-access screen with the shared DataEmptyState (#26166)
<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi97Yc9Hw7zbkBCZQmMnndL2D)_
Part of #25915
Clause-②: no (one block swaps its own markup for the shared components;
no exported type change. If a shared component needs a new prop, the
thread reports first and the seat amends this line)
Metadata-protocol: none
## What
Slice 2 of #25915 (slice 1 was #26135).
`ui/packages/app-shell/src/console/AppNoAccessEmptyState.tsx`, the
screen an app's root shows when the app serves the caller no navigation
or names only objects the caller may not read, now renders
`DataEmptyState` instead of the bare `Empty` primitive. It is announced
as `role="status"`.
Unchanged: every i18n key and default value, the
`app-no-access-empty-state` wrapper, the `app-no-access-open-setup` link
(now the `action`), and `data-reason`, which moves from the description
paragraph to the status node. `DataEmptyState` spreads extra props onto
its root, so no prop was added to the shared component. The title takes
the shared component's smaller size, which is the visual diff.
## Why this block (measured on main 601c773)
Of the remaining app-shell blocks, this one hand-copied
`DataEmptyState`'s icon square class string verbatim (`flex size-10
items-center justify-center rounded-lg bg-muted`) around the `Empty`
primitive, and carried no role. Its only importer is `AppContent.tsx`
(two call sites, not edited); `appServesNoNavigation.ts` names it in a
comment only. `AppContent.tsx` already imports `DataEmptyState` through
`PreviewDraftEmptyState` since #26135, so the eager graph gains no
module.
Not chosen for this slice: `agentEmptyState` returns title/description
data, not a block; `StudioEmptyState`'s sentence is a ReactNode where
`DataEmptyState.description` is a string (would need a prop);
`PreviewEmptyState` has a warn tone with no shared equivalent;
`InspectorEmptyState` has 7 importers.
No `claude/*` branch on origin carries a different version of the file
(depth-1 blob compare of 723 heads, 73 carry it, 0 differ). app-shell is
outside the sdui registry closure, so
`scripts/sdui-manifest.record.json` is not in the diff.
## Tests
New
`ui/packages/app-shell/src/console/__tests__/AppNoAccessEmptyState.sharedState-25915.test.tsx`:
the screen is a `role="status"` node with `data-slot="data-empty-state"`
inside the test-id wrapper; `data-reason` is on that node for both
reasons; Open Setup is the action and links to the setup path.
- Run at bd0b46a: the new file plus the unedited landing suites
`AppContent.emptyNavigationLanding-12079` and
`AppContent.noReadableObjectLanding-25338` (which reads `data-reason`
through the wrapper): `Test Files 3 passed (3)`, `Tests 16 passed (16)`.
- Ablation: with the fix committed and the source reverted to its main
version, the new file reads `Tests 4 failed (4)`; restored with `git
checkout HEAD --`, `git diff HEAD` empty and blob hash equal to HEAD.
- `pnpm --filter @object-ui/app-shell type-check` after building
`@object-ui/app-shell^...`: both `tsc --noEmit` and `tsc -p
tsconfig.test.json`, exit 0.
## Acceptance notes
- `InspectorEmptyState`, `StudioEmptyState`, `PreviewEmptyState` and
`agentEmptyState` stay for later slices; #25915 remains open.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01FdXMkfnYedDKghz7QLUkx8)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01FdXMkfnYedDKghz7QLUkx8
Co-authored-by: Claude <noreply@anthropic.com>1 parent 9993165 commit fbb7599
3 files changed
Lines changed: 128 additions & 40 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
59 | 79 | | |
60 | 80 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
0 commit comments