Repository navigation
fix(app-shell): tell an approver who may read none of the submitted fields, instead of an empty pane - #39479
Draft
objectstack-fleet[bot] wants to merge 8 commits into
Draft
fix(app-shell): tell an approver who may read none of the submitted fields, instead of an empty pane#39479objectstack-fleet[bot] wants to merge 8 commits into
objectstack-fleet[bot] wants to merge 8 commits into
Conversation
…d fields The approval request page drew nothing in the submitted record's place when the reader could read none of its fields: the object's definition is withheld from a reader without object read, and the snapshot is redacted to nothing. The card now draws "You don't have access to this object's fields; ask an administrator." in that case. The redaction is unchanged. Claude-Session: https://claude.ai/code/session_016WV4d1cnRvyiAqrarmDhZV Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4d1cnRvyiAqrarmDhZV Co-authored-by: Claude <noreply@anthropic.com>
…e no-access pin Claude-Session: https://claude.ai/code/session_016WV4d1cnRvyiAqrarmDhZV Co-authored-by: Claude <noreply@anthropic.com>
… the snapshot Claude-Session: https://claude.ai/code/session_016WV4d1cnRvyiAqrarmDhZV Co-authored-by: Claude <noreply@anthropic.com>
…y pack Claude-Session: https://claude.ai/code/session_016WV4d1cnRvyiAqrarmDhZV Co-authored-by: Claude <noreply@anthropic.com>
… the snapshot whole Claude-Session: https://claude.ai/code/session_016WV4d1cnRvyiAqrarmDhZV Co-authored-by: Claude <noreply@anthropic.com>
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
This branch has not been deployed
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.
Part of #39406. This PR carries the decision-time half (the request page says the reader has no field access instead of rendering empty). The design-time half (a save-time warning naming the approver without read) is not in it: its premise did not hold where the card placed it, and it waits on a decision the report on the card spells out.
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
SubmittedRecord.tsx: the submitted-record card draws a notice, "You don't have access to this object's fields; ask an administrator.", where it used to draw nothing. Two answers trigger it, and nothing else does:hidden) while the reader's permissions deny reading the object;ApprovalDecisionPanel.decidedSnapshot-27502.test.tsxpins it, and this PR's first version broke it; the denial condition above is the fix).approvalsInbox.snapshotNoFieldAccessinenandzh-Hans.Tests
ApprovalDecisionPanel.noReadableFields-39406.test.tsx: three ways the reader sees none of the fields (object withheld; object readable, no field; snapshot served whole, every field denied client-side), each asserting the notice text and that no submitted value or field label reaches the page; two controls (an absent definition the reader may read claims no gap; one readable field draws the card and no notice).Acceptance notes
all-locales-key-parity.test.ts. The new key is inenandzh-Hansonly, so the nine other packs (ar,de,es,fr,ja,ko,pt-BR,ru,zh-Hant) each miss one key. The claim's file surface namesenandzh-Hansonly and says to stop on a breach, so the other nine packs are not edited here; adding them is a one-line, new-key-only edit per pack, waiting on the seat's word.validate-approval-approvers.ts, with permission data in reach. Measured: permission SETS are in reach there (stack.permissions, also carried at the save door), but which sets an approver holds is not. Foruser,manager,team,department,queue,fieldandexpressionapprovers it is runtime data (user-to-set and user-to-position assignments,sys_user.manager_id), which no lint rule can read. Forpositionit is the position's ownpermissionSetsmetadata, which the CLI stack carries but the runtime save door does not (RuntimeStackContextcarries objects, permissions, books, datasets and flows, no positions). So the card's own example, a manager approver, cannot be judged at design time anywhere a lint rule runs, and a save from Studio cannot judge a position either without widening the gate's context. The options are on the card.ApprovalDecisionPanel.fullRecord-34588.test.tsxacceptance 1 failed once in a directory run on a loaded shared box (the child rows did not arrive inside the 1000 mswaitFor) and passed alone on both the base and this head. The child table loads@object-ui/plugin-detaillazily inside that window;check:test-source-aliasonly judges test files a change adds or edits, so it does not ask that file to pay the load at collection.Verification
Read first, by risk:
SubmittedRecord.tsx, thenoFieldAccessderivation inuseSubmittedRecord(when the notice claims an access gap).SubmittedRecord.tsx, theSubmittedRecordCardearly return and the notice block.Two-minute check:
pnpm --dir ui exec vitest run packages/app-shell/src/views/approval-decision/ApprovalDecisionPanel.noReadableFields-39406.test.tsxfrom the repo root; expect 5 passed. Against the base component the three notice cases fail and the two controls pass.Local readings, head 9e96ba5
Tests 3 failed | 2 passed (5), the three notice cases failing.Tests 9 passed (9).approval-decision/directory on head:Tests 1 failed | 107 passed (108), the one failure being the 34588 timing note above; that file alone:Tests 12 passed (12)on head and on base.pnpm --filter @object-ui/app-shell run type-check(bothtsconfig.jsonandtsconfig.test.json): exit 0, 0 errors.approval-approvers-may-resolve-empty, none about read, with and withoutatSaveDoor.check-comment-mask-corpus,check:query-options-erasuretimed out at 300 s on a shared box at load 6 to 9;vitest run scripts/underui/not run),dispatch-gates --ranexit 0.🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4d1cnRvyiAqrarmDhZV