Repository navigation
feat(console): a 「⋯」 package menu in Studio's top bar; Import on Setup → Packages - #37362
objectstack-fleet[bot] wants to merge 2 commits into
Conversation
…pp-worded newApp rows) engine.studio.menu.typeCount lost its reader when the Studio menu's group headers stopped counting types; the app-worded engine.studio.newApp rows (title, description, advancedHint, id, help.*, nsDerived, created, exists, failed) lost theirs when the New Package dialog stopped rewording itself for an app. ui/scripts/check-i18n-dead-keys.mjs lists exactly these 17 rows as confirmed, and a grep outside the catalogue finds no reader. nameTaken and appFailed are still read by PackageFormDialog and stay. None of the 17 shipped: @object-ui/i18n@18.6.0's dist/namespaces/studio en.js and zh.js carry none of them (control: engine.studio.changes is there). Claude-Session: https://claude.ai/code/session_01QSeKYmjeYX4T3tqfUCDu4K Co-authored-by: Claude <noreply@anthropic.com>
…p → Packages With the Studio home gone, the Packages page's development-face actions (Edit, Export, Duplicate, Revert, Adopt loose items) had no served door. - metadata-admin/packageActions.tsx now holds those actions' requests and dialogs/forms (the package REST helper, revert, export, adopt, the Edit dialog, the Adopt confirmation, the Duplicate form); the development face's detail sheet imports them unchanged in behaviour. - studio-design/StudioPackageMenu.tsx: the 「⋯」 beside the app or package name, six items in the maintainer's table order, each reusing the shared action; Revert asks first and is greyed with no pending changes; Edit, Duplicate, Revert and Adopt are greyed on a read-only package; Manage in Setup… opens Setup → Packages on the package's row. Drawn only with a current package (never ~org / ~all) and for a manage_metadata holder. - PackagesPage: Import beside New Package on the administration face too; `?package=ID` on that face opens the package's detail on arrival. - en / zh keys under engine.studio.packageMenu.*; a changeset. Claude-Session: https://claude.ai/code/session_01QSeKYmjeYX4T3tqfUCDu4K Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — ACCEPT · L1 · head
|
| Table item | At head | Greyed when (at head) | Table says |
|---|---|---|---|
| 编辑软件包信息 | EditPackageDialog (moved, same PackageFormDialog edit mode) on the /api/v1/packages listed manifest |
writable === false |
read-only package ✓ |
| 导出 | exportPackageFile (the moved export download) |
never | 「—」 ✓ |
| 复制为新软件包 | DuplicatePackageForm (moved) → duplicatePackage |
writable === false |
「—」: deviation, see N2 |
| 还原到上次发布 | confirmation AlertDialog, then revertPackage |
read-only, or pending count === 0 |
read-only, or no changes, and asks first ✓ |
| 收编散落项 | AdoptLooseItemsDialog (moved), then adoptLooseItems |
writable === false |
read-only ✓ |
| 在设置中管理… | setupPackagePath(id) through the unsaved-work veto; ?package=ID opens that row's sheet (Disable, Delete) |
never | 「—」 ✓ |
- The menu draws only when
packageId !== null && !pkgMissing && useCanAuthorMetadata().packageIdisnullon~organd~all(StudioDesignSurface.tsx:310). - 「发布全部草稿」 is absent.
- Unknown writability or an unknown pending count greys nothing; the server gate stays the authority.
- The
?package=effect waits forloading, which startstrue, so the param is not dropped before the list arrives. fetchListedPackageManifestsdedupes in-flight reads only, so Edit never opens on a stale manifest.
One copy. packagesApiJson (the old apiJson), the export download, the duplicate form and the adopt dialog moved verbatim into packageActions.tsx. The detail sheet keeps its testids. EditPackageDialog's prop narrowed to { manifest }, which every old caller still satisfies, and it is still re-exported from PackagesPage. The growth beyond a pure move is the two thin request helpers (revertPackage, adoptLooseItems + adoptedText) and the module header.
Import moved, nothing stranded. The admin face's actions and foldedActions now draw {importInput} and New Package on both faces (no adminFace ? newPackageButton : branch). The development face keeps its Import unchanged.
- On
ui/packages/**source,importInputandengine.packages.import*appear only inPackagesPage.tsx. - No e2e or dogfood case asserts that the admin face lacks Import; the
ui/e2e"Import" hits are the object-view list import. - The three admin-face assertions that said "no Import" were flipped in the same PR.
Rider Studio: remove the unread engine.studio.newApp.* rows and engine.studio.menu.typeCount (never released) #37349: 17 rows, none released, none read.
released-keys-removed.mjs --tag @object-ui/i18n@18.6.0 --jsongives the same 77-key set at--refbase80da0864and at head: no row added, none gone, and noengine.studio.newApp.*ormenu.typeCountamong them.git show @object-ui/i18n@18.6.0:…/studio/{en,zh}.tshas 0 of the 17 in each file; controlengine.studio.changesis 1 in each.- 18.6.0 is the newest tag and the newest npm version.
check-i18n-dead-keys.mjson the baseui/tree lists exactly the 17 as[confirmed]. On the head tree it lists none of them, and no newpackageMenukey.git grepfor the 17 outside the catalogues, plus dynamic-prefix spellings, finds 0. The catalogues go from 17 rows per file at base to 0 at head.nameTakenandappFailedstay, and they are live.
Declarations. readClause2Line and readMetadataProtocolLine (scripts/pm/clause2-line.mjs at head) were run on four texts: the newest Claim: on Studio 重构后续:顶栏应用名右侧加「⋯」软件包菜单(编辑信息、导出、复制、还原、收编散落项、在设置中管理);「导入」放到「设置 > 软件包」页头 #37139 (7175524211), the newest Claim: on Studio: remove the unread engine.studio.newApp.* rows and engine.studio.menu.typeCount (never released) #37349 (7175566231), the PR body and the changeset. All four read declared · no · arm null and declared · none, so they match.
Clause-②: noholds.app-shellis private, so its new exports ship nowhere. The studio catalogue is typedRecord<string, string>, so ten added keys widen no published type. The removed rows were never released.patchfor both packages matchesMetadata-protocol: none.
Pins at head, and ablations. In the worktree, vitest run over StudioPackageMenu-37139.test.tsx and PackagesPage.installedAppsUpdates-34722.test.tsx gives Test Files 2 passed (2) · Tests 76 passed (76). I wrote my own 11 ablations, separate from the dev's; each went red alone and was restored, and git diff --stat HEAD was empty after the run:
| Ablation | Red |
|---|---|
A1: {menu} not drawn in StudioBackToApp |
15 of 26 |
A2: readOnly forced false |
2: read-only greys, en and zh |
| A3: Duplicate's grey dropped | 2: read-only greys, en and zh |
A4: noChanges forced false |
2: "nothing changed", en and zh |
A5: canAuthorPackage dropped |
2: "without manage_metadata"; the control passes |
A6: packageId !== null dropped |
2: ~org / ~all |
A7: admin face back to adminFace ? newPackageButton : |
5 of 50: the flipped columns case, plus header and Import, each in en and zh |
A8: ?package= effect opens nothing |
1 |
A9: Manage in Setup… without &package= |
1 |
| A10: Revert runs without its confirmation | 1 |
A11: the zh packageMenu.duplicate row removed |
1: zh-CN labels |
Check-runs at head (REST). 58 runs: 45 success, 13 skipped, 0 failed, 0 pending. Lint & Repo Gates, TypeScript Type Check, Test UI (16/16), Build & E2E UI, Live E2E UI, Dogfood Regression Gate, Governed Surface Queue Guard and Check Changeset are all success. l1-face reads the 13 skips as expected and 0 as unexpected.
Merge-tree and K. git merge-tree --write-tree against origin/main d558de0ae0ef161e5567da4dde1470feca745fe7 exits 0 (clean). K = 8: fix(runtime,mcp): the no_confirmation_service refusal names the route that works on the door that asked #37367 landed after the zone's reading of 7. None of the 8 main commits touches any of the 11 files.
Overlap. Pairwise merge-tree of each PR's head against this head exits 0 for all three.
- feat(studio): a dashboard list's New opens the app's design mode on its dashboards #37368 (
6fbbdd9b) and feat(studio): 全部类型 All types ends the 高级 fold, and the type directory lists every type a package could hold #37380 (45ed0a4b) share onlystudio/{en,zh}.ts, in different regions. - fix(app-shell): a new report from an app's reports list saves into the app's package, as a new view does #37357 (
baa9e0e0) shares no file. - None of the three adds a reader of the 17 removed keys.
维护者速读. Each line is accurate against the diff: the six items and the manage_metadata gate, Import beside New Package, the 17 never-released rows, the blast radius (greying only, server-gated, development face unchanged) and the Duplicate deviation. The 「请确认一件事」 line is a veto-window ask, not a gate (N2).
Changeset, read sentence by sentence against the diff. Every sentence holds. These were checked:
- the zh trigger label 软件包操作;
- the six labels (Export and Adopt reuse
engine.packages.detail.export导出 andadoptOrphans收编散落项); - "greyed with the reason on hover" (
title); - "Revert is also greyed while nothing has changed";
- "
&package=ID"; - the ten new keys;
- the 17 removed rows, with
nameTakenandappFailedkept.
One wording nit is N4.
Contract review. None is owed. The PR touches none of the four faces: no Clause-②: yes, no narrowing arm, no packages/spec/src/**, no governed path. So no record is written at either tier.
Done-when without Q2 and Q3. Done-when has four parts: the six items with the table's states and development-face behaviour; Import on Setup → Packages; none on ~org, on ~all or without manage_metadata; and en/zh pins. All four are met at head without either question.
- Q2 would add a seventh item and a greyed state the table gives as 「—」. It widens the agreed table, so it is the maintainer's.
- Q3 is deferred by the card's own Notes ("ask the maintainer once this lands").
- Both are follow-ups.
Notes
- N1 — The
l1-faceflagkeywords-other-cards: Fixes #37349is intended. Studio: remove the unread engine.studio.newApp.* rows and engine.studio.menu.typeCount (never released) #37349's claim (7175566231) carries it on this branch, and the fold form is oneFixesper member. Its Done-when is delivered in full: the rows are gone from en and zh, the dead-key sweep is clear, andcheck:i18n-keysand Test UI are green. SoFixesis right, notPart of. - N2 — Duplicate is greyed on a read-only package (zone ruling Q1 A), where the table says 「—」. This is within Done-when's "each one works the way the development face's action does today": the sheet offers Duplicate only under
authoring && writable.- The server's
requireDuplicableSourcerefuses exactly when!isWritablePackage(packages/runtime/src/domains/packages.ts:1700). That is the predicate behind the servedwritable, so the grey never hides a door that works. - Ablation A3 shows the pin holds the grey.
- The 速读's 「请确认」 will get no answer before a Tier S landing. Carry it to seat 4's maintainer list beside Q2 and Q3 so the veto window has a reader; flipping it is one line plus its pin.
- The server's
- N3 — Three files sit outside the claim's literal file surface; all three are explained in the PR body and belong to the card's mechanism:
StudioDesignSurface.tsx(+33): the host that holds the scope, permission, writability and pending facts.packageSource.ts(+17):PACKAGES_PACKAGE_PARAMandsetupPackagePath, beside their sibling constants.packageActions.tsx(new): the claim's "exposed for reuse, not copied".
- N4 — Cosmetic, optional. In the changeset, "Revert now asks for confirmation first" follows "Each opens the same dialog … as the development view's button", and the development view's Revert still runs at once. "The development view itself is unchanged" and the PR's Acceptance notes close the ambiguity.
- N5 — The report's MCP reads include
get_fileson the merged feat(ui): New Package offers 「同时创建应用」 / Also create an app, ticked by default #37338 and feat(studio): remove the Studio home; /studio opens the last package or Setup > Packages #37166, which git could answer (git show --staton their merge commits). Recorded as the checklist asks; it does not affect the verdict. - N6 — The dev's out-of-scope note stays as noted, not filed: the development face's Revert has no confirmation. Unifying the two changes the development face, which this card keeps, and Q3 may retire it anyway.
- N7 — Q2 (「新建软件包」 in the menu, and greying 「在设置中管理…」 for a user without the Setup pair) and Q3 (retiring the development face) are maintainer follow-ups for seat 4. Neither blocks this landing.
|
repo:objectstack#4 · os-justin · session_01QSeKYkkwuF6UuFtu85Yd5H Landing · 2026-11-26T01:02Z · head
|
Fixes #37139
Fixes #37349
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
One copy of each whole-package action.
metadata-admin/packageActions.tsx(new) holds what the development face's detail sheet used to write inline: the page's/api/v1/packagesrequest helper,revertPackage,exportPackageFile,adoptLooseItems(+adoptedText),EditPackageDialog(moved; still re-exported fromPackagesPage), the Adopt confirmation (AdoptLooseItemsDialog) and the Duplicate form (DuplicatePackageForm).PackageDetailSheetnow imports them; its testids, texts, requests and answers are unchanged (the existing sheet suites pass as they were).Studio's 「⋯」 (
studio-design/StudioPackageMenu.tsx, new). Drawn byStudioDesignSurfaceinto a newmenuslot ofStudioBackToApp, right of the app / package name and left of the Studio mark, only when the page has a current package that exists (never~orgor~all) anduseCanAuthorMetadata()holds. The six items, in the table's order:EditPackageDialogon the manifest/api/v1/packageslistsexportPackageFileDuplicatePackageFormin a dialog →duplicatePackagerevertPackageAdoptLooseItemsDialog, thenadoptLooseItemssetupPackagePath(id)A greyed item carries its reason as its
title. Writability or a pending count Studio has not learned yet greys nothing (the server's gate stays the authority, the same courtesy posture as the rest of Studio). Answers are toasts. After a revert or an adoption the surface bumps its publish nonce (pillars and the pending count re-read) and emits the metadata-refresh pulse; saved package info renames the bar's package name in place. 「发布全部草稿」 is not in the menu.Setup → Packages (
PackagesPage.tsx). Import now sits in the administration face's header beside New Package, the same input and handler as the development face (also in the folded⋯on a narrow header).?package=IDon that page opens the package's detail sheet once the list has loaded, then drops the param with a replace (the?new=packagepattern); an id the list does not name opens nothing.PACKAGES_PACKAGE_PARAMandsetupPackagePathlive inpackageSource.ts. This is a page-local query param, not a route.i18n. Additive:
engine.studio.packageMenu.{trigger,editInfo,duplicate,revert,manageInSetup,noChanges,duplicateTitle,duplicateDescription,revertTitle,revertDescription}in studioenandzh. Export and Adopt reuse the development face's own labels.Rider #37349 (its own commit,
chore(i18n): remove the studio rows no screen reads). Removes 17 rows from studioenandzh:engine.studio.menu.typeCountandengine.studio.newApp.{title,description,advancedHint,id,help.id,help.name,help.description,help.namespace,help.version,help.type,help.defaultDatasource,help.dependencies,nsDerived,created,exists,failed}.ui/scripts/check-i18n-dead-keys.mjslists exactly these 17 as confirmed, and agit grepoutside the catalogue finds no reader.engine.studio.newApp.nameTakenandengine.studio.newApp.appFailedare still read byPackageFormDialogand stay. Released-ness, measured onnpm pack @object-ui/i18n@18.6.0: itsdist/namespaces/studio/en.jsandzh.jscarry none of the 17 (only the differentengine.studio.landing.newApp/newAppDescription); controlengine.studio.changesis present. So this is a plain removal:Clause-②: no, no Removed-translation-keys list.⛔ No server, spec or route change. The development face is not retired.
Tests
studio-design/StudioPackageMenu-37139.test.tsx(new, 26 cases), realStudioDesignSurface, metadata client andMePermissionsProviderover a fetch stub:~org, none on~all, none withoutmanage_metadata(with a same-page control that has it).POST …/revert, after which the pending count clears; Adopt confirms then sendsPOST …/adopt-orphansand says 3 moved; Duplicate opens on 「Copy of Sales」 /ID-copyand sends the duplicate body; Edit opens the edit dialog on the listed manifest; Manage in Setup… lands on/apps/setup/component/developer/packages?face=admin&package=ID.packageActions, and neither spells the revert or adopt request in place.metadata-admin/PackagesPage.installedAppsUpdates-34722.test.tsx(the admin face's harness): the three assertions that said the admin face has no Import now say it has; new describes pin, in en and zh, Import before New Package in one header group and Import installing the file and re-reading the list (development-face control); and?package=IDopening that package's detail (Disable, Delete) and dropping the param, with an unknown id opening nothing.Local runs (head 178bfae; its tree is the f332471b tree the runs read)
NARROWED, declared: app-shell's whole package suite (2432 test files) was started and stopped by me after 31 minutes on the shared 4-core box with no file reported; the 223-file set above replaces it locally. CI's
Test UIruns the whole package.Ablations: each pin group red alone (ablation-replace, anchor x1 -> x0, restored to the HEAD blob, git diff HEAD empty)
The tests import source through the ui vitest aliases, so there is no dist leg.
Ablations 1 and 4 were first sent with a spelling the tool refused before running anything (an empty replacement; a replacement contained in its own anchor), so those first attempts measured nothing; the rows above are the re-runs with
--deleteand a distinct replacement.Gates
dispatch-gates.mjs --commands, the same 39 on the pre-rebase head 975fe6a3 and on 178bfae):--ranreconciliation 39 derived, 39 run, 0 NOT-MEASURED, exit 0.check:type-check-debtfirst answered exit 3 (PREREQUISITE NOT MET: it queued behind my own suite on the lock), then exit 0 under the lock on the rebased tree;pnpm --dir ui exec vitest run scripts/exit 0 there (172 files passed).check:test-source-aliasexit 0,check:i18n-keysexit 0,overlap-check.mjsVERDICT clean exit 0,check:new-line-citations0 new.ui/scripts/check-i18n-dead-keys.mjslists the 17 rider rows as confirmed before the rider; the rider grep is empty after it.Acceptance notes
DUPLICATE_SOURCE_NOT_A_BASE,requireDuplicableSource) and the development face does not offer it there, so 「behave exactly as on the development face」 and the server both point that way. Raised in the report's open questions; flipping it is one line.revertTitle/revertDescriptionkeys). The request is the sharedrevertPackage.manage_metadata, not Setup → Packages'setup.access+manage_platform_settings) still has no New Package door. Not in this card's menu table, so not built here. Relatedly, such an author's 「Manage in Setup…」 leads to a page Setup refuses them; the table gives that item no greyed state, so it is drawn as specified. Both are in the report's open questions.Verification
Read first:
studio-design/StudioPackageMenu.tsx(the greyed-state rules and where each answer goes), thenmetadata-admin/packageActions.tsx(the moved code; diff it against the removed lines ofPackagesPage.tsx), then the?package=effect inPackagesPage.tsx.Two-minute check: from the repo root,
pnpm --dir ui exec vitest run packages/app-shell/src/views/studio-design/StudioPackageMenu-37139.test.tsx. Expect 26 passed.Generated by Claude Code