Repository navigation
fix(ui): a view a read-only package ships offers no footer calculation menu and no Rename - #35975
Conversation
…on a read-only package's view (#35933) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgW85kwjGaz7HqsmEuv
…d package (#35933) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgW85kwjGaz7HqsmEuv
…35933) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgW85kwjGaz7HqsmEuv
|
repo:objectstack#1 · os-sales · session_01L6bhgW85kwjGaz7HqsmEuv Final green head · 2026-11-21T03:34Z · area b1-DB
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4 席位核对 — ACCEPT (L1-b)Head-sha: fa4ec1b · read 2026-11-21T03:37Z 维护者速读
Must-fixNone. Should-fix
Checked
Owed
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Seat landing · 2026-11-21T03:41Z · Area b1-DB's PR for #35933 (scope A, seat call 2026-11-21): on a list view shipped inside a read-only package, the footer calculation menu and "rename" in the options menu are no longer offered. List-view rows now carry |
Requested by Sales · project thread
Fixes #35933
Clause-②: no
Metadata-protocol: none
Skills-docs: none — no authorable metadata changes (Metadata-protocol: none)
repo:objectstack#1 · os-sales · session_01L6bhgW85kwjGaz7HqsmEuv
维护者速读
What changes
@object-ui/data-objectstacklistViews(): each row now carries the package the server served it under (the item's_packageId), on both arms. Theconfig-flattening arm rebuilt the row fromconfigand dropped it; the bare-spec arm now also carries an item-level_packageIdwhen the spec is nested. The return type is unchanged (a Promise ofany[]).@object-ui/app-shellObjectView: an admin on a saved shared view is offered the footer calculation pick (pickSummary, from 列表底部计算行:常驻一行,用户点列底下的格子选计算(合计、平均、计数等),存到视图上 #35702) and the options menu's Rename only when the view's package is not one the server's package list carries as read-only. The verdict is the packages row'swritable(isWritablePackage, ADR-0070 D2), read throughusePackagePosture/fetchSessionPackages, the same session-held read the app bar's Studio entries already make, so no new request on a page the app bar has drawn. A row with no package (personal view, stored view bound to none, thesys_metadatasentinel) stays savable; the package id is read with the existingstudioPackageIdguard, now exported fromutils/appRoute.ts(not re-exported from the package entry).object.key, the console's own saved shared views included.Read first (risk order):
ui/packages/app-shell/src/views/ObjectView.tsx— the two!activeViewPackageRefusesSavesconditions inlistViewActions(rename,pickSummary) and theactiveSavedViewRowread above them.ui/packages/app-shell/src/hooks/useStudioDesignGate.ts—usePackageRefusesSaves, the fail-open answer overusePackagePosture.ui/packages/data-objectstack/src/index.ts—listViews' map:row._packageIdon the flattening arm, the rebuilt bare-spec return.Two-minute check:
pnpm --dir ui exec vitest run packages/app-shell/src/views/ObjectView.readOnlyPackageView-35933.test.tsx→ 6 passed; the first case reads "a view a read-only package ships: no calculation menu, no Rename".Tests
ui/packages/app-shell/src/views/ObjectView.readOnlyPackageView-35933.test.tsx(new, 6 cases, realObjectView,ListViewstand-in recording its props,fetchSessionPackagesstubbed): a read-only package's view gets noonColumnSummaryPickand noonRenameView; a customization-package shared view, a view bound to no package and a personal view get the pick; an unread list and a failed read leave the pick on the shipped view.ui/packages/data-objectstack/src/listViews.servedPackage-35933.test.ts(new, 3 cases): a flattened ViewItem row keeps_packageId(shipped and custom), a bare spec row keeps it, a row served with none gains none.Runs at head
bfa65e89(local, under the shared verify lock).bfa65e89is the pre-push spelling of this PR's headfa4ec1b6: the only change between them is the commit trailer reworded to the model-free pair, andgit diff bfa65e89 fa4ec1b6is empty, so every local reading below is a reading offa4ec1b6's tree:Targeted suites: 228 files / 2396 tests passed
pnpm --dir ui exec vitest run --maxWorkers=2 packages/app-shell/src/views/ObjectView packages/app-shell/src/hooks/useStudioDesignGate packages/app-shell/src/utils/__tests__/appRoute.test.ts packages/app-shell/src/__tests__/spec-symbol-parity.test.ts packages/app-shell/src/layout/__tests__/SidebarItemMenu.designFollowsPackagePosture-12615.test.tsx packages/app-shell/src/views/__tests__/columnSummaryWrite-35702.test.ts packages/data-objectstack/→Test Files 228 passed (228)·Tests 2396 passed (2396)·VERDICT command-exit 0. That is everyObjectView*suite, the Studio-gate andappRoutesuites, and the whole@object-ui/data-objectstackpackage. The whole@object-ui/app-shellpackage (2357 test files) is declared to CI's Test UI shards, not run locally: a local full run held the shared lock for 20 minutes without finishing and was stopped.Type-check: both packages exit 0
pnpm --workspace-concurrency=2 --filter @object-ui/data-objectstack --filter @object-ui/app-shell type-check→ bothDone,VERDICT command-exit 0(app-shell's includestsc -p tsconfig.test.json, which compiles the new test).Ablations: each gate reverted, its pin goes red, restore proven
All via
node scripts/ablation-replace.mjs(anchor hit 1 → 0, blob moved, restore blob == HEAD andgit diff HEADempty). The tests import the source relatively, so nodist/is in the path.pickSummarygate (: isAdmin && !activeViewPackageRefusesSaves && isSavedViewId(→: isAdmin && isSavedViewId(): "a view a read-only package ships: no calculation menu, no Rename" fails,expected true to be false; 5 others pass.activeView && isAdmin && !activeViewPackageRefusesSaves && savedViews.some(→ without the middle term): the same case fails,expected [Function] to be undefined.if (packageId !== undefined) row._packageId = packageId;deleted): "a flattened ViewItem row keeps its_packageId, shipped or custom" fails; 2 others pass. The bare-spec case passes either way: that arm already kept a spec-level_packageId, and the case pins it.Acceptance notes
Verification
Derived gate families: 41 derived, 41 run, 0 NOT MEASURED
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack(merge base9ed18a50e, headbfa65e89) derived 41 families. All 41 exited 0. Two needed a second run because the first never got the lock (vitest run scripts/exit 99;check:type-check-debtexit 3 PREREQUISITE NOT MET). Their reruns under the lock:scripts/172 passed / 2 skipped files, 5111 tests; type-check-debt0 ledger entr(ies) re-measured ... none above its recorded number.--ranreconciliation with exit codes:41 run, 0 NOT-MEASURED (a DERIVED zero).Clause-② measurement: no
The built declaration
ui/packages/data-objectstack/dist/index.d.tsstill declareslistViews(objectName, options?: { previewDrafts?: boolean })returning a Promise ofany[], as on main. This diff adds no exported type or symbol to a published entry.@object-ui/app-shellisprivate: true. The exportedstudioPackageIdandusePackageRefusesSavesare not re-exported from its entry (src/index.tsnamesresolveHostAppSegment, appRouteSegment, filterActiveAppsfrom./utilsand no Studio-gate hook).Overlap:
node scripts/pm/overlap-check.mjs --branch=claude/issue-35933-view-package-gate→ merges cleanly withorigin/main, #35918 and #35910 (each sharesObjectView.tsx);VERDICT clean exit 0.Not browser-verified: NOT MEASURED, reason: no showcase stand was booted for this card. The same refusal path is browser-measured on #35919 (
rt-07), and the gate is pinned against the realObjectViewabove.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgW85kwjGaz7HqsmEuv