Skip to content

Commit fa4ec1b

Browse files
committed
chore(changeset): read-only package views offer no save of their own (#35933)
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgW85kwjGaz7HqsmEuv
1 parent d2d160c commit fa4ec1b

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@object-ui/data-objectstack': patch
3+
'@object-ui/app-shell': patch
4+
---
5+
6+
fix(ui): a view a read-only package ships offers no footer calculation menu and no Rename
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
On a list view that ships inside a read-only package (a code or installed package), an admin was offered the footer's calculation menu and the options menu's Rename; the server refuses both saves ("save it into the customization package"), so the pick was taken back with a toast. Neither is offered there now. A shared view the console saved into the customization package, a stored view bound to no package and the reader's own view keep them.
12+
13+
The view's name cannot tell these apart, since every stored view is named `object.key`; the package the row was served under does. `listViews()` in `@object-ui/data-objectstack` now carries the row's served `_packageId` on both of its arms (the `config`-flattening arm dropped it). The console reads the server's `writable` verdict for that package from the package list it already holds for the session, the one the app bar's Studio entries read. While that list is unread, or when the read fails or does not name the package, the menu stays offered as before and the server's refusal still applies.

‎ui/packages/data-objectstack/src/listViews.servedPackage-35933.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function makeDS(seed: any[]) {
8686
describe('listViews carries the served package on every row (objectstack#35933)', () => {
8787
it('a flattened ViewItem row keeps its `_packageId`, shipped or custom', async () => {
8888
const rows = await makeDS([SHIPPED, CUSTOM]).listViews(OBJECT);
89-
const byName = new Map(rows.map((r: any) => [r.name, r]));
89+
const byName = new Map<string, any>(rows.map((r: any) => [r.name, r]));
9090
expect(byName.get(SHIPPED.name)?._packageId).toBe('com.example.showcase');
9191
expect(byName.get(CUSTOM.name)?._packageId).toBe('com.example.showcase.custom');
9292
// Still the flattened shape the switcher reads.

0 commit comments

Comments
 (0)