Repository navigation
fix(ui): draw a refused list or related-list read as no-access, not a retryable failure - #27856
Merged
Merged
Conversation
… retryable failure A 403 list read no longer offers Retry; a refused related-list read draws a neutral status line with the list's no-access sentence instead of a red action-refusal line. Claude-Session: https://claude.ai/code/session_01Utp6CqyAqjJmMJkdAQoyqn Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CqyAqjJmMJkdAQoyqn Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#4 · os-bill · session_01Utp6CbDAucNyQ4UtzCJKyh 席位核对ACCEPT · head
Generated by Claude Code |
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 Bill · project thread
维护者速读
ui/packages/plugin-detail/src/RelatedList.tsx的RelatedListLoadFailed;ui/packages/plugin-list/src/ListView.tsx的list-error-retry条件。pnpm --dir ui exec vitest run packages/plugin-list/src/__tests__/ListView.forbiddenNoRetry.test.tsx packages/plugin-detail/src/__tests__/RelatedList.readFailed-26415.test.tsx,预期全绿。Fixes #27841
Clause-②: no
Metadata-protocol: none
What changes
plugin-listListView). The load-error panel no longer draws the Retry button for theforbiddenkind (a 403 /PERMISSION_DENIEDread), joiningapi-disabled. A refusal is a grant only an administrator can give, so a retry re-reaches the same refusal.network(network failures and 5xx),unauthorizedandrejectedkeep Retry.plugin-detailRelatedListLoadFailed). Aforbiddenread is drawn as a neutral line:role="status"instead ofalert,border-border bg-muted/40and a muted icon instead of the destructive tint, no Retry, and always the list's existing no-access sentence (list.loadErrorForbiddenTitle/list.loadErrorForbiddenMessage). A producer'suserMessageon a 403 is no longer shown there: the server marks the generic action refusal ("You do not have permission to perform this action. Contact your administrator if you need access.") on a refused read, which was the red sentence the card saw. Every other kind is drawn exactly as before.Tests
plugin-list/src/__tests__/ListView.forbiddenNoRetry.test.tsx: a 403 draws the no-access panel with no Retry; controls: a 500 and a network failure still draw Retry.plugin-detail/src/__tests__/RelatedList.readFailed-26415.test.tsxgains a describe: a 403 carrying the action-refusaluserMessagedrawsrole="status", no destructive class on the line or its icon, the no-access title and sentence, no "perform this action", no Retry; controls: a 5xx keepsrole="alert", the destructive styling and Retry; a readable related list draws its rows.ListView.errorStateComponent-7143.test.tsx: the "retry button is still rendered" arm now fails with a 500 instead of a 403, since a 403 no longer offers one.Acceptance notes
38651598(tests unchanged): the two new refusal tests fail (ListView: Retry button present; RelatedList:role="alert"received wherestatusexpected), and their 14 sibling tests, the controls included, pass. Restored bygit checkout HEAD,git diff HEADempty, blob hashes equal HEAD. The red action sentence on main is read from the code (declaredUserMessagewins over the fixed copy) and is asserted absent by the new test on the fixed tree; it was not measured on a live stack.unauthorized(401, "Sign in required") still offers Retry in both places. The card names 403 only; left as is.text-destructive/60icon; the card asks only that it drop Retry.type: 'api'click goes through the action door #27793 regions (RelatedList.tsxdocblock near the API-door note,RecordDetailView.tsxapiHandler) are not touched; this diff edits onlyRelatedListLoadFailedand its docblock.Verification
All readings on head
fa457cd3(branch merged withorigin/main).Tests and type-check
pnpm --dir ui exec vitest run --maxWorkers=2onListView.forbiddenNoRetry.test.tsx,ListView.errorStateComponent-7143.test.tsx,ListView.loadErrorKind.test.tsx,RelatedList.readFailed-26415.test.tsx: Test Files 4 passed (4), Tests 39 passed (39); os-verify-lock VERDICT command-exit 0.pnpm --filter @object-ui/plugin-list --filter @object-ui/plugin-detail run type-check(tsc --noEmit and tsconfig.test.json): VERDICT command-exit 0, on the pre-merge head; the merge brought nothing under these packages.Gates
dispatch-gates --commandsderived 34 families; all 34 ran, exit 0.--ranreconciliation: 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN.node scripts/check-sdui-manifest.mjsamong them, exit 0.pnpm check:new-line-citations(ui): 0 new citation(s), exit 0.🤖 Generated with Claude Code
Generated by Claude Code