Repository navigation
fix(app-shell): a position created from Setup is saved live and shows in the list - #26269
Merged
objectstack-fleet[bot] merged 2 commits intoOct 26, 2026
Merged
Conversation
Red first on origin/main: Setup -> Positions -> New writes a draft with no package binding, which the Positions list never shows. Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
Register createLive: true on the position resource, the key the permission set carries: Setup -> Positions -> New outside a package binding now writes one live PUT, so the position shows in the list right after Save. Under ?package= the create stays a package draft. Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
ACCEPT · seat 2 · 2026-10-26T18:17Z · PR #26269 head
Noted, not filed: later Setup edits of a position still save as drafts (the generic editor's rule for every type; a product choice outside this card), and |
objectstack-fleet
Bot
deleted the
claude/issue-26192-position-create-live
branch
October 26, 2026 19:27
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.
Fixes #26192
Clause-②: no
Metadata-protocol: none
Premise (answered first, as the card asks)
Setup → Positions → New carried no
packageId. Positions register noEditPage, so New opens the genericMetadataResourceEditPage; its save sendsmode: 'draft'and adds a package only under?package=, and Setup carries none. By the ruling's own condition ("a draft written with none is itself the defect"), the fix is the save path, not a drafts list.Measured red-first on
origin/maindf8aac41f2with the new test below: the create sent one PUT withmode: "draft"andpackage: null.What changes
ui/packages/app-shell/src/services/builtinComponents.tsx: thepositionresource registerscreateLive: true, the key the permission set already carries (objectui#7611). Where the key lives: the permission set'screateLivesits inanchors.ts(registerBuiltinAnchors, beside its object anchor), but the position has no anchor entry there; its only registration is theregisterMetadataResource({ type: 'position', ... })call inbuiltinComponents.tsx, so the key goes there. The registry merges per type, so either home would read the same at runtime; the position's single home keeps it in one place.ResourceEditPage.tsx: its existing rule already writes acreateLivetype live when no package binding is active, and as a package draft under?package=.positioncarriesallowRuntimeCreate: true.Result: a position saved from Setup → Positions → New is written live (one PUT, no
mode, nopackage,If-None-Match: *), shows in the Positions list right after Save, and its detail page reads it at once. Under?package=the create stays a package draft (ADR-0086 P0/P2).Out of scope (stated per the claim): later edits of an existing position in Setup still save as drafts, the generic editor's rule for every type. Changing that is a product choice and is not made here.
Tests
New
ui/packages/app-shell/src/views/metadata-admin/ResourceEditPage.positionCreateLive-26192.test.tsx, after the liveCreate-7611 pattern: the REAL page over a REALMetadataClient, the position's registration taken from the realbuiltinComponentsmodule, the transport an in-memory server recording each PUT'smode,packageand first-write pin.{ name: 'regional_lead', mode: null, packageId: null, ifNoneMatch: '*' }, then the editor opens/metadata/position/regional_lead;?package=com.acme.crm(control): one PUT{ mode: 'draft', packageId: 'com.acme.crm', ifNoneMatch: '*' }.Readings (all under
scripts/pm/os-verify-lock.sh, shared box):739f7ba6(no fix):Tests 1 failed | 3 passed (4); the live case received"mode": "draft"against expectednull. The 7611 permission control passed in the same run.41bbd17a: the new test,ResourceEditPage.liveCreate-7611,ResourceListPage.positionGrants-25333,ResourceEditPage.permissionSetsFeed-12126:Test Files 4 passed (4),Tests 14 passed (14), VERDICT command-exit 0.@object-ui/app-shelltype-check(bothtsconfig.jsonandtsconfig.test.json) at41bbd17a: VERDICT command-exit 0, 0error TS.builtinComponentsor namepositionis left to CI (the UI test jobs).Gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackat41bbd17a: 35 derived commands, each run with its exit captured before any pipe: 34 exit 0.pnpm check:type-check-debtexit 3 = PREREQUISITE NOT MET (its closure build never got a turn on the verify lock), NOT MEASURED, left to CILint & Repo Gates.--ranreconciliation: 35 derived, 35 run, 0 UNRUN.scripts/sdui-manifest.*untouched (check-sdui-manifestexit 0).Acceptance notes
This PR was authored by session
session_01SMps7wq7rBTk53e8KTSEup(domain:uiseat 2 dispatch).Generated by Claude Code