Repository navigation
feat(app-shell): a create with no named package asks to pick or create one - #38204
objectstack-fleet[bot] wants to merge 19 commits into
Conversation
…from outside it The premise the App Studio create ask rests on: a position saved into a new writable package still grants its holder another package's set, a code package's set and a loose set. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzywxH36FPH6ayWMUe
…ge holds Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzywxH36FPH6ayWMUe
…e one (WIP) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzywxH36FPH6ayWMUe
…eate pins The create ask's own tests (the Setup list, the item editor, the console create's package pick), and the existing pins that held the retired package-less create moved to the ask, the refusal, or a named package. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzywxH36FPH6ayWMUe
…te, and the report's ask and refusal Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzywxH36FPH6ayWMUe
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzywxH36FPH6ayWMUe
…notice Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzywxH36FPH6ayWMUe
…form, never in the address before the save On Studio's cross-package leg a `?package=` written before the save moved the page into the package's area and remounted the form. The answer is now held for the form: a retried Save reuses it, and the item opens under it. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzywxH36FPH6ayWMUe
…rit the wizard module's mock, count the create-app chunk Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzywxH36FPH6ayWMUe
📓 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): |
…age-id address The shell serves Setup at its package id, not at the setup alias the page prefix-read on, so the sub-path came out empty there and Positions, New rendered a blank page. Read the route's own splat instead. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzywxH36FPH6ayWMUe
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzywxH36FPH6ayWMUe
The leg's New asks for the package with nothing pre-selected, so the pin that New alone picked the first package retargets to the ask. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzywxH36FPH6ayWMUe
…sk is a package-create door The Save as view chart case stubbed the authenticated fetch as a no-op, so the create's package read failed and the create asked instead of saving. The resource list's create-package door now lives in the create ask. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzywxH36FPH6ayWMUe
The Create View refusal cases and the new-dataset seed cases created with no readable package, so the create asked instead of saving: the routed app's package answers the first, the address names one for the second. The create-app route's lazy boundary is the console wrapper now, so the two route tests pay its load at collection as they pay the designer's. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzywxH36FPH6ayWMUe
…eate tests Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzywxH36FPH6ayWMUe
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzywxH36FPH6ayWMUe
…t Save The catalog's New asked and wrote the answer into the create's address, but Studio's area drops ?package= under the environment scope, so the editor's Save asked a second time. New now opens the create in the scope and the editor's Save asks. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzywxH36FPH6ayWMUe
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzywxH36FPH6ayWMUe
|
repo:objectstack#3 · os-tesla · session_01L9qibwsYQqi3TBx2SFE978 Contract reviewServed-tier: The face is the declaration alone: ① Derived judgments
② Semver levelAdditive on both published packages. Each takes ③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-tesla · session_01L9qibwsYQqi3TBx2SFE978 L1-b, the seat's L1 thread for zone o3-studio · 2026-11-28T13:03Z 席位核对 — L1 REWORK @
|
repo:objectstack#3 · os-tesla · session_01L9qibzywxH36FPH6ayWMUe
Requested by Tesla · project thread
Fixes #38149
Fixes #38206
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
What changes
A create whose address names no package now asks the person to pick a package or create one, before anything is written (ADR-0070 D3, ADR-0084's amendment of 2026-11-26). One dialog (
PackageCreateAsk.tsx) serves every create path. It offers the packages the server says this caller may write (writable: trueonGET /api/v1/packages), never a kernel package. Its "New package…" button reuses the Packages page's create dialog. Cancel writes nothing.?package=the person named (link or scope selector)?scope=environment): positions, permission sets (Q-a, answered A)/studio/~all/metadata/TYPE)/…/TYPE/newwith no?package=createLive)403)/apps/:app/create-app)saveItem('app')naming no packageobject-draftread, then a package-less client saveThe open readings I picked:
?package=repair now writes the location-state keyobjectui.packagePickedbeside the address it repaired. A?package=is named only when that mark is absent or names a different package. A link and the scope selector write no state, so they stay named. The list's own address writers carry the state through.ConsoleCreateAppPage, keeps the plugin-designer wizard.CreateAppPagegains an optionalsaveApp(name, app); the wrapper asks, then saves as Studio's new-app door does (first-write-pinned draft, then that one item's publish).POST /api/v1/datasources/:name/external/tables/:remote/import. It is the same external-datasource service asremote-tablesandobject-draft, and Sync is offered only on a federation source.The Q-a premise was measured first, as a real kernel test, before any UI was built (
position-in-package-binds-outside-sets-38149.dogfood.test.ts, kept in this PR). The setup:PUT ?mode=draft&package=, thenPOST …/publish?package=);Result: 4/4 green. The holder is granted all four sets. A live package-less edit of a set lands on the package's own row. A set the position does not name is not granted. The ablation is in Tests.
The editor holds the chosen package for the form; it never writes it into the address before the save. Measured live: on the
~allleg, a?package=written first moved the page into the package's area and remounted the form mid-save.Not in this PR, as the dispatch ordered:
docs/adr/**edit. What 9's marks go to the kernel-close card.packages/spec.view.savedOutsideApp/report.builder.savedOutsideAppi18n keys are kept, only unused.Surface beyond the claim, each a one-line consequence:
packages-io.ts: the ensure door's error carriesstatus.ObjectView.tsx: renders the ask's dialog.ConsoleCreateAppPage.tsx: new.AppContent.tsx: the create-app chunk.plugin-designer/src/index.tsx: the type export.Setup's access directory reads its own sub-path (#38206)
AccessDirectoryPageread the sub-path below it by slicingACCESS_DIRECTORY_PATH(the/apps/setup/…alias) off the pathname. The shell serves Setup at its package id (/apps/com.objectstack.setup/…), so there the slice never matched, the sub-path came out empty, and…/position/newrendered the directory's empty shell instead of redirecting to Studio's editor. The page now reads the splat of its own route (useParams()['*']belowcomponent/:ns/:name/*), on every address the shell serves it at. The prefix read stays only for a mount without a splat.accessDirectoryLocationis unchanged.CI pins on the previous head (4b15ae4), each fixed at its root
StudioMetadataArea.allList-29566› create on the~alllegcom.example.crm, Continue opens its create; the ask's package list is stubbedPackageFormDialog.newAppStep-36748› the door censusPackageCreateAsk.tsxin place ofResourceListPage.tsxCreateViewDialog.chartBinding-11576› Save as view doordemoanswers as a writable package, as in the sibling view tests already retargetedObjectView.createViewRefusal-11578, 3 casesDatasetDefaultInspector.firstPickKeepsCount-12848, 2 cases/newnaming no package now asks at SaveAppContent.pseudoRouteSegments›/apps/ghost/create-app(and the same hazard inAppContent.noAppsCta)ConsoleCreateAppPage, whose graph loaded insidefindByTestId's budget; CI showed the route skeleton still pending../ConsoleCreateAppPageat collection, as they already pay the designer's barrelMy earlier affected-file selection (171 files) missed these. This round ran the whole
@object-ui/app-shelland console suite (see Verification).Tests
All are run at the final head, one union run. The figures are in Verification.
PackageCreateAsk-38149: list filter, pre-select, Continue gate, Cancel once, New package answers and returns, failed read, a second ask answers the firstnull.ResourceListPage.createAsk-38149: arrival repair asks with the pick pre-selected; Cancel; a?package=arrival and a selector choice skip the ask; New disabled while packages load; the catalog's New opens the create in the scope with no ask; the~allleg asks.ResourceListPage.catalogAsksOnce-38149: the real list and the real editor on Setup's routes. The catalog's New asks nothing. Save asks once, with nothing pre-selected. The save isPUT ?mode=draft&package=app.alpha, then its publish.ResourceEditPage.createAsk-38149: deep-link Cancel writes nothing; position and permission set get draft + publish in the answer and land under it; a named-package control; a refused first save keeps the form and the answer, and the retry asks nothing.runtime-metadata-persistence.createAsk-38149: every resolve outcome, the pick, the cancel, and the no-app control.ConsoleCreateAppPage.createAsk-38149: ask, then draft under the first-write pin, then publish; Cancel writes nothing.ReportNewPage-36692, three new cases: unlisted app asks; cancel; system app refused, with the ensure door never asked.objectViewViewSharing: a cancelled ask writes and says nothing.AccessDirectoryPage.aliasAddress-38206(设置里新建岗位或权限集打开空白页:访问目录页只认 /apps/setup 地址,控制台用软件包全名时不转去 Studio #38206): at both the package-id address and thesetupalias,…/position/new?scope=environmentredirects to/studio/~all/metadata/position/new?scope=environment, and…/positiongets the environment scope and renders the list.liveCreate-7611,positionCreateLive-26192,walledFallback-35624,otherTypesUntouched-35624,createIntoApp-35624,saveAndPublishIntoApp-36409,sameAddress-35624,ReportNewPage-36692(both ensure-refusal controls),syncNextSteps-30328(import door),pairCreate-36897;demo.Ablations: each committed, mutated through scripts/ablation-replace.mjs, red, then restored (blob == HEAD, git diff HEAD empty)
.filter((p) => p.writable && !p.kernel)becomes.filter(() => true)packageNameddropped (the heuristic pick taken as named)if (createMode && !activePackage)becomesif (false)403caller-refused branch becomesif (false)if (!packageId) return false;deleted/object-draftchosenCreatePackageRef.current = chosen;deletedAccessDirectoryPage:splat ??becomesundefined ??(the prefix read alone)if (envScope) {becomesif (false) {(New asks again)ConsoleCreateAppPage.tsx: a 2.5s top-level wait added (--hold, then--restore)security-catalog.ts: thesource === 'registry'closure guard removedpkhome_reviewer_set, showcase_member_default, member_default, storage_attachment_member, missing the other-package, shipped and loose setsAcceptance notes
createLive(permission, position) is now unreachable from the editor's create: every create names a package. The key is registered inbuiltinComponents.tsxandregistry.ts, outside this card's surface. Retiring it is a narrowing, left for a follow-up.savedOutsideAppkeys are unused now and kept, as ordered. Retiring them is a second, narrowing PR..custompair is a listed writable package. A base with no pair is not offered./studio/~all/metadata/position/new?scope=environment. Studio's area drops?package=under the environment scope (areaLocationRedirect), so the answer was lost and Save asked again. Seat ruling A: in the environment scope, the catalog's New does not ask. It opens./new?scope=environment, and the editor's Save asks once.Verification
Read first, by risk:
ResourceListPage.tsxhandleCreate: which create asks and which goes straight through.runtime-metadata-persistence.tsresolveRuntimeCreatePackage: refused versus ask.ResourceEditPage.tsxdoSave: the ask, and the held answer.Two-minute check: boot a showcase, create one writable package, then open
/studio/~all/metadata/dashboardand press New. The dialog lists only that writable package, and Continue stays disabled until it is chosen.#38206 and catalog check: open Setup → Positions and Permissions → Positions and press New. Studio's position editor opens ("Create new"), not a blank page, with no ask. Fill the name, then press Save. It asks once; Continue saves.
Screenshots (light and dark, desktop 1440 and phone 390) are in the project files under
objectstack-seat3/shots-38149/, 16 PNGs:~allleg's ask (Dashboard);#38206, live at e9cf656: Setup → Positions and Permissions → Positions loads at
/apps/com.objectstack.setup/component/security/access-directory/position?scope=environment. Continue from the then-ask reached/studio/~all/metadata/position/new?scope=environment, where Studio's position editor renders. The screenshot isobjectstack-seat3/shots-38149/38206-setup-position-new-editor.png.The catalog asks once, live at 6b589fc (after the merge of origin/main):
/studio/~all/metadata/position/new?scope=environment.com.acme.field-opsandcom.acme.partner-portal.PUT …/position/live_38149_once?mode=draft&package=com.acme.field-ops200, thenPOST …/publish?package=com.acme.field-ops200, and lands on/studio/~all/metadata/position/live_38149_once?scope=environment.38149-catalog-new-opens-editor.png,38149-catalog-save-asks-once.png,38149-catalog-saved.png.Live, on the same boot: the editor's ask on the
~allleg answeredPUT …/position/field_dispatcher?mode=draft&package=com.acme.field-ops200, thenPOST …/publish?package=com.acme.field-ops200. It landed on/studio/com.acme.field-ops/metadata/position/field_dispatcher. The read answered_packageId: com.acme.field-ops.Union test run at head 1e5b3fa: 172 files, 1410 tests, all green
cd ui && pnpm exec vitest run --maxWorkers=2over 171 affected app-shell, plugin-designer and console test files, plusscripts/__tests__/vite-declared-lazy-views.test.tsandcheck-vi-mock-inherit.test.ts. Throughos-verify-lock.sh:VERDICT command-exit 0,Test Files 172 passed (172),Tests 1410 passed (1410).scripts/family at head:Test Files 172 passed | 2 skipped (174),Tests 5144 passed | 2 skipped (5146),VERDICT command-exit 0.@object-ui/i18nexit 0 and@object-ui/plugin-designerexit 0.@object-ui/app-shell(tsc --noEmit, then the test config) exit 0, run after the source-typed fix tosameAddress-35624. The build closure--filter '@object-ui/app-shell^...' --filter '@object-ui/plugin-designer^...'ran first:VERDICT command-exit 0.pnpm --filter @objectstack/dogfood exec vitest run --maxWorkers=2 test/position-in-package-binds-outside-sets-38149.dogfood.test.ts, 4/4.test:repo, CI'sTest Core.After the merge of origin/main, at 6b589fc (head 75fbb8d adds only the changeset line): full app-shell and console suite, 2791 files, 27655 tests, 0 failed
VERDICT command-exit 0. Totals:Test Files 2790 passed | 1 skipped (2791),Tests 27646 passed | 9 skipped (27655).@object-ui/app-shelltype-check:VERDICT command-exit 0, 0error TS.catalogAsksOnce-38149,ResourceListPage.createAsk-38149,ResourceEditPage.createAsk-38149): 13/13 green. Ablation A4: 2 failed / 8, restored to blob == HEAD.Gates after the merge, at head 75fbb8d: 71 of 71 run, every exit 0
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackwith no paths: 61 paths against merge base bd5407e. Reconciled by--ran:71 derived famil(ies) accounted for — 71 run, 0 NOT-MEASURED.pnpm --dir ui exec vitest run scripts/was OOM-killed beside a suite shard. Rerun under the lock:Test Files 172 passed | 2 skipped (174),Tests 5145 passed | 2 skipped (5147),VERDICT command-exit 0.check:dual-build-cjs-loadsanswered PREREQUISITE NOT MET (no dist for studio, client-react, scenarios). Those three were built, then it gave exit 0.check:type-check-debthit a lock queue-timeout (exit 3). Rerun under the lock:0 raw tsc error(s) total, none above its recorded number,VERDICT command-exit 0.node scripts/check-nul-bytes.mjsexit 0.Full app-shell and console suite at head 958d1c1 (before the merge): 2791 files, 27613 tests, 0 failed
cd ui && pnpm exec vitest run --maxWorkers=2 --shard=N/12 packages/app-shell/ apps/console/, N = 1 to 12, each throughos-verify-lock.sh, eachVERDICT command-exit 0.Test Files 2790 passed | 1 skipped (2791),Tests 27604 passed | 9 skipped (27613).@object-ui/app-shelltype-check (tsc --noEmit, then the test config) at 958d1c1:VERDICT command-exit 0.AccessDirectoryPage.aliasAddress-38206,AccessDirectoryPage,accessDirectory:Test Files 3 passed (3),Tests 52 passed (52).3 failed | 26 passed (29), the same three cases as CI;Gates for the #38206 round at head 958d1c1: 38 of 38 run, every exit 0
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, given this round's ten paths (git diff --name-only 1e5b3fad94 HEAD). This narrowing is declared: the first half's 71 families ran at 1e5b3fa, below. The 38 equal the list derived for the first 设置里新建岗位或权限集打开空白页:访问目录页只认 /apps/setup 地址,控制台用软件包全名时不转去 Studio #38206 commit alone.--ran:38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED. Each exit code is captured before any pipe: 38 of 38EXIT=0.check:test-source-aliaswas red on three retargeted files:noAppsCta, the 12848 file and the 29566 file. Each now pays@objectstack/lintat collection, and the gate is green at head.origin/mainwas merged in afterwards (merge commit b99efee, bygit merge, no rebase), on the seat's order.Gates: the derived local subset at head 1e5b3fa, 71 of 71 run, every exit 0
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, merge base 9dca109. Reconciled by--ran:71 derived famil(ies) accounted for — 71 run, 0 NOT-MEASURED.check:test-source-aliaswas red on this diff's test files. Each named file now pays@objectstack/lintand@object-ui/plugin-detailat collection.check-vi-mock-inheritnamed the create-app test's factory, which now inherits the real module. Both are green at head.check:dts-closureandcheck:dual-build-cjs-loadsfirst answered PREREQUISITE NOT MET (no full build in this tree). Both answered exit 0 at head.node scripts/check-platform-checklist.mjs --changed-from origin/main: OK, 0 anchors lost.🤖 Generated with Claude Code
https://claude.ai/code/session_01L9qibzywxH36FPH6ayWMUe