Repository navigation
fix(app-shell): Setup's Assigned users grants a permission set by name alone (objectui#7611, PR-3) - #12159
Merged
Conversation
…objectui#7611)
addUsers creates sys_user_permission_set with { user_id, permission_set }:
no sys_permission_set row is read and no permission_set_id is written
(objectstack ADR-0131 D10, stage 6b-2-pre). resolveGrantRowId and the
noGrantRow refusal go; the module doc says what the section reads and writes.
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rerax7QTjKMPCUZxQUtPFR
…ows, and revoke (objectui#7611)
Three pins on a fixture with no sys_permission_set row: ADD writes exactly
{ user_id, permission_set } and reads no catalog row; a 400
reference_not_found from the adapter shows in the server's words; REMOVE
deletes the direct grant by its row id. The changeset states the grant by
name and the server floor; part 1's changeset drops the sentence this makes
false.
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rerax7QTjKMPCUZxQUtPFR
…ectui#7611) Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rerax7QTjKMPCUZxQUtPFR
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 was referenced Oct 11, 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.
Part of #7611
Clause-②: no
PR-3 of the #7611 remainder (census item 5,
resolveGrantRowIdoff the row), dispatched under claim amendment 6111342697. It follows objectstack-ai/objectstack#22863 (stage 6b-2-pre, on objectstackmainas0253192f76), which makessys_user_permission_set.permission_setthe grant's required, writable reference and leavespermission_set_idoptional with no writer. #7611 stays open: PR-4 (the clone door), PR-5 (per objectstack-ai/objectstack#22865) and PR-6 (after stage 8) remain.What changes
AssignedUsersSectionwrites a grant by name alone.addUserscreatessys_user_permission_setwith{ user_id, permission_set }. It no longer reads the set'ssys_permission_setrow and no longer writespermission_set_id.resolveGrantRowId, thenoGrantRowrefusal and its two strings (en, zh) are gone; nothing else used them (git grepfor both names returns only this file at the base). The module doc now says what the section reads and writes: holders by name, ADD by name, REMOVE by the grant's row id, distributing positions from the registry.organization_id, as before. Measured below: the server stamps the caller's organization on the grant..changeset/7611-grant-by-name.md(@object-ui/app-shellminor) states the change and the server floor. The unreleased part-1 changeset.changeset/7611-setup-catalog-registry.mddrops one sentence this PR makes false ("A new grant still carriespermission_set_id..."). This is a bounded in-place edit; the four conditions are listed under Acceptance notes.Measured on a fresh showcase
The backend is objectstack
origin/main72b26ed4f5(it contains0253192f76), built from a detached worktree and booted withobjectstack dev --seed-admin --freshon its own port. The console is this branch'sapps/consoleunder Vite, proxied to that backend. Chromium was driven by Playwright and logged in as the seeded admin. The holder is a user the admin created throughPOST /api/v1/auth/admin/create-user, because self-registration is closed on the showcase.Precondition: no catalog row. The platform set
viewer_readonlyis served by the registry (GET /api/v1/meta/permission/viewer_readonlyanswers the item). Itssys_permission_setrow was deleted from the fresh SQLite file. The data door'sDELETEanswered200withsuccess: falseand left the row in place, so the row was deleted directly in the database. On this pre-6b-2 server the platform re-created that row once, when the holder user was created: the new row'screated_atmatches that request. So the script deletes the row at the moment of each click. It reads the row count back:0at the click and0after the add.sys_permission_set/sys_user_permission_setGET /api/v1/auth/me/permissions0665c3be7file swapped in, then restoredGET sys_permission_set(name filter) answers no row; no POSTshowcase_member_default,member_defaultsys_permission_setread;POST sys_user_permission_set201, request{"user_id":"…","permission_set":"viewer_readonly"}; the stored grant readspermission_set_id: null,organization_idset to the caller's organizationdirectviewer_readonly…/metadata/permission/no_such_set_7611?scope=environment(the editor opens it create-only and still shows Assigned users)POST400VALIDATION_FAILED,fields[0]permission_set/reference_not_foundDELETE sys_user_permission_set/ID200success: trueviewer_readonlyThe control leg's file swap was undone with
git checkout HEAD --on the absolute path. The restore was proven by an emptygit diff HEADand by the blob hash equal to HEAD's (00f7e7c921e2). The servers were stopped by PID afterwards, and the--freshdirectory was removed with them.Tests (head
45e2c0c4d)pnpm exec vitest run packages/app-shell/ --maxWorkers=2(the whole package, under the shared verify lock):Test Files 1271 passed | 1 skipped (1272),Tests 12325 passed | 9 skipped (12334).pnpm --filter @object-ui/app-shell type-check(tsc --noEmit && tsc -p tsconfig.test.json): exit 0.tsc -p tsconfig.test.json --listFilesOnlylists all three touched files.AssignedUsersSection.test.tsx, on a fixture with nosys_permission_setrow: ADD writes exactly{ user_id, permission_set }and reads no catalog row; a400 reference_not_found, built as the client builds it and passed through the adapter's ownnormaliseClientError, is shown in the server's words; REMOVE deletes the direct grant by its row id. The picker double became a one-button stand-in that makes the real dialog'sonSelectRecordshand-off.scripts/ablation-replace.mjs(the anchor must hit once, the blob must change, then a restore proven bygit diff HEADbeing empty and the blob being equal to HEAD's) with the shell's owntraprestore. In each run exactly the targeted pin went red and the other 7 tests stayed green:permission_set_id: 'ps_legacy'in the create body: pin 1 red attoHaveBeenCalledWith;sys_permission_setfind before the loop: pin 1 red atnot.toContain('sys_permission_set');setError(cleaned || c.addFailed)changed tosetError(c.addFailed): pin 2 red ("Failed to assign. Please try again." received);removeUser(r.grantId!)changed toremoveUser(r.userId): pin 3 red attoHaveBeenCalledWith.eslint --no-inline-config --format jsonwas run on the three touched files: 3 files, 0 errors. The population comes from the config itself:eslint --print-configon the source file answers 118 rules, with noparserOptions.projectand noprojectService. So type-aware linting is off. No rule undereslint-rules/reads the filesystem, so this diff cannot move a verdict on an untouched file. The repo-widepnpm lintis CI's.node scripts/check-changeset-presence.mjs,check-changeset-no-major.mjs, andpnpm check:new-line-citations,check:control-bytes,check:vi-mock-inherit,check:vi-mock-specifiers,check:vi-mock-override-shape,check:test-path-roots,check:changeset-claimsandcheck:pending-changeset-literals.Acceptance notes
PermissionMatrixEditor.tsx'scloneToCustomizesays "AssignedUsersSectionresolves the same set's record the same way". After this PR it does not. The carrier is PR-4 (census item 4), which replaces that row read with the server clone door. It is noted here and not filed.noGrantRowtext instead. The gate isPermissionMatrixEditor'sshowAssignments, which is outside this PR. It is reported to the seat.permission_set_id, so there the add is refused with400and the section shows that refusal. The basis is the 400 that the removed module doc recorded on the earlier objectstackmain. The changeset says so.RelatedListtests inplugin-detailstill usepermission_set_idas a fixture column name. They test the related-list engine, not a grant writer, and are left alone (census row 8c territory).Not in this PR
CapabilityMultiSelectField,PermissionMatrixEditor,decisionOutputParams.tsor the clone dispatch.CHANGELOG.mdand nothing in objectstack.Session:
https://claude.ai/code/session_01Rerax7QTjKMPCUZxQUtPFR(a subagent of the epic PM seat,mode:subagent).Generated by Claude Code