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
|
…etup → Packages names arrangements apart (objectstack-ai#37351) Fixes objectstack-ai#37236 Clause-②: no Metadata-protocol: none ## 维护者速读 - 管理员在 设置 > 软件包 打开一个应用的详情时,「已定制」只数改过和新增的条目;只调整了排列的应用现在显示「已定制 0 项,调整排列 2 处,已停用 0 项」,不再显示「已定制 2 项」,排列明细照常列出。 - 属于 Studio 改版:按维护者裁定,「已定制」在设置详情、全部元数据页头和列表筛选里只有一个意思(覆盖 + 扩展)。 - 出错时管理员只会看到这一行数字或措辞不对,不碰任何数据,可直接撤回。 - 无。 ## What changes - **Setup → Packages detail** (`PackageCustomizationsPanel.tsx`): the 「已定制」 / "customized" count is now `customizationTotal` (overrides + extensions), the one number the All metadata header and both lists' 「customized」 filter already read. Arrangements are named in their own segment, `engine.packages.customizations.arranged` (en `{count} rearranged`, zh-CN `调整排列 {count} 处`), drawn only when the count is above 0. The "No changes" line now needs all three counts at 0, so an arrangement-only app never reads "No changes". - Arrangement-only app: `0 customized, 2 rearranged, 0 switched off` / `已定制 0 项,调整排列 2 处,已停用 0 项`. - No arrangement: unchanged, `1 customized, 0 switched off`. - The rows (`customizationRowsOf`) and the 「布局」 tab are unchanged; arrangements are still listed. - **`customizedCountOf` is retired**, not fixed to delegate. Its only job was the second meaning of 「已定制」. Keeping a second name for `customizationTotal` would leave two doors to the same number, and the drift this card fixes came in through that second door. Its one caller and its one test go with it. - **`customizationTotal` is unchanged**, and so are the header (`DirectoryPage.tsx`) and both filters (`ResourceListPage.tsx`, `useListOrderedNames.ts`). They gain pins, not code. - **i18n:** one additive key in en and zh-CN. No key is removed and no released key changes meaning (`engine.packages.customizations.customized` keeps its text, and it has not been released yet: it arrived with objectstack-ai#37166's unreleased changeset). - **DELIBERATE CORRECTION of an existing changeset**, `.changeset/36908-remove-studio-home.md` (unreleased). Its sentence "The count now includes tab, field-group and action-layout arrangements, so an app whose only change is a tab arrangement shows as customized." would ship false after this change. It now reads: "Tab, field-group and action-layout arrangements are named on their own in that line, not counted as customized." - No server, spec or route change. ## Tests One pin per surface, each on an arrangement-only base fixture (two arrangements, no override, no extension): | Surface | Pin | |:--|:--| | Setup detail, en | `PackageCustomizationsPanel.test.tsx`: arrangement-only app reads exactly `0 customized, 2 rearranged, 0 switched off`, both rows listed | | Setup detail, zh-CN | same file: exactly `已定制 0 项,调整排列 1 处,已停用 0 项` | | All metadata header | `metadataAreaHost.customizations-28568.test.tsx`: no `directory-customizations-total`, no tile, no failure line | | ResourceListPage filter | same file: no `metadata-only-customizations` on the arrangement-only base's list | | useListOrderedNames filter | same file: with `?customized=1`, the ‹ › names keep the row (the filter is not offered), with a HotCRM control that keeps only its customized row | Also: no arrangement means no arrangement segment, and the mixed fixture now reads `2 customized, 1 rearranged, 1 switched off`. <details><summary>Targeted run (head c9c1d9e)</summary> ``` $ cd ui && pnpm exec vitest run PackagesPage.installedAppsUpdates-34722 PackageCustomizationsPanel metadataAreaHost.customizations-28568 customizationMarks Test Files 4 passed (4) Tests 77 passed (77) os-verify-lock: VERDICT command-exit 0 # every app-shell test that reads the changed code (45 files, grep of the panel, rows, marks, header, both filters and the detail sheet), on 08fe4e46, the same diff before the last rebase over objectstack-ai#37338 Test Files 45 passed (45) Tests 661 passed (661) ``` </details> <details><summary>Ablations: each pin red alone when its own surface counts arrangements</summary> Each mutation adds `+ counts.arrangements` at one call site through `scripts/ablation-replace.mjs` (anchor x1 → x0, blob changed, restored to the HEAD blob with an empty `git diff HEAD`). The tests import source, so there is no `dist/` leg. ``` A1 PackageCustomizationsPanel.tsx customized: customizationTotal(read) + read.counts.arrangements × lists one row per change ... counts them × objectstack#37236: an arrangement-only app reads 0 customized beside its arrangement count ... × zh-CN: ... an arrangement-only app is 已定制 0 项 beside 调整排列 Tests 3 failed | 10 passed (13) A2 DirectoryPage.tsx header customizationTotal(...) + counts.arrangements > 0 × the directory header draws no total for a base whose only change is an arrangement Tests 1 failed | 12 passed (13) A3 ResourceListPage.tsx showCustomizedFilter same mutation × the list offers no "customized" filter to a base whose only change is an arrangement Tests 1 failed | 12 passed (13) A4 useListOrderedNames.ts customizedOffered same mutation × the detail ‹ › names: "only customizations" is not offered to it, so it filters nothing out Tests 1 failed | 12 passed (13) each: "ok restored: blob == HEAD and `git diff HEAD` is empty" ``` </details> <details><summary>Package suite and type-check</summary> ``` pnpm --filter @object-ui/app-shell type-check VERDICT command-exit 0 pnpm check:type-check-debt re-measure: OK, 0 raw tsc errors NARROWED, declared: the package's full `pnpm test` (2430 test files) was stopped after 70 minutes on the shared box, 26 files in. The 45-file scoped set above replaces it locally; CI's `Test UI` runs the whole package. ``` </details> ## Acceptance notes - Wording choice: en reads `{count} rearranged`, matching the line's other participles ("customized", "switched off") and avoiding "1 arrangements". zh-CN reads the ruling's own `调整排列 {count} 处`. The new segment uses the line's existing separator (`, ` / `,`), not the ruling example's ` · `, so the line has one separator. - "Don't show a 0-count segment" is applied to the new segment only. The customized and switched-off segments keep objectstack-ai#37166's behaviour (both always drawn once anything is non-zero), so an arrangement-only app still shows `0 customized`, as the card asks. ## Verification Read first: `PackageCustomizationsPanel.tsx` (the summary line), then the new `describe` at the end of `metadataAreaHost.customizations-28568.test.tsx`. Two-minute check: from `ui/`, `pnpm exec vitest run packages/app-shell/src/views/studio-design/PackageCustomizationsPanel.test.tsx`. Expect 13 passed, including "an arrangement-only app reads 0 customized beside its arrangement count". ## Gates Derived union (`dispatch-gates.mjs --commands`), run on the final head c9c1d9e: 38 derived, 38 run, 0 NOT-MEASURED (`--ran` reconciliation exit 0). - 37 exit 0, plus `check:changeset-fixed` (outside the derivation, run because `.changeset` holds its roster) exit 0. - 1 exit 1, expected: `check-empty-changeset.mjs --base origin/main` refuses the edit to `.changeset/36908-remove-studio-home.md`. This is the DELIBERATE CORRECTION declared above, not a collision. The gate stays red until the dispatching seat confirms the correction by its own record. - Push gates: `check:test-source-alias` exit 0, `check:i18n-keys` exit 0, `overlap-check.mjs` VERDICT clean exit 0, `check:nul-bytes` exit 0. --- _Generated by [Claude Code](https://claude.ai/code/session_01QSeKYngAThmzrAhkac86ye)_ <!-- signed: repo:objectstack#4 · os-justin · session_01QSeKYkkwuF6UuFtu85Yd5H --> --------- Co-authored-by: Claude <noreply@anthropic.com>
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).