Repository navigation
test(console): pin record:quick_actions member shapes (objectui#8071 slice 4) - #8860
Merged
Merged
Conversation
…slice 4) Converts both remaining `record:quick_actions` MEMBER_PIN_EXEMPTIONS entries (actionNames, requiredPermissions) into real per-block member pins and lowers MEMBER_PIN_EXEMPTION_CEILING 50 -> 48 in the same commit. `actionNames` promotes a pre-existing file (recordQuickActionsInputs.actionNamesFallback.test.tsx, written for objectui#4663 but already driving the exact read this key needs) after reading it end to end; `requiredPermissions` had no existing candidate — the only prior reference to that name in this renderer's tests is an ActionDef's own per-action field, a different mechanism from the block-level gate this key declares — so it is a new file (record-quick-actions.requiredPermissions-gate.test.tsx). Refs #8071 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
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.
Refs #8071
Fourth slice of objectui#8071's transition: both remaining
record:quick_actionskeys converted from member-pin exemption to member pin, andMEMBER_PIN_EXEMPTION_CEILINGmoved down with the list in the same commit.Re-derived on this branch's base (
origin/main42df92809)Copied slice 3's instrument rather than a brace-depth counter:
ts.createSourceFile+ a visitor overVariableDeclarationnodes, counting each object literal's ownPropertyAssignmentchildren. Controlled at two commits:origin/main(42df92809, this branch's base)MEMBER_PINSMEMBER_PIN_EXEMPTIONSMEMBER_PIN_EXEMPTION_CEILINGThe 50/40 base reading matches the card's claim comment (
5604086894) and slice 3's landing note (5603836330) — the ledger has not moved since. Population does not move; a pin and an exemption are the two halves of one partition.toBeis EXACT in both directions" — is a real sentence in this file, but it is not aboutMEMBER_PIN_EXEMPTION_CEILING. It sits in the differentthe objectui#8176 backlog has a ceilingtest (UNPUBLISHED_EXEMPTIONS/LAZY_REGISTERED_BLOCKS, onlyobject-calendar/object-kanban), which does carry two literal assertions (toBeLessThanOrEqual(1)andtoBe(1)).MEMBER_PIN_EXEMPTION_CEILINGhas exactly one assertion (toBeLessThanOrEqual,:3945), driven symbolically off the constant — confirmed against slice 3's own merged diff (9e9a4b6da), which touched only theconst MEMBER_PIN_EXEMPTION_CEILING = 54line and no assertion. This slice moves the one constant; no second assertion needed editing.Which keys, and why these
record:quick_actions—actionNames,requiredPermissions. This is the entire remaining exemption list for the block (both of its two array-armed keys) — a coherent whole-block closure, the shape slice 3 set withelement:record_picker. Neither key neededNO_READ_SITE_TO_PIN: both have a real read site inrenderers/record-quick-actions.tsx.Per key — where the renderer reads it, and the shape found
actionNamesresolveDeclaredActionIds→useMetadataItem('object', objectName)actions; with none declared (and no hostactions) the metadata layer is never queried and the empty placeholder renders — a fallback the registered description used to promise but the code never took (objectui#4663).requiredPermissionsrequired.every((p) => perms.can(objectName, p)), evaluated before any action is drawnActionDef's own per-actionrequiredPermissionsfield, a different mechanism thegatedfixture indeclared-action-ids-7182.test.tsxalready exercises. The whole array must be held (.every, not just element 0); with none declared the gate never asks the permission system at all.One promoted pre-existing file, one new
recordQuickActionsInputs.actionNamesFallback.test.tsx(actionNames) was read end to end before being credited — it was written for objectui#4663 (the registered description over-promised a fallback), not for this direction, but its second case already drives the exactuseMetadataItemread this key needs pinned.requiredPermissionshad no candidate anywhere in the repo: the only prior reference to that name on this renderer's surface is anActionDef's own per-action field (a different mechanism, exercised indeclared-action-ids-7182.test.tsx), never the block-levelschema.requiredPermissionsgate. New file:record-quick-actions.requiredPermissions-gate.test.tsx— a CONTROL row (no key declared → renders regardless of the grant set,perms.cannever called), a positive read (one permission, granted → renders; denied → whole bar hidden), and the discriminating row: a partial grant on a two-entry array still gates the bar (.everyover the whole array, not element 0), with the all-granted case as that row's own positive control.Ablation — both mutations proven on disk before being read, restored via
git checkout HEAD -- ABS_PATHfrom atrap … EXIT INT TERM, restoration proven by blob-hash equality againstHEAD(not exit code) plus an emptygit diff HEAD'record:quick_actions.actionNames': AWAITING_A_PINtoMEMBER_PIN_EXEMPTIONSwithout raisingMEMBER_PIN_EXEMPTION_CEILING2f106ed→2df9d65carries no stale member-pin exemption, andthe member-pin exemption list only ratchets DOWN(49 > 48) all catch it, same three rows slice 3's ablation namedrecord-quick-actions.tsx(the RENDERER, not the test)requiredforced to[]regardless ofschema.requiredPermissions— the read severed at its sourceea73102→d665dc4Non-vacuity:
vitest run apps/console/.../registry-inputs-spec-parity.test.tsis exit 0 at rest both before ablation 1 and after its restoration (198/198 both times). The three-file group for ablation 2 is exit 0 / 14 passed both before and after.Base →
origin/mainwindow checkNon-empty both times it was taken. First:
42df92809(base)..561abefd7— one commit, touching onlypackages/core/src/adapters/**,packages/fields/src/widgets/FilterConditionField.tsxand their tests/changeset — disjoint from every file this slice reads or edits. Re-checked immediately before opening this PR:561abefd7..8a388ee76— one more commit,content/docs/utilities/data-objectstack.mdxonly — again disjoint. Neither window touches the gate file,record-quick-actions.tsx, or any file in therecord:quick_actionstest family.Collision check against the two other branches named live right now
git diff --name-onlyagainst both: zero files in common.claude/kanban-gantt-family-retirement's live (uncommitted) edits areapps/console/src/register-plugins.tsandpackages/plugin-gantt/src/index.tsx;claude/issue-8738-fields-warn-route1's are four files underpackages/plugin-form/src/. Neither touches the gate file'srecord:quick_actionssection,record-quick-actions.tsx, or any file this PR adds. (A third, later-noticed branch —claude/issue-8738-fields-warn-route1/ draft PR #8859 — touches ONE line of this same gate file: the prose inside the pre-existingMEMBER_PINS['object-form.fields']entry, ~60 lines above my nearest hunk (:2212vs my closest hunk starting:2271). No semantic or textual overlap; flagged here in case #8859 lands first and this PR needs a routine merge.)Ledger-hazard check (
scripts/check-doc-example-types.mjsUNGATED_EXAMPLES)This diff shifts line numbers inside
registry-inputs-spec-parity.test.ts(net +54 lines) and adds a new file. Neither is a ledger key:grep -c "registry-inputs-spec-parity" scripts/check-doc-example-types.mjs→ 0, same forrecord-quick-actions.requiredPermissions-gate→ 0. Firing control: the identical grep against a path that is a key (AuthGuard.tsx) → 1. No re-keying owed.Gates
vitest run apps/console/src/__tests__/registry-inputs-spec-parity.test.ts(the gate itself)vitest runthe newrequiredPermissionspin file alonevitest runthe promotedactionNamesfile alonepnpm --filter '@object-ui/console^...' build,'@object-ui/plugin-detail^...' buildpnpm --filter @object-ui/console run type-checktsc --noEmit && tsc -b tsconfig.node.json --forcepnpm --filter @object-ui/plugin-detail run type-checktsc --noEmit && tsc -p tsconfig.test.jsonpnpm --filter @object-ui/console run test(full package)pnpm --filter @object-ui/plugin-detail run test(full package)record:quick_actions-family test files togethernode scripts/check-changeset-presence.mjsnode scripts/check-vi-mock-specifiers.mjs/check-vi-mock-inherit.mjs@object-ui/permissionsmock inherits real exports via...actualeslint(narrowed to the 2 changed/new files,--no-inline-config)no-explicit-anywarnings, matching the neighbouring suites' house style (verified: sibling files in the same family carry the identical warning)Every vitest run above printed
RUN v4.1.10 /home/user/objectui-issue-8071-slice4— this worktree's own root, not a sibling's. Exit codes captured before any pipe (cmd > log 2>&1; EXIT=$?). Repo-widepnpm lintand CI's own full-farmcheck:*sweep were not taken locally (CI-owned).Out-of-scope findings
None filed. No trap-shaped near-miss files were found this slice — the one promoted file pins exactly the key it is credited for, and the new file was written fresh rather than adapted from a near-miss.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w
Generated by Claude Code