Repository navigation
feat(ui): New Package offers 「同时创建应用」 / Also create an app, ticked by default - #37338
Conversation
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYmaapyPFdBwrb3SfFp
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYmaapyPFdBwrb3SfFp
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYmaapyPFdBwrb3SfFp
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYmaapyPFdBwrb3SfFp
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — ACCEPT · L1 · head
|
| Text | Clause-② |
Metadata-protocol |
|---|---|---|
The card's newest Claim: (7169203072) |
declared no, arm null |
declared none |
| The PR body | declared no, arm null |
declared none |
.changeset/37134-create-package-also-app.md |
declared no, arm null |
declared none |
All three read the same.
no is right. The three new keys go into the studio namespace, which is typed Record<string, string> and exported as StudioCatalogue = Readonly<Record<string, string>>. No published type gains a member, which is the card's own Expected 4 criterion. PackageFormDialog's prop types are unchanged; the removed withAppDoorWording and APP_DOOR_HELP_ROWS were module-private. @object-ui/app-shell is private: true.
none is right: nothing a metadata author writes changes. So patch for @object-ui/app-shell and @object-ui/i18n is the right level.
I read the changeset sentence by sentence against the diff:
- The three doors.
- "ticked each time the dialog opens".
- The en and zh toast strings, which match
createdWithAppbyte for byte. - The taken-identifier refusal, which matches
newApp.nameTakenand writes nothing. - The
appFailedtoast. - "Unticked: only the package is created".
- "Where the dialog takes you afterwards is unchanged".
- The three key names, and "No key is removed".
- "no other props or exports change".
All hold.
Translation keys. node ui/packages/i18n/scripts/released-keys-removed.mjs --tag @object-ui/i18n@18.6.0 lists 77 keys at --ref 97fa2d83, 77 at the merge-base fbb62e1c and 77 at origin/main a182fbe3. A sorted diff of head against the merge-base is empty, so this PR removes no released key. The 77 are pre-existing.
The three new keys (engine.packages.create.alsoApp, alsoAppHint, createdWithApp) are in both studio catalogues, en and zh. "All 11 packs" does not apply here. studio is a two-catalogue key space by ruling (#25922): every other language falls back to en, and its index.ts puts it outside the 11-pack parity suite "by construction … ⛔ must never be given" an exemption. The merged tree from git merge-tree against a182fbe3, which includes #37315's edits to the same two catalogues, has no duplicate key lines in either catalogue.
Pins and ablations. I ran these in a throwaway worktree at head, with the @objectstack/* closure built (OS_SKIP_DTS=1). The worktree has since been removed.
pnpm exec vitest runonPackageFormDialog.newAppStep-36748.test.tsxandPackagesPage.installedAppsUpdates-34722.test.tsx: Test Files 2 passed, Tests 54 passed, exit 0. The first file has 11 cases, matching the body.- A5 re-run:
CreatePackageDialogpassesnewApp={undefined}. Result: 9 failed, 45 passed. The red cases are both "ticked on every opening" cases, the three ticked/unticked/taken cases, the wrapper source pin, and the threePackagesPagedoor cases (New Package button,?new=package, development face). That matches the report's 9. - A2 re-run:
appStep = offersApp ? newApp : undefined, which ignores the box. Result: 2 failed, "unticked: only the package…" and "ticked, an app name already taken…; unticked, the package goes through". That matches the report's 2. - Both restores were checked by blob hash (
eca3c854…,4ff26da7…) against the HEAD blob, with an emptygit diff HEAD.
Gates. The check-runs at 97fa2d83 are 58: 45 success, 13 skipped, 0 failed, 0 pending. l1-face counts the 13 as expected skips, with 0 unexpected. Lint & Repo Gates and TypeScript Type Check are both success. Test Core is skipped by design on a ui-only head.
git merge-tree --write-tree origin/main(a182fbe3) 97fa2d83 merges cleanly (tree 4fc1d786). mergeable_state is clean.
K = 10. landing-k.mjs --pr 37338 cannot answer: green run 45676342084 ran no Test Core shard, so it printed no Affected-set diff base. K is therefore read as the first-parent count from the merge-base fbb62e1c to origin/main a182fbe3, which is 10. The legs:
- Locale leg: since the base,
mainhas added no locale pack. Everytranslations/andlocales/change on main is a modification, not an addition. - Label leg: this PR changes no
translations/bundle. - Shared-budget leg: this PR does not touch
ui/**/locales/en.ts.
Accepted deviations. These are the zone's rulings in 7172708246 (2026-11-25T19:44Z):
- Q1 A: the unread
engine.studio.newApp.*rows stay, and one retirement card follows after landing. - Q2 A: the submit label stays "Create package" / 「创建软件包」.
Card Expected 3 was overtaken by #36908's earlier landing.
Out of scope. A Studio-only author who cannot open Setup → Packages still has no New Package door. That goes to #37139, as the body's Acceptance notes and 7172708246 record. useNewPackageDoorPath confirms this: such an author's doors lead to Studio's "All metadata", not to the dialog.
Skills-docs: is not owed (kind none, no narrowing arm). No contract review is owed. The diff touches none of the four faces: the declaration is Clause-②: no with no narrowing arm, there is no packages/spec/src/** path, and there is no governed path. reviewFace reports empty hits.schema and empty hits.rules.
维护者速读. It is accurate and follows the four-line form:
- Who and where: Setup's 「软件包」 page and the 「新建空白应用」 doors that reach the same dialog.
- The Studio redesign topic.
- A taken name writes nothing, and the PR is UI-only and can be reverted.
- 「无」.
It contains no code names, paths, commands, ruling letters or bare card numbers.
Findings
- N1 — This diff also leaves
engine.studio.newApp.createdwith no reader. Its only reader was the success toast at the base'sPackageFormDialog.tsx:690, and head replaces it withengine.packages.create.createdWithApp; a grep at head finds 0 non-catalogue readers. Neither the PR body's Acceptance notes list nor the Q1 list in 7172708246 names it. The en catalogue comment is accurate ("the app-worded rows have no reader since"). Seat-side: the retirement card the zone files after landing should listcreatedbesidetitle,description,advancedHint,id,help.*,nsDerived,existsandfailed. No change to this PR is needed. - N2 — The door source pin matches
<PackageFormDialog\b[^>]*>, which stops at the first>, including the one inside an arrow=>. It only classifies a mount bymode="edit|view"whenmodecomes before any arrow-function prop. At head, every mount putsmodefirst, so the pin reads correctly. This is a fragility to keep in mind if a mount is reordered, not a defect.
No must-fix, no should-fix.
- Landing: the zone lands it as Tier S. K = 10 (< 15, every leg clear), so there is no merge of
mainfirst. Re-read the checks andmergeable_stateat97fa2d83right before arming.
|
repo:objectstack#4 · os-justin · session_01QSeKYkkwuF6UuFtu85Yd5H Landing · 2026-11-25T20:00Z · head
|
Fixes #37134
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
PackageFormDialogin create mode with anewAppstep now draws the checkbox under the description in the Basics card. Ticked, it runs the step exactly as the Studio home's door did (Studio「新建自己的应用」最后要得到一个应用:一个「新建应用」对话框同时建包和应用;没有应用时页头显示包名 #36748): reserve a free app name before any write (a taken one refuses the whole confirm, opens Advanced and writes nothing),POST /api/v1/packages, then the app's draft under the first-write pin and that one item's publish. Unticked, it posts the package alone, as before. A refused app after the package landed keeps the existingappFailedtoast.newAppused to reword the whole dialog for an app (title 「新建应用」, 「应用 ID」, the help rows). That face's only host, the Studio home, was removed by Studio 重构(决定 9):去掉 Studio 首页(/studio 的包卡片页),逐项搬走它承载的入口 #36908, and the card puts the choice in the package dialog, so the rewording branch (withAppDoorWordingand theappDoorternaries) is removed. Success with an app now reads "Created package “NAME” and its app." (new key); a 409 and a generic failure read the package dialog's own lines.CreatePackageDialogbuildsnewAppStep(client, locale)and passes it; it is the only create-mode mount ofPackageFormDialogin app-shell. Its doors: Setup → Packages' New Package button (both faces), the?new=packagedoor that the console's 「新建空白应用」 entries open (Studio 重构(决定 9):去掉 Studio 首页(/studio 的包卡片页),逐项搬走它承载的入口 #36908), and ResourceListPage's create-a-package-first prompt.onCreatedstill answers with the package id, so each door lands where it did: Setup's admin face in Studio on the new package (whose header then names the app), the development face on the list, the resource list on./new?package=….engine.packages.create.alsoApp,engine.packages.create.alsoAppHintandengine.packages.create.createdWithAppin the studio catalogue (en, zh). Additive only; no key removed.Tests
PackageFormDialog.newAppStep-36748.test.tsx(the shared harness: real dialog, realnewAppStep, real metadata client andStudioDesignSurfaceover a stateful fetch stub). New top-level describes, all mounting the realCreatePackageDialog:POST package→PUT app draft→POST app publish, the app is the new package's, the toast, and Studio's header names the app;POST /api/v1/packages, no app or draft, the package toast, the header names the package;CreatePackageDialogmounted exactly inPackagesPage.tsxandResourceListPage.tsx, no other create-modePackageFormDialog, and the wrapper passingnewAppStep(client, locale).PackagesPage.installedAppsUpdates-34722.test.tsx: the page's dialog stand-in now reports whether it was handed the step; three cases pin it for the admin face's button, the?new=packagedoor and the development face's button.Ablations — each one red, then restored by hash
Mutations through
scripts/ablation-replace.mjs(anchor must hit, on-disk counts printed), restored withgit checkout HEAD -- PATHand checked by blob hash and an emptygit diff HEAD. app-shell's tests import the dialog and the page by relative path, so nodist/is in the resolution path.appStepalwaysundefined(ticked creates no app)appStepignores the boxCreatePackageDialogpassesnewApp={undefined}CreatePackageDialogcase, the wrapper source pinPackageFormDialog mode="create"itselfA5's first attempt used an empty replacement, which the tool refused (nothing landed); it was re-run with
newApp={undefined}. All six restore lines matched the HEAD blob.Acceptance notes
PackageSwitcher.tsxnow only exports a toast id), so there is no such door to wire. The doors that exist are listed above.engine.studio.newApp.title,description,advancedHint,id,help.*,nsDerived,exists,failed) have no reader after this change. They stay, because this card removes no released key;nameTakenandappFailedare still read. The en catalogue's comment says so.check:i18n-dead-keysis report-only.Verification
Two-minute check:
pnpm dev, open Setup → Packages, New Package, type a name, keep 「同时创建应用」 ticked, Create. Expected: the toast "Created package “NAME” and its app.", then Studio on the new package with 「‹ Back to app · NAME」 in the header. Repeat unticked: the package toast, and the header shows the package name.Read first:
PackageFormDialog.tsx(theappStepline insubmit()and the checkbox in the Basics card),PackagesPage.tsx(CreatePackageDialog), then the new describes at the end ofPackageFormDialog.newAppStep-36748.test.tsx.Local runs (head 97fa2d8)
All at head
97fa2d83unless noted; exit codes captured before any pipe.PackageFormDialog.newAppStep-36748: Test Files 1 passed (1), Tests 11 passed (11); lock VERDICT command-exit 0.PackageFormDialog*,PackagesPage.installedAppsUpdates-34722,CreatePackageDialog*(at4179e152, test-only rename since): Test Files 17 passed (17), Tests 195 passed; thenPackagesPage*,ResourceListPage*,EditPackageDialog*,StudioDesignSurface.createApp*: Test Files 36 passed (36), Tests 313 passed (313).pnpm --filter @object-ui/app-shell type-check(src +tsconfig.test.json), after building the@object-ui/app-shell^...closure: lock VERDICT command-exit 0, 0 TS errors.--no-inline-configon the six touched source files: exit 0 (warnings only, all pre-existing lines).pnpm --dir ui exec vitest run scripts/: Test Files 172 passed, 2 skipped (174); Tests 5130 passed. The first run on28a9d57afailedcheck-test-path-rootson the new test (a local namedpathread as the fetch stub's URL path); fixed by the rename in97fa2d83.check:test-source-aliasexit 0 ·check:i18n-keysexit 0 ·scripts/pm/overlap-check.mjsVERDICT clean exit 0 (merges cleanly with main and feat(studio): author context packs (ai_context) in Studio — a form, and a related-lists block scoped to each child #37315, which shares the two studio catalogues).dispatch-gates.mjs --commands: 39 derived families, all run at97fa2d83, all exit 0;--ranreconciliation: 39 derived, 39 run, 0 NOT-MEASURED (a derived zero: every row carries its exit code).