Skip to content

fix(ui): a view a read-only package ships offers no footer calculation menu and no Rename - #35975

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-35933-view-package-gate
Nov 21, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-35933-view-package-gate

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

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-objectstack listViews(): each row now carries the package the server served it under (the item's _packageId), on both arms. The config-flattening arm rebuilt the row from config and dropped it; the bare-spec arm now also carries an item-level _packageId when the spec is nested. The return type is unchanged (a Promise of any[]).
  • @object-ui/app-shell ObjectView: 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's writable (isWritablePackage, ADR-0070 D2), read through usePackagePosture / 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, the sys_metadata sentinel) stays savable; the package id is read with the existing studioPackageId guard, now exported from utils/appRoute.ts (not re-exported from the package entry).
  • Fails open on purpose: while the list is unread, when the read fails, and for a package the list leaves out (kernel packages), the menu stays as it was before and the server's refusal still applies.
  • No name-shape rule: every stored view is named object.key, the console's own saved shared views included.

Read first (risk order):

  1. ui/packages/app-shell/src/views/ObjectView.tsx — the two !activeViewPackageRefusesSaves conditions in listViewActions (rename, pickSummary) and the activeSavedViewRow read above them.
  2. ui/packages/app-shell/src/hooks/useStudioDesignGate.ts — usePackageRefusesSaves, the fail-open answer over usePackagePosture.
  3. ui/packages/data-objectstack/src/index.ts — listViews' map: row._packageId on 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, real ObjectView, ListView stand-in recording its props, fetchSessionPackages stubbed): a read-only package's view gets no onColumnSummaryPick and no onRenameView; 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). bfa65e89 is the pre-push spelling of this PR's head fa4ec1b6: the only change between them is the commit trailer reworded to the model-free pair, and git diff bfa65e89 fa4ec1b6 is empty, so every local reading below is a reading of fa4ec1b6'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 every ObjectView* suite, the Studio-gate and appRoute suites, and the whole @object-ui/data-objectstack package. The whole @object-ui/app-shell package (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 → both Done, VERDICT command-exit 0 (app-shell's includes tsc -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 and git diff HEAD empty). The tests import the source relatively, so no dist/ is in the path.

  1. pickSummary gate (: 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.
  2. Rename gate (activeView && isAdmin && !activeViewPackageRefusesSaves && savedViews.some( → without the middle term): the same case fails, expected [Function] to be undefined.
  3. Adapter carry (the line 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 base 9ed18a50e, head bfa65e89) 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-debt exit 3 PREREQUISITE NOT MET). Their reruns under the lock: scripts/ 172 passed / 2 skipped files, 5111 tests; type-check-debt 0 ledger entr(ies) re-measured ... none above its recorded number. --ran reconciliation with exit codes: 41 run, 0 NOT-MEASURED (a DERIVED zero).

Clause-② measurement: no

The built declaration ui/packages/data-objectstack/dist/index.d.ts still declares listViews(objectName, options?: { previewDrafts?: boolean }) returning a Promise of any[], as on main. This diff adds no exported type or symbol to a published entry. @object-ui/app-shell is private: true. The exported studioPackageId and usePackageRefusesSaves are not re-exported from its entry (src/index.ts names resolveHostAppSegment, appRouteSegment, filterActiveApps from ./utils and no Studio-gate hook).

Overlap: node scripts/pm/overlap-check.mjs --branch=claude/issue-35933-view-package-gate → merges cleanly with origin/main, #35918 and #35910 (each shares ObjectView.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 real ObjectView above.


🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgW85kwjGaz7HqsmEuv

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 21, 2026
@objectstack-fleet
objectstack-fleet Bot requested a review from os-sales November 21, 2026 03:13
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgW85kwjGaz7HqsmEuv

Final green head · 2026-11-21T03:34Z · area b1-DB

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4

席位核对 — ACCEPT (L1-b)

Head-sha: fa4ec1b · read 2026-11-21T03:37Z

维护者速读

  • 可以合:管理员打开只读包自带的列表视图时,底部「计算」菜单和「重命名」不再出现,避免点了必被服务器拒绝再回滚的体验;自定义包里的共享视图、个人视图照旧。
  • 判断依据和 Studio 入口用的是同一份「这个包能不能写」的结论,不额外发请求;读不到时菜单照旧出现(服务器仍会拒绝),最坏情况就是回到改动前的样子。
  • 卡上「其他保存入口」(视图设置面板的保存、管理视图里的置顶/设默认/删除)这次没动,按席位裁定 A 移到 Read-only package views still offer view-settings save and the Manage Views pin / set default / delete actions, which the server refuses #35974,PR 正文写明了。

Must-fix

None.

Should-fix

  • S1 (text): the body's local runs name head bfa65e89, which is not in this PR's history (the three commits are 806b530f, d2d160cd, fa4ec1b6), so I could not diff it against the final head. CI is green on fa4ec1b6 and covers the same suites; one line saying the local runs predate the rebase (or re-stating them at fa4ec1b6) would make the record match the head.

Checked

Owed

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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 _packageId through the data adapter, and the writable verdict reuses the existing package posture read. The view-settings save and the Manage Views pin / set default / delete actions move to #35974. Clause-②: no, so no contract L2 is owed. L1-b ACCEPT 7056735328 on fa4ec1b6 (this head); its text item S1 was fixed in the PR body, which leaves the head unchanged. check-governed-merges --pr 35975 reads NOT governed (+399/−8). landing-k could not answer (no Test Core shard ran in the last green run), so the seat read K by hand: K = 6, and the PR touches neither translations/ nor skills/. On this head, 47 check-runs are success, 15 are skipped and none failed. The seat readies this PR and arms auto-merge in the same step. The PR carries Fixes #35933.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Footer calculation menu is offered on read-only package views; the list-view rows lose _packageId so the UI cannot tell them apart

2 participants