Repository navigation
fix(plugin-designer, app-shell): app writers save a packaged app at its package - #35151
Conversation
Claude-Session: https://claude.ai/code/session_01JQwxbYRqkDAGuse5Wqbohi Co-authored-by: Claude <noreply@anthropic.com>
… package; changeset Claude-Session: https://claude.ai/code/session_01JQwxbYRqkDAGuse5Wqbohi Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbYRqkDAGuse5Wqbohi Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-warren · session_01JQwxbYRqkDAGuse5Wqbohi Final head for L1 · 2026-11-18T08:37ZHead-sha: |
|
repo:objectstack#1 · os-warren · session_01JQwxbXKtHccbeakAgquNs9 L1 review (#35115) · 2026-11-18T08:39ZL1: ACCEPT This is the first L1 on this PR. I read the full diff against the merge base The fix.
Shape and scope.
Changeset. Deviations named for this read, all accepted.
Tests and evidence.
CI at this head, from check-runs: 39 success, 13 skipped, none failed or in progress. Must-fixNone. Should-fixNone. Notes
|
|
repo:objectstack#1 · os-warren · session_01JQwxbYRqkDAGuse5Wqbohi Landing · 2026-11-18T08:40Z
Open findings: L1 notes only (N1 changeset wording). #35115 items N1/N2 live on loose-ends card #35155. State: ready + auto-merge armed by area o1-B (lease Dev-effort: medium · Rounds: 1 |
Requested by Warren · project thread
Fixes #35115
Clause-②: no
Metadata-protocol: none
维护者速读
?package=),与读取时用的是同一个地址;不属于任何包的应用保持原来的无包地址。ui/packages/app-shell/src/hooks/useNavigationSync.ts(新增appAddress,读、写、撤销共用它);ui/packages/plugin-designer/src/pages/EditAppPage.tsx(保存带servedPackageId);两个*-35115测试文件。pnpm --dir ui exec vitest run packages/plugin-designer/src/__tests__/EditAppPage.packageScope-35115.test.tsx packages/app-shell/src/hooks/__tests__/useNavigationSync.packageScope-35115.test.tsx,预期 2 个文件、6 个用例全绿。What changes
EditAppPagealready read the stored app at the served_packageId; its save now passes the same package as{ packageId }(the SDK sends?package=). OneowningPackagereading decides the address for both the read and the save, the same reading App management'ssaveAppuses: a missing_packageIdand the server'ssys_metadatasentinel are package-less, so a package-less app keeps the package-less read and save (a three-argumentsaveItem, byte-identical to before).useNavigationSyncgainsappAddress(appName): the served app's name and its owning package (isPackageLessItemfromstudioScope, the existing package-less predicate).storedAppreads at it, andsaveApp(so every navigation write and every Undo) saves at it.isNavigationSyncableApp, unchanged), and the server's save door refuses a write onto an artifact-backed app of a type with no overlay channel whether or not the write names its package (refusePackagedBaseOverride:ITEM_LOCKEDwhen it names the read-only base,NOT_OVERRIDABLEotherwise). Naming the package writes nothing the package-less save did not.edit-app-load-failed("Application NAME could not be read for editing: REASON"): theappDesigner.*group holds wizard chrome only, andcommon.*has no read-failure sentence.EditAppPageuses no translation hook at all, and its sibling strings (not found, the success and failure toasts) are hard-coded too. A new key means every locale pack plus theDESIGNER_DEFAULT_TRANSLATIONSmirror, which is beyond a copy nit.getAuthoredItemrejects with theMetadataErroritsparseErrorbuilds from the server'serror.message, and the page'sreason()passes thatmessagethrough. The "unknown error" comes only from the empty read (getAuthoredItemanswersnullwhen no layer holds the app), wheresaveAppthrows a bareError()and there is no server sentence to show. Saying something better there needs a newappManagement.toast.*key in every pack, so it is left.Tests
ui/packages/plugin-designer/src/__tests__/EditAppPage.packageScope-35115.test.tsx: a packaged app is read and saved at its package; a package-less app, and one served withsys_metadata, read with{}and save with three arguments.ui/packages/app-shell/src/hooks/__tests__/useNavigationSync.packageScope-35115.test.tsx: the same three cases for a navigation write, including the Undo save.useNavigationSync.authoredApp-35054.test.tsxpinned the package-less read of its packaged fixture (_packageId: 'com.qa.tr'), the defect this card fixes; it now expects{ packageId: 'com.qa.tr' }.Acceptance notes
useNavigationSyncnow writes at the served app'sname, not at theappNameargument: the two differ only when a caller passes a route segment (a package id), which no in-repo caller does (the all-apps methods passapp.name).sys_metadatasentinel constant now has one more module-local copy (EditAppPage, besideMetadataObjectsPage,AppManagementPage,studioScopeandappRoute); plugin-designer cannot import app-shell's predicate. Not filed: no defect, a consolidation.saveItemoptions the page and hook hand the SDK, andmetaSaveQueryturningpackageIdinto?package=); NOT MEASURED live against a booted server.Verification
All readings at head
338b3971(treeobjectstack-ai/objectstack, merge baseaef42cba4).Tests and type-check
pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-designer/src/__tests__/ packages/app-shell/src/hooks/__tests__/ packages/app-shell/src/views/metadata-admin/ResourceEditPage.navigationWrites-28680.test.tsx packages/app-shell/src/preview/__tests__/ apps/console/src/pages/system/__tests__/(lock VERDICT command-exit 0): Test Files 184 passed (184), Tests 1622 passed (1622). The two new pin files re-run at head: 2 files, 6 tests passed.pnpm --filter @object-ui/plugin-designer --filter @object-ui/app-shell run type-check: bothtsc --noEmitandtsc -p tsconfig.test.jsonlegs exit 0 (the app-shell re-run after a test-only cast fix, lock VERDICT command-exit 0).Ablations (scripts/ablation-replace.mjs, each restored with blob == HEAD and git diff HEAD empty)
Subjects are imported by relative source path, so no build sits between the mutation and the run.
EditAppPagesave without{ packageId: servedPackageId }: the packaged case RED (expected undefined to deeply equal { packageId: 'com.qa.scope' }), the package-less and sentinel cases GREEN. Blob 844e7d40 to 87b19d7c, restored to 844e7d40.useNavigationSyncsave without{ packageId: address.packageId }: the packaged case RED (expected [ 'app', 'qa_scope_app', undefined ] to deeply equal [ 'app', 'qa_scope_app', …(1) ]), the other two GREEN. Blob 0b302ecd to 9b7f237d, restored to 0b302ecd.useNavigationSyncread without the package: the packaged case RED ongetAuthoredItemcalled with the package, the other two GREEN. Blob 0b302ecd to 681d055e, restored to 0b302ecd.Direction in each: the one predicted in the file headers.
Derived gate families
node scripts/pm/dispatch-gates.mjs --commands: 38 commands; all 38 run, each exit 0 (--ranreconciliation: 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN, all carrying exit codes). The--ranrun flaggedscripts/check-skill-identifier-liveness.mjsas changed on origin/main after the merge base; this diff touches no skill, and CI runs the current copy.node scripts/pm/overlap-check.mjs: VERDICT clean exit 0 (merges cleanly with origin/main).Generated by Claude Code