Repository navigation
fix(app-shell): announce the route object-read and page record-load failures - #27366
Merged
Merged
Conversation
…ailures RouteObjectReadFailed (AppContent) and the page record-scope load failure (PageView) drew an Empty with no role, so assistive technology heard nothing when the read failed. Both now render the shared DataErrorState (role="alert" by construction), keeping their i18n keys and defaults, their test ids and their Retry controls (passed as children). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbZK9w6fe2Y6mGQjj6L
Contributor
Author
|
domain:ui#1 · os-warren · session_01JQwxbZeBv2y91towxasSUT 席位核对ACCEPT · seat 席位意见:Console 里两个加载失败块(路由对象读取失败、自定义页记录读取失败)原来画的是没有
Generated by Claude Code |
This was referenced Oct 29, 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 Warren · project thread
Part of #25915 (slice 3 of ruling B; slice 4, the retirement of
ViewSkeleton/ShimmerSkeleton, is the PR that closes the card).Clause-②: no
Metadata-protocol: none
维护者速读
DataErrorState组件绘制。role的Empty手绘,读屏软件在读取失败时什么都听不到;共享组件天生role="alert",失败会被播报,也与"空"区分开。ui/packages/app-shell/src/views/PageView.tsx的失败分支;ui/packages/app-shell/src/console/AppContent.tsx的RouteObjectReadFailed。pnpm --dir ui exec vitest run packages/app-shell/src/views/__tests__/PageView.appPageRecord-12931.test.tsx,预期全部通过,含新增的#25915用例。What changes
RouteObjectReadFailed(ui/packages/app-shell/src/console/AppContent.tsx) and the page record-scope load failure (ui/packages/app-shell/src/views/PageView.tsx) renderDataErrorStatefrom@object-ui/componentsinstead of a hand-drawnEmpty. The failure node is nowrole="alert"by construction.list.loadErrorTitle/list.loadErrorMessage,empty.recordLoadFailed/empty.recordLoadFailedDescription,common.retry), the test ids (route-object-read-failed,page-record-load-failedand their-retrybuttons) and both Retry handlers....props, and Retry is passed aschildren(the component's documented slot for a call site's own control) rather thanonRetry, so it keeps its own test id and, on the page, its icon. The shared default icon (destructiveAlertCirclesquare) replaces the page block's mutedAlertTriangle;AlertTriangledrops from the page's imports.@object-ui/app-shellisprivate: true, but its code ships inside the published@object-ui/consoleSPA, so the changeset bumps both aspatch(the same pair recent app-shell fixes carry).Tests
AppContent.disabledPackageDeepLink-13052.test.tsx: on a 5xx read theroute-object-read-failednode hasrole="alert"and contains its Retry; Retry asks once more and the served object renders with no alert. The existing served-object CONTROL also asserts no alert.PageView.appPageRecord-12931.test.tsx: the failed read's node hasrole="alert"and contains Retry; Retry re-reads, the loaded row renders, and no alert remains.Acceptance notes
Other app-shell blocks that draw a load failure by hand (listed for the card; not moved here, per the order):
views/metadata-admin/AuditPanel.tsx(audit-error-state, anEmpty),views/metadata-admin/ResourceEditPage.tsx(refs-error, anEmpty),views/metadata-admin/DirectoryPage.tsx(theengine.directory.loadFailedline, a baretext-destructivediv), andchrome/ErrorBoundary.tsx(the boundary fallback, anEmpty).objectViewHeaderChrome.tsxalso has one but is under theObjectView*exclusion.Verification
All readings at head
72976b7a(baseeef83734).Tests and ablation
os-verify-lock:pnpm --dir ui exec vitest run --maxWorkers=2on both. VERDICT command-exit 0, Test Files 2 passed (2), Tests 23 passed (23).origin/main(theEmptyblocks: agrep -cfor theDataErrorStateJSX opener reads 0 in each file, and for the oldEmptyopener carrying the test id reads 1 in each). VERDICT command-exit 1, Tests 2 failed | 21 passed (23). The two#25915pins went red ontoHaveAttribute('role', 'alert'), and every other test stayed green. Restored withgit checkout HEAD --: both blob hashes equalHEAD,git diff HEADempty.AppContentorPageView(56 files), under the lock: VERDICT command-exit 0, Test Files 56 passed (56), Tests 358 passed (358).pnpm --filter @object-ui/app-shell type-check(tsc --noEmit+tsc -p tsconfig.test.json), after building@object-ui/app-shell^...: VERDICT command-exit 0, 0error TS.Gates
dispatch-gates --commands --repo objectstack-ai/objectstackderived 34 families. All 34 ran, each with its exit code captured before any pipe, and all 34 exited 0 (pnpm --dir ui exec vitest run scripts/ran under the lock: 174 files passed, 2 skipped).--ranreconciliation: 34 derived, 34 run, 0 NOT-MEASURED.dispatch-gates --tier: no path-derived mandate.pnpm --dir ui run check:new-line-citations: 0 new citations, exit 0.Generated by Claude Code