This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
test(app-shell): pin the built-in header Edit under a session-user relation predicate (objectstack#8499) - #4666
Merged
Conversation
…lation predicate (objectstack#8499)
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
yinlianghui
marked this pull request as ready for review
August 15, 2026 06:18
yinlianghui
pushed a commit
that referenced
this pull request
Aug 15, 2026
The empty-frontmatter changeset is this repo's explicit exemption for a diff that touches released packages' src/ without changing published behaviour — the same answer PRs #4641 and #4666 gave the same gate. Two of the four touched test files live under plugin-form / plugin-detail src/, which the gate counts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnQd8iMMUwXQEV1crFmQiQ
This was referenced Aug 15, 2026
akarma-synetal
pushed a commit
to akarma-synetal/objectui
that referenced
this pull request
Aug 17, 2026
…-5); fork the four-block exemption (objectstack-ai#4671) * test(console,plugin-form): adapt the spec parity gates to 17.0.0 GA's new keys Pre-re-point adaptation for the GA pin bump (objectstack-ai#4636 / PR objectstack-ai#4639), implementing objectui#4648's delegated ruling for the items whose measurement held. - registry-inputs parity: `EXPECTED_COVERED` becomes pin-aware, so the four `object-*` blocks GA adds to `ComponentPropsMap` are expected exactly when the installed spec carries them, with the pin-dependence asserted rather than assumed. - five GA-added keys the renderers already honour (`page:header.maxVisible` / `.mobileMaxVisible`, `page:tabs.alwaysShowStrip`, `record:details.inlineEdit` / `.showHeader`) get GA-pending unpublished-key exemptions: declaring the inputs on the rc.6 pin would fail this file's own forward direction, so objectstack-ai#4668 owns declaring them once the pin moves. - `sectionFields.spec-parity`: `FormFieldSchema.publicPicker` gets a reasoned exemption (ruling item 5) — it gates objectstack's public-lookup REST route and has zero read points here. Both pending mechanisms are pinned sets whose dormancy is asserted to track the installed spec's element set in both directions, so an entry cannot rot into a silent allowlist. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnQd8iMMUwXQEV1crFmQiQ * test(plugin-detail): the record:details / record:highlights parity gates read GA's refusal, not rc.6's silent strip objectui#4648 ruling items 3 and 4, measured. Neither key set moved between 17.0.0-rc.6 and 17.0.0 GA and objectui publishes neither key, so there was nothing to stop publishing; what moved is HOW the spec says no. GA closed `RecordHighlightsProps` and the `record:details` section object under objectstack#4001 batch A, so an undeclared key now raises `unrecognized_keys` with a named message where rc.6 dropped it in silence. Both gates now assert the same verdict through whichever evidence the installed contract gives, with the mode probed behaviourally rather than read off a version string. A broken probe cannot go vacuously green: taking the wrong branch fails on either pin. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnQd8iMMUwXQEV1crFmQiQ * chore(changeset): declare this tests-only change as releasing nothing The empty-frontmatter changeset is this repo's explicit exemption for a diff that touches released packages' src/ without changing published behaviour — the same answer PRs objectstack-ai#4641 and objectstack-ai#4666 gave the same gate. Two of the four touched test files live under plugin-form / plugin-detail src/, which the gate counts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnQd8iMMUwXQEV1crFmQiQ --------- Co-authored-by: Claude <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes objectstack-ai/objectstack#8499
Premise falsified — the behaviour already ships; the pin did not
The card was measured on
@objectstack/*@17.0.0-rc.6. On currentmain(17.5.0) the console record header's built-in Edit already honorsuserActions.edit.visibleWhen:RecordDetailView.tsxevaluates it intoeditVisibleand consumes it as a fourth conjunct of thesys_editaffordance gate. So this PR adds no behaviour change — it adds the regression pin for the card's exact repro shape, which no test covered.Provenance — the wiring landed between rc.6 and 17.5.0, on both detail surfaces:
packages/app-shell/src/views/RecordDetailView.tsxDetailViewheaderpackages/plugin-detail/src/DetailView.tsxThe mobile overflow twin (
sys_edit_mobile, plugin-detail) is gated by the sameschema.showEditthat carrieseditVisible, so it converges too.The real gap: the card's predicate shape was untested on the built-in path
The card's declaration reads the session user against a relation field:
Two existing pins bracket that shape without covering it, from opposite sides:
RecordDetailView.userActionPredicates.test.tsx(objectui#4213) drives the built-in path, but only with self-containedrecord.statusstring compares. It mounts noExpressionProvider, soos.useris bound nowhere in it — a predicate reading the session user had never been evaluated on this path.RecordDetailView.headerActionLookupPredicate.test.tsx(test(app-shell): pin relation-field header-action predicates on the console record page #4641 / objectstack#8500) drivesos.user.idagainst a relation field, but only through declaredrecord_headeractions — a different consumption seam, deliberately not the built-in one.The card sits on the intersection, which is why it could be reported against a build that already carried the fix.
Why every case is a discriminating pair
visibleWhenfails CLOSED. An unboundos.user, a faulting compare, or a relation bound to the wrong side all hide the button — the same DOM as a correct evaluation, for the opposite reason. A pin asserting only absence would stay green if the predicate stopped being evaluated at all.So each case pairs both directions on one declaration: the executor themself gets no Edit, any other session user keeps it. Only a genuinely-evaluated predicate produces both; the "present" half is what a fail-closed fault cannot fake. Both relation payload shapes (bare foreign key and
$expanded) are asserted to reach the same verdict, plus an explicit assertion that no fault warning was emitted under thebuiltin:edit:visibleWhenlabel.Reverse verification — direction predicted before running
Predicted: removing the
editVisibleconjunct (the rc.6 state) turns the five "Edit absent" assertions red and leaves the three "Edit present" controls green. Observed exactly that:Restored from the committed state (
git checkoutof the branch's own commit), tree clean.Verification — all at head
3fcc3311f(the final commit)pnpm exec vitest run packages/app-shell/src/viewspnpm --filter @object-ui/app-shell type-checktsc --noEmit+tsc -p tsconfig.test.json)pnpm --filter '@object-ui/app-shell^...' buildscripts/check-changeset-presence.mjspnpm changeset:checkpnpm check:control-bytesTests-only, so the changeset is the gate's own prescribed exemption — an empty frontmatter. The gate's words:
Scope
One new test file plus that changeset.
RecordDetailView.tsxis byte-unchanged — the ablation above was reverted.Generated by Claude Code