Skip to content

feat(console): Save to this view on a shared view asks once, then saves and publishes it; layout and row colour join the list draft (#35955 PR 2) - #36123

Merged
objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/project-thread-7uyrn8
Nov 21, 2026
Merged

objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/project-thread-7uyrn8

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

repo:objectstack#1 · os-sales · session_01L6bhgWyeXh2Keywo6oK1Nn

Part of #35955 (PR 2 of three: PR 1 #36026 made a list change a draft; PR 3 retires the server-side list preference and runs in parallel. The card stays open.)

Clause-②: yes (widening) — five new console.objectView.draft.* keys in every @object-ui/i18n locale pack (saveToViewConfirmTitle, saveToViewConfirm, saveToViewConfirmButton, savedForEveryone, pendingDraft); @object-ui/plugin-list ListView gains the optional host prop onRowColorChange and two optional viewDefaults members, viewType and rowColor; nothing removed or renamed
Metadata-protocol: none

维护者速读

  • 共享视图上,能改这个视图的人(管理员,且视图所在的包接受保存)在「保存 ▾」里也看到「保存到这个视图」:先问一次「所有用这个视图的人都会看到」,确认后存并立刻发布,提示「已保存,所有人可见」。选项菜单里的「保存」同一条路。
  • 这个视图已有没发布的修改(谁存的都算)时什么都不写,提示先去视图设置里发布或放弃;不替任何人发布。保存人的行高、列宽不会写进共享视图。
  • 显示面板的「布局」「行颜色」现在也是草稿:点开记录再回来还在,两条「保存」都会存进去,「放弃」还原成视图自己的。

What changes

Save to this view on a shared view (ObjectView.tsx, objectViewViewCrud.tsx, runtime-metadata-persistence.ts)

  • Offered when canSaveToSharedView: not an environment list, not a personal view, and the same test the footer calculation's pick uses (isAdmin && !activeViewPackageRefusesSaves && isSavedViewId(savedViews, id)), so a read-only package's view and the fallback tab never get it. A personal view keeps its own save. The phone / narrow Save ▾ is the same component; the options menu's Save calls the same handler.
  • It asks once through confirmHandler (saveToViewConfirmTitle / saveToViewConfirm naming the view / saveToViewConfirmButton, cancel console.objectView.cancel).
  • The body is the view's own config with the draft laid over it (layListStateOverView, split out of buildPersonalViewConfig), then buildViewConfigSaveBody, the body the view settings panel saves. The reader's row height is left out (rowHeight: undefined on the laid preference, F5); column widths never travel.
  • New saveAndPublishRuntimeMetadata(type, name, body, ctx): a draft write with the first-write pin ({ mode: 'draft', ifNoneMatch: '*' }), then publish. A 409 METADATA_CONFLICT on the write means a draft is already pending; it resolves 'pending-draft' and nothing is written or published. A publish the server refuses discards the draft this save wrote (reset(type, name, { state: 'draft' })) and rethrows. Caches are invalidated and the draft ledger announced on both paths.
  • handleViewSaveAndPublish shows the saved body at once (setViewDraft) and lets handleDraftBarChange drop it when the saved-views re-read lands (fix(console): a shared view's draft save keeps the list on the draft, and a second change builds on the first #36031), so the list does not flash the old sort. On 'published' the list draft is dropped (handleResetView) and "Saved, visible to everyone" is toasted; on 'pending-draft' the draft stays and pendingDraft is toasted.
  • Using the server's pin instead of a client read of the draft closes the read-then-write window the premise read named (P4). The window left is between this save's draft write and its publish: the view settings panel writes its draft without the pin, so a settings save landing in those milliseconds would overwrite this draft and be published with it. A known edge, not closed here: card Save to this view: a view-settings draft saved between the pinned draft write and the publish gets published with it (publish takes no draft-version pin) #36137.

Layout and row colour join the draft (objectViewListRenderer.tsx, ListView.tsx, personalViews.ts)

  • The renderer wires the published onViewChange to listDraft.patch({ viewType }) and the new onRowColorChange to listDraft.patch({ rowColor }); picking the view's own value drops the entry. The draft's values go to ListView as schema.viewType / schema.rowColor, and the view's own through viewDefaults.viewType / viewDefaults.rowColor, so the layout / rowColor parts and the Display count still judge against the view after a remount.
  • ListView: onRowColorChange fires on a pick in the row colour panel (the rule in force) and on Clear (null), never at mount or for a reset. Each new viewDefaults member is read only when its key is present; without them nothing changes.
  • Both saves read them: PersonalViewListState.display carries viewType and rowColor; a layout switch retypes the view and fills the kanban / gallery mirror from the saved columns when the block lacks one (IN_PLACE_COLUMN_MIRRORS). Save as my view builds from listDraft.draft.viewType ?? activeView.type and passes the row colour.

i18n: the five keys in all ten hand-written packs; zh-Hant regenerated (pnpm gen:zh-hant).

Docs: ui/packages/plugin-list/README.md (new host-props section), content/docs/ui/views.mdx (§ "A user's list state never writes the view"), docs/qa/platform-checklist/areas/records-forms.json records-forms.adhoc-filter-sort-builder revision 14 (steps[8], acceptance[5], negative[4]; not loosened).

Tests

  • New ObjectView.sharedViewSave-35955.test.tsx (8): confirm, then save(... { mode: 'draft', ifNoneMatch: '*' }) then publish, body carries the draft sort and the view's own row height short while the reader's stored one is tall; cancel writes nothing; pending draft (409 METADATA_CONFLICT) writes nothing more and toasts; refused publish resets the draft; a read-only package's view is not offered; layout and row colour laid into the schema and viewDefaults and kept across a remount; picking the view's own value drops it; the save retypes to kanban with its columns mirror and the row colour.
  • runtime-metadata-persistence.test.ts (+4): published; pending-draft; a 409 with another code (DESTRUCTIVE_CHANGE) rethrows; refused publish resets and rethrows.
  • ListView.personalization-28950.test.tsx (+4): the rowColor part judged against viewDefaults, a control without them, onRowColorChange on pick and on Clear (null), and no call at mount.
  • ObjectView.personalViews-29635.test.tsx (+1): the draft row colour reaches the personal save and Save as my view.
  • L1-b S1 (ObjectView.sharedViewSave-35955.test.tsx +3, ObjectView.personalViews-29635.test.tsx +2): the confirm and Save as my view's default name read the view's tab label (listLabel, viewTabLabel), with a view that has no label and one whose label is a locale map (plus a plain-label control on the confirm). Ablated: the raw label turns the locale-map confirm case and both copy-name cases red. In the shared-view harness a stored view with no label already arrives named by its name, so that case is a pin, not a discriminator.
  • ObjectView.listUrlState-11860.test.tsx (+2, G2): a reload whose address was rewritten before the seed applies its uf_* state; a reload on a record page then Back applies the list entry's uf_* state. Pins of current behaviour, no behaviour change.

Acceptance notes

  • P3 (seat 14:28Z): any pending draft refuses, the saver's own earlier draft too; the server does not record a draft's author.
  • F5: a shared save never carries the saver's row height or column widths; a personal save still carries the row height, as on main.
  • The view settings panel and the footer calculation still save a shared view as a draft that the view settings publish (ruling 7045525672 unchanged).
  • Not touched: where column widths, row height and the view order are stored (PR 3).
  • Landing order with feat(console): keep list column widths, row height and tab order in this browser only #36133 (PR 3): both bump records-forms.adhoc-filter-sort-builder to revision 14 and edit the same section of content/docs/ui/views.mdx. Whichever lands second renumbers to 15 and merges the two history entries.
  • L1-b N1 taken: the pending-draft test is isDraftVersionConflict from DraftConflictDialog.tsx, the predicate the other draft-door callers use.

Verification

CI and local runs at head da8b797b; the S1 commit's tests and type check at 0ada6797.

  • CI: every check green (54 passed, 10 skipped by path), mergeable clean. The first head (433d7c02) went red on four pins, each fixed in its own commit: the rowColor firing control in object-view-unmirrored-keys-7779.test.ts now reads const viewOwnRowColor = viewDef.rowColor ?? listSchema.rowColor; (the relay reads the view's own rule once, so the draft's can lie over it); the de quote-pair count in de-quote-pairing-3876.test.ts goes 120 to 121 for saveToViewConfirm („{{name}}“); three viewDefaults equalities in ObjectView.userListState-12418.test.tsx gain viewType; a checker narrowing in the new test is read through a cast. No pin was loosened: each asserts the same thing at the new spelling.
  • Local (pnpm --dir ui exec vitest run over app-shell/src/views/ObjectView*, runtime-metadata*, personalViews*, listDraft*, plugin-list/src/__tests__/ListView*): 237 files, 2290 tests; the only 3 failures were the viewDefaults equalities above, 40/40 after the fix. packages/i18n: 105 files, 1962 passed. packages/types 7779: 236/236.
  • pnpm --dir ui/packages/app-shell run type-check exit 0; pnpm --dir ui/packages/plugin-list run type-check exit 0 (both include tsconfig.test.json).
  • eslint on every changed ui/ source and test: 0 errors. check:i18n-keys, check:i18n-drift, check:control-bytes, check:vi-mock-specifiers, check:vi-mock-override-shape, check:metadata-write-doors, check:changeset-claims, check:pending-changeset-literals, check:readme-exports, check:new-line-citations exit 0; node scripts/check-platform-checklist.mjs OK.
  • node scripts/pm/overlap-check.mjs --base=origin/main: clean against main dc10b3b4 and open feat(record-page): a desktop comment panel beside the record, opened from a header icon; 动态 keeps system entries (#36075) #36114, fix(comments): Reply focuses the reply box, author avatars with initials, mention menu at the caret, delete toast #36105, feat(ui,spec): userActions.exportCsv false hides the console Export entry #36096, feat(list): a phone list gets its own top row, one row of pills, and bottom-sheet sort, filter and view panels that apply on ✓ #36024.
  • Clause-② measured on the built ui/packages/plugin-list/dist/ListView.d.ts: onRowColorChange and the two viewDefaults members are added, optional; no member removed or narrowed. The seat runs the declaration L2.
  • Browser, at 0ada6797 (showcase objectstack dev, the ui/ HMR console pointed at it; checklist records-forms.adhoc-filter-sort-builder steps[8]), on a shared view the admin created and published (showcase_task.team_tasks, package com.example.showcase.custom):
    • admin, sort by Priority: Save offers "Save to this view"; the confirm reads "Everyone who uses “Team tasks” will see these changes."; confirming sends PUT /api/v1/meta/view/showcase_task.team_tasks?mode=draft with If-None-Match: * (200) then POST …/publish (200) and toasts "Saved, visible to everyone"; Discard and Save go.
    • a second reader who is not an administrator (phone.demo@example.com) opens the view sorted by Priority, and after a sort of their own is offered only "Save as my view". Control: on the read-only package's showcase_task.in_progress the admin is offered only "Save as my view" too.
    • with a draft of the view already pending, the admin's confirmed save gets 409 on the pinned PUT, sends no publish, toasts the pending-draft hint and keeps Discard and Save; the pending draft is still there afterwards and the live view unchanged.
    • Not driven in the browser: the row height (F5) and the layout and row colour round trip, pinned in the unit tests above.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgWyeXh2Keywo6oK1Nn


Generated by Claude Code

…blish; layout and row colour join the draft

Claude-Session: https://claude.ai/code/session_01L6bhgWyeXh2Keywo6oK1Nn
Co-authored-by: Claude <noreply@anthropic.com>
…aft, and the two reload edges

Claude-Session: https://claude.ai/code/session_01L6bhgWyeXh2Keywo6oK1Nn
Co-authored-by: Claude <noreply@anthropic.com>
… and its checklist leg

Claude-Session: https://claude.ai/code/session_01L6bhgWyeXh2Keywo6oK1Nn
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/l 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
…ere the relay now takes it

Claude-Session: https://claude.ai/code/session_01L6bhgWyeXh2Keywo6oK1Nn
Co-authored-by: Claude <noreply@anthropic.com>
…the remounted list's props through a cast

Claude-Session: https://claude.ai/code/session_01L6bhgWyeXh2Keywo6oK1Nn
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Posted 2026-11-21T15:52Z. The brief handed to the isolated declaration-face reviewer for PR #36123 (owed by Clause-②: yes (widening): ListView gains the optional onRowColorChange and viewDefaults.viewType / rowColor). The record follows as its own comment.

Contract review brief — PR #36123 @ da8b797b9e58f13882bff881c749082577cbb3e9 (card #35955)

You review at TIER_DEFAULT. Render ONE ## Contract review record on this head — its shape is
node scripts/pm/record-recognisers.mjs --template --face declaration — with a PASS or FAIL verdict, and post it as ONE comment
on the PR or its card.

Inputs — these and nothing else:
· card #35955: its body and EVERY comment (rulings and earlier records included)
· also merged PR #36026 (#35955 PR1, list drafts) and open draft PR #36133 (PR3, browser-only list layout), bodies only, for context; the seat brief /mnt/project-files/build-seat1/card-35955-PR2.md (scope only, not its conclusions); ruling A on changeset levels (level follows the Metadata-protocol line; a Clause-② widening alone ships patch)
· PR #36123: its body, its file list, and the net diff against main at da8b797b9e58f13882bff881c749082577cbb3e9
· the check-runs on da8b797b9e58f13882bff881c749082577cbb3e9: their conclusions ARE the gate verdicts
⛔ Not the dispatch order, ⛔ not the dispatching seat's own conclusions — this brief is adversarial by design.

⛔ READ-ONLY. No worktree, no checkout, no build, no test run, no gate re-run, no ablation: the check-runs
on the head already answered every derived gate family, and a local run costs more than it returns.
If ONE probe is unavoidable, the record's Local-runs: line says probe — REASON; otherwise none.
Scratch space is /tmp/claude-0/-home-user/3d3cbaf6-4903-5fed-92d4-c2b94a45e868/scratchpad/pr-36123/ alone; nothing there you did not write this round is read.

Judge, in the record's own sections:
① Derived judgments — every accept-set and public-surface change the diff implies, each named right or wrong.
② Semver level — the changeset (or skip-changeset) matches what the diff publishes, and the Clause-②: line.
③ Boundary flags — every dev flag and every open_questions entry answered, or escalated.
On every face, SQL push-down: a new id materialisation or in-app join where SQL could push down is a
finding unless a reason is given (AGENTS.md, Prime Directive 5: SQL first).
Sign Implemented-by: with the dev's branch and Reviewed-by: with your session id — the value is the FIRST
thing after each colon.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4

席位核对 — ACCEPT (L1-b)

Head-sha da8b797 · read 2026-11-21T15:55Z · first L1 record on this PR, full read · base 7dd1a2f6, 6 commits, 30 files, +905/−52 · l1-face: every row ok except changeset flagged for @object-ui/types (a test-only file, below) · CI at this head: 56 success, 12 skipped, 0 failed.

维护者速读

共享视图现在可以直接「保存到这个视图」:只给能改这个视图的管理员,先问一次「所有人都会看到」,确认后存好并立刻发布,和您 D2 选的 A 一致。如果这个视图在视图设置里已经有一份没发布的修改,不论是谁存的,这次什么都不写,只提示先去视图设置处理,不会替别人把草稿发出去。这一点由服务端判定(只在没有草稿时才允许写),比先读一遍再写更可靠。保存的人自己调的行高、列宽不会写进共享视图。「布局」和「行颜色」也进了草稿:点开记录再回来还在,两种保存都会带上。有一处小问题建议修:确认框里视图名直接取的原始字段,视图没有名字时会显示成空的「」;视图名是多语言写法时会显示成乱码。页面上其它地方显示视图名用的是同一个函数,这里也换成它就行。

Must-fix

None.

Should-fix

  • S1, the confirm names the view by its raw label (ObjectView.tsx handleSaveToSharedView: { name: (activeView as any).label ?? '' }).
    • What goes wrong. A view's label is an I18nLabel, either a string or an inline locale map (viewTabLabel.ts header), and the spec gives it no default. A label-less shared view reads "Everyone who uses “” will see these changes" (zh 「所有用「」的人…」). A locale-map label would print [object Object].
    • Fix. The page already computes the tab's own name for this view, listLabel (viewTabLabel(…)), from useObjectViewRecordNavigation. Name the view with that, or with the same viewTabLabel call, so the dialog and the tab say the same thing.
    • Same pattern elsewhere. Save as my view's copyName on main has the same raw label (pre-existing). It is fine to fix both in one line each.

Nits

  • N1. saveAndPublishRuntimeMetadata re-spells status === 409 && errorCodeIs(err, 'METADATA_CONFLICT'), the predicate DraftConflictDialog.tsx:111 already has. It's fine as is; reusing that predicate would keep the one "which 409" rule in one place.

Checked

  • The pin's meaning.
    • The draft save sends { mode: 'draft', ifNoneMatch: '*' }. The door's refusal reads "this save asserted that no ${firstWritePin} row exists" (protocol-lock-version-gates.ts metadataConflictRefusal), with the pin judged on the save's own state. On a published view with no draft, the write is accepted. With a pending draft it is 409 METADATA_CONFLICT.
    • This is the same use as ObjectHooksPanel.tsx:385 and the create path that DraftConflictDialog.tsx:73 documents: "the door refuses it when the name already holds a draft".
    • The save addresses the same partition as persistRuntimeMetadata, with no packageId, so the pin and the publish name the row the panel would write.
    • A 409 with another code (DESTRUCTIVE_CHANGE) rethrows, and that is tested.
  • P3/P4 (the seat's claim amendment 7064098684). Any pending draft refuses, the saver's own included. A refused publish runs reset(… { state: 'draft' }) and rethrows. The pin guarantees it was this call's draft. Caches are invalidated and the ledger announced on both paths.
  • Known edge. The body states the window left: between the draft write and the publish, a pin-less settings save could land. This is narrower than the premise's read-then-write window.
  • Who sees it. canSaveToSharedView = not an environment list, not personal, an admin, the package doesn't refuse saves, and isSavedViewId. That is the footer pick's test, so a read-only package's view and the fallback tab are excluded, and there is a test for it.
    • A personal view keeps handleSaveToPersonalView first.
    • The options menu's Save now calls the same saveToThisView.
    • The confirm goes through confirmHandler. The cancel key console.objectView.cancel exists.
  • F5. The shared body is layListStateOverView over pref with rowHeight: undefined, so rowHeight falls back to view.rowHeight. Widths never travel. The test pins the view's short against the reader's stored tall. The personal save is unchanged.
  • Refactor. buildPersonalViewConfig is now layListStateOverView plus buildViewConfigSaveBody(...).config, which is byte-for-byte the old body for a state with no display.
  • Layout and row colour in the draft.
    • The renderer wires onViewChange and the new onRowColorChange to listDraft.patch. Picking the view's own value drops the entry, compared by field, as displayDeviation.color compares.
    • The draft lies over schema.viewType / schema.rowColor, where null means none. The view's own values go in viewDefaults and are read only when their key is present.
    • ListView fires onRowColorChange only on a pick or Clear. handleViewChange is user-driven only; the schema.viewType sync effect calls setCurrentView, not the callback, so there is no patch loop at mount.
    • A retype fills the kanban or gallery mirror from the columns when the block has none (IN_PLACE_COLUMN_MIRRORS). Save as my view takes listDraft.draft.viewType and the row colour.
  • After publish. setViewDraft(laid.view) plus handleDraftBarChange() hold the saved body until the saved views re-read (fix(console): a shared view's draft save keeps the list on the draft, and a second change builds on the first #36031). Then handleResetView drops the list draft, and the chips stay.
  • i18n. There are 5 keys in each of the 11 locale files (zh-Hant regenerated). de „{{name}}“ is counted, 120 → 121.
  • Pins moved, not loosened.
    • 7779's firing control now reads const viewOwnRowColor = viewDef.rowColor ?? listSchema.rowColor;, the same relay read at its new spelling.
    • The three 12418 viewDefaults equalities gain viewType.
    • The checklist goes to revision 14, with step, acceptance and negative clauses added and nothing loosened.
  • The @object-ui/types flag. The only file there is src/__tests__/object-view-unmirrored-keys-7779.test.ts. The package ships files: ['dist', 'README.md', 'CHANGELOG.md', 'LICENSE'], so nothing publishes and no changeset entry is owed.
  • Contract. Clause-② (widening) matches the diff: optional onRowColorChange, two optional viewDefaults members, five keys, and nothing removed. The seat's declaration L2 is owed. Part of #35955 is right, since PR 3 is still to come. The docs (views.mdx, the plugin-list README host-props section) match the code.

Owed

  • S1 rides this head (two lines) or goes to a follow-up, at the seat's call. If it rides, I'll read that commit as a delta.
  • The seat's declaration L2.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Contract review

Served-tier: TIER_DEFAULT
Head-sha: da8b797b9e58f13882bff881c749082577cbb3e9
Local-runs: none

Declaration face, owed by Clause-②: yes (widening). I read the card #35955 body and all of its comments (rulings 7058616478 and 7064241116, claim 7058427316, amendments 7060177257, 7064098684 and 7064104023). I also read the bodies of #36026 and #36133, the scope section of the seat brief, the PR body and file list, and the net diff 7dd1a2f6..da8b797b. The gate verdicts are the check-runs on the head: all completed runs are success or path-skipped. UI Published Artifacts is skipped because the workflow skips it on pull_request. The Check Changeset re-run that started at 15:52Z finished success at 15:54Z.

① Derived judgments

Published surface: @object-ui/plugin-list and @object-ui/i18n are published. @object-ui/app-shell is private: true.

  • @object-ui/plugin-list ListViewProps.onRowColorChange?: right. This is a new optional host callback, typed (rowColor: NonNullable of ListViewSchema rowColor, or null) => void.
    • It fires only from the two pick sites in the row colour panel: Clear, and onPick, where None gives null and a field gives { field, colors }.
    • It does not fire at mount, from the schema.rowColor sync, or from resetDisplayToViewDefault. The +4 cases in ListView.personalization-28950.test.tsx pin this.
    • A host that does not pass it sees the same behaviour as before.
  • @object-ui/plugin-list ListViewProps.viewDefaults gains optional viewType and rowColor: right. The members are optional and widen the input.
    • They are read through 'viewType' in viewDefaults and 'rowColor' in viewDefaults, so a host that passes viewDefaults without them still judges layout and color against schema.viewType and schema.rowColor, as on main.
    • The deviation, the part list and the Display reset all read the same two locals (viewDefaultViewType and viewDefaultRowColor), so the three cannot disagree.
  • @object-ui/i18n: right. Five keys are added under console.objectView.draft.* (saveToViewConfirmTitle, saveToViewConfirm, saveToViewConfirmButton, savedForEveryone, pendingDraft).
    • All 11 packs have them: ar, de, en, es, fr, ja, ko, pt-BR, ru, zh-Hans, and zh-Hant (generated).
    • No key is removed or renamed.
    • The de quote-pair count moves from 120 to 121 for the one new „{{name}}“ span. That is the same assertion at the new count, not a loosening.
  • plugin-list/README.md host-props section: right. It matches the jsdoc and the code, and it says these are React props, not schema keys. No schema key is added; ListViewSchema is unchanged.
  • Accept-set of the metadata write: right.
    • saveAndPublishRuntimeMetadata sends save(type, name, body, { mode: 'draft', ifNoneMatch: '*' }). The /meta door already accepts this (packages/rest/src/meta-save-request.ts: "If-None-Match: * saves only where no row of this lifecycle exists"). Studio uses the same pin for view drafts in ObjectListViewInspector.tsx:775.
    • Only 409 with METADATA_CONFLICT is read as a pending draft. The DESTRUCTIVE_CHANGE 409 is rethrown, with a control test.
    • Nothing new is asked of the server, so Metadata-protocol: none is correct.
  • App-shell gate canSaveToSharedView: right. It is isAdmin && !activeViewPackageRefusesSaves && isSavedViewId(...), the footer pick's test. It excludes personal views and environment lists, which matches the card ("only people who can edit the view") and claim 7064098684.
  • F5: right. The shared save lays the preference with rowHeight: undefined, so the view keeps its own row height. layListStateOverView never reads columnState.widths.
  • Retype on Save: right. A layout switch to kanban or gallery only fills the mirror when the type's block exists. ListView offers kanban and gallery only when schema.kanban.groupByField or schema.gallery.coverField resolves, so the block is always there when this runs.

② Semver level

  • Changeset .changeset/35955-save-into-shared-view.md: right. It ships @object-ui/app-shell, @object-ui/i18n and @object-ui/plugin-list as patch. Under ruling A the level follows Metadata-protocol: none, and a Clause-② widening alone ships patch. Listing app-shell is harmless (private), as in feat(console): a change on a list is a draft, with Discard and Save (#35955 PR 1) #36026.
  • Clause-②: yes (widening): right. The line is in both the PR body and the changeset.
    • Everything added is optional or additive (one optional prop, two optional viewDefaults members, five i18n keys).
    • Nothing is removed, renamed or narrowed.
    • The two lines differ only in "five new" against "new". The meaning is the same, and Check Changeset and PR-body guards are green on the head.

③ Boundary flags

  • Dev flag: race between this save's draft write and its publish. Answered, and escalated to the seat for a follow-up card.
    • The window is real. The view-settings save (persistRuntimeMetadata, { mode: 'draft' }) is unpinned. If it lands inside the window, its body replaces this draft and is published with it. That is against ruling 7058616478, though only for milliseconds. A publish refused in the same window would then reset that overwritten draft.
    • This PR cannot close it: MetadataClient.publish takes { message, packageId, member } and has no draft-version pin.
    • The fix is a separate change: either pin the view-settings panel's draft writes (If-Match), or give publish a draft-version precondition. It should not block this head.
  • P3, any pending draft refuses, including the saver's own: answered. This is the only reading that honours ruling 7058616478, because the server does not record who wrote a draft. It matches the seat's reading in 7064098684.
  • Ruling 7045525672, implicit changes still go to a draft: answered. handleViewConfigSave, handlePickSharedViewSummary and the view settings panel are untouched. Only the explicit, confirmed Save uses the new door.
  • G2: answered. The two reload edges are pinned in ObjectView.listUrlState-11860.test.tsx, with no behaviour change.
  • Dev flag: not driven in a browser this round. Escalated to the seat as a landing choice; it is not a finding on this face. Live E2E UI and Build & E2E UI are green, and records-forms.adhoc-filter-sort-builder steps[8] is the hand-run.
  • Should-fix (landing coordination, not a defect of this head): checklist revision collision with feat(console): keep list column widths, row height and tab order in this browser only #36133. Both PRs bump records-forms.adhoc-filter-sort-builder to revision 14 and add a rev-14 history entry. Both also edit content/docs/ui/views.mdx § "A user's list state never writes the view". Whichever lands second must renumber to 15 and merge both history entries when it merges main. The seat orders the landing.
  • open_questions: none in the PR body or the claim. P3-1 and P3-2 belong to PR3 and are answered by ruling 7064241116.
  • SQL push-down (Prime Directive 5): no finding. The change is client-side only. It writes through the existing /meta draft and publish doors and adds no record read, no id materialisation and no in-app join.
  • Nits (none affects correctness or the contract):
    • saveAndPublishRuntimeMetadata spells its 409 test inline. isDraftVersionConflict in metadata-admin/DraftConflictDialog.tsx already says the same thing, and the inline test could use it.
    • layListStateOverView fills the mirror only into an existing block, while buildInPlaceViewConfig fills it into {}. This is harmless given the availableViews gate, and the jsdoc says so.
    • The confirm names (activeView as any).label ?? '', so a view with no label reads “”.

Implemented-by: claude/project-thread-7uyrn8
Reviewed-by: session_01L6bhgUkbQqRUUFSiu2HGob (isolated L2 sub-agent of the seat)

VERDICT: PASS

…e the view's tab label

A view's label is an I18nLabel with no default: read raw, a locale map
printed [object Object] and a missing one an empty name. Both now take
listLabel (viewTabLabel), so the dialog says what the tab says. The draft
door's 409 is told apart by DraftConflictDialog's own predicate.

Claude-Session: https://claude.ai/code/session_01L6bhgWyeXh2Keywo6oK1Nn
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl and removed size/l labels Nov 21, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 0ada679765cb531447a0edbb2d3c82c6aa10ce4d
Local-runs: none

This is the delta record for the declaration face. It follows record 7065286873, which was on da8b797b. I read only three things: git diff da8b797b 0ada6797 (4 files, +68/−4), the updated PR body, and the check-runs on 0ada6797.

Check-runs on the new head: 55 success, 12 skipped, and 1 cancelled. The cancelled run is PR-body guards 136904995058. A later run of the same job, 136905131138, superseded it (it started 16:17:10Z) and finished success. Both Check Changeset runs are success. Governed Surface Queue Guard is success.

① Derived judgments

The declaration face is unchanged. Every file in the delta is in @object-ui/app-shell, which is private: true. The delta does not touch @object-ui/plugin-list, @object-ui/i18n, any README, any doc, the checklist or the changeset.

  • ObjectView.tsx, L1-b S1: right.
    • The confirm and the "Save as my view" copyName now take { name: listLabel }. Before, they took the raw label ?? ''.
    • listLabel comes from useObjectViewRecordNavigation, the name the view's tab draws (viewTabLabel). It is also used as stepScope.
    • The JSX use is after the hook, and the confirm use runs inside an async handler that is called after render, so there is no ordering hazard.
    • With this, a label given as a locale map no longer reads [object Object], and a view with no label no longer reads “”. That closes my nit on da8b797b.
    • The i18n keys and their {{name}} slot are the same as before.
  • runtime-metadata-persistence.ts, N1: right.
    • The inline 409 test is replaced by isDraftVersionConflict, imported from metadata-admin/DraftConflictDialog.js.
    • It is the same predicate (status === 409 && errorCodeIs(err, 'METADATA_CONFLICT')), so the behaviour is identical.
    • DraftConflictDialog does not import this module back, so the change adds no import cycle.
    • That closes my N1 on da8b797b.
  • Tests: right.
    • sharedViewSave adds 3 cases: no label, a locale-map label, and a control with a plain label.
    • personalViews adds 2 cases: no label and a locale-map label.
    • The PR body says the dev ablated them: with the raw label, the locale-map confirm case and both copy-name cases go red. It also says plainly that the shared no-label case pins current behaviour and cannot tell the two versions apart.

② Semver level

Unchanged. The changeset is the same file as on da8b797b: app-shell, i18n and plugin-list all at patch. The PR body still reads Clause-②: yes (widening) and Metadata-protocol: none. The delta publishes nothing new, so both lines still hold.

③ Boundary flags

  • Race between the draft write and the publish: the known-edge line in the PR body now points to card Save to this view: a view-settings draft saved between the pinned draft write and the publish gets published with it (publish takes no draft-version pin) #36137. The follow-up I escalated on da8b797b is therefore filed, and the flag is answered.
  • Browser evidence: now present, at 0ada6797.
    • It covers the confirm text naming "Team tasks", and the pinned PUT ?mode=draft with If-None-Match: * followed by POST …/publish.
    • It covers that a non-admin is offered only "Save as my view", and so is the admin on the read-only package's view.
    • It covers that a pending draft gets 409, no publish follows, and the pending draft and the live view are unchanged.
    • The row height (F5) and the layout and row colour round trip are not driven in the browser. The PR body says so, and unit tests pin both.
    • The flag is answered.
  • Still open: checklist revision collision with feat(console): keep list column widths, row height and tab order in this browser only #36133. The delta does not touch it. Both PRs still bump records-forms.adhoc-filter-sort-builder to revision 14. Whichever lands second must renumber to 15 and merge both history entries. This is a should-fix when landing, not a defect of this head.
  • SQL push-down (Prime Directive 5): no finding. The delta adds no data read, no id materialisation and no join.
  • Nit: the "Verification" section still opens with "CI and local runs at head da8b797b". The CI on 0ada6797 is now complete and green, so that sentence could say so. This affects only the prose.

Implemented-by: claude/project-thread-7uyrn8
Reviewed-by: session_01L6bhgUkbQqRUUFSiu2HGob (isolated L2 sub-agent of the seat)

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4

席位核对 — delta ACCEPT (L1-b)

Head-sha: 0ada6797 · range da8b797b..0ada6797 (one commit, 4 files, +68/−4) · read 2026-11-21T22:24Z · prior record 7065253709 @da8b797b · L2 delta PASS 7065819058 on this head

维护者速读

  • 「保存到这个视图」的确认框和「另存为我的视图」的默认名字,现在都用视图页签上显示的名字:视图没写名字时显示它的接口名,名字是多语言写法时显示当前语言的那个,不会再出现空的「“”」或「[object Object]」。
  • 上一轮的两条建议(S1 名字、N1 冲突判断共用一份)都已改好。没有必须改的问题。

Must-fix

None.

Should-fix

None. Prior S1 is closed.

Nits

None new.

Checked

  • Prior S1, the confirm name (ObjectView.tsx:909):
    • The confirm now passes listLabel instead of (activeView as any).label ?? ''.
    • listLabel comes from useObjectViewRecordNavigation (:1109), the name the tab draws. It is destructured later in the body than the handler, but it is read only when the handler runs, after render, so it is initialised by then.
    • The same fix lands on the 「Save as my view」 seed name (copyName, :1619). That one had the same raw-label bug.
  • Prior N1, the 409 predicate (runtime-metadata-persistence.ts:543):
    • The predicate is now isDraftVersionConflict(err) from DraftConflictDialog.
    • Its body is the same status === 409 && errorCodeIs(err, 'METADATA_CONFLICT'), so a 409 DESTRUCTIVE_CHANGE still rethrows. The existing runtime-metadata-persistence pin covers that.
    • errorCodeIs is no longer imported here.
    • .ts modules already import this predicate (studio-design/pairObjectActions.ts), so this adds no new import-graph shape.
  • Tests:
    • sharedViewSave-35955 adds three cases: no label gives ${OBJECT}.team_tasks, a locale map gives Team list, and a plain-label control gives Team tasks. A scoped useObjectTranslation mock echoes the name option, so each case reads back the name the confirm was handed.
    • personalViews-29635 adds two cases: no label gives Leads copy, and a locale map gives Hot list copy.
    • Each case restores the authored label in a finally.
  • CI at this head: 55 success, 12 skipped. One PR-body guards run shows cancelled at 16:17:07Z, but a rerun of the same check passed at 16:17:44Z.

Owed

  • Nothing from L1-b. Seat landing.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Regen-provenance: declaration-face record 7065819058 (delta PASS) · 0ada67976 → c57e06e11 · diff <(git diff MB_OLD 0ada67976 -- . ':!.changeset') <(git diff MAINPARENT c57e06e11 -- . ':!.changeset') → empty once index and @@ offset lines are set aside (MB_OLD 7dd1a2f61, MAINPARENT 9a3a5001b) · 2026-11-21T23:26Z

c57e06e11 merges main because K had reached 46 first-parent commits, and its --remerge-diff is empty. The PR's own change is byte-identical to the reviewed head (30 files, +970/−53), and the changeset diff is the same on both sides, so the record carries over. Main and this PR both touched 16 files in that span (ObjectView.tsx, objectViewListRenderer.tsx, ListView.tsx, the plugin-list README, the records-forms checklist and the 11 locale packs); all merged automatically. Since this merge, #36128 has landed on main and also edits objectViewListRenderer.tsx; GitHub still reads the PR mergeable and clean (7 first-parent commits behind). Check-runs on c57e06e11 are read at landing, after L1-b's merge-only re-check.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4

席位核对 — merge-only ACCEPT (L1-b)

Head-sha: c57e06e11da34334b0dd4e38876ed3312f5337ad · parents 0ada6797 (prior delta ACCEPT 7070161032) + 9a3a5001 (on main) · current main 1d060265 · read 2026-11-21T23:27Z

维护者速读

Must-fix / Should-fix / Nits

None.

Checked

Owed

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Seat landing · 2026-11-21T23:28Z · #35955 PR 2: a member editing a shared view gets 「保存到这个视图」 with a confirm that names the view by its tab label and says everyone sees the change; 「另存为我的视图」 defaults to that label; a pending draft is marked. The view type and row colour ride the draft too.

Reviews:

Gates on this head (c57e06e1):

  • check-governed-merges --pr 36123 reads NOT governed (1,023 changed lines).
  • K = 7 first-parent commits since the merge, read by hand; no translations/ or skills/ path.
  • 54 check-runs are success, 10 skipped. Mergeable is clean.

The seat readies this PR and arms auto-merge in the same step. The PR carries Part of #35955 (PR 3, #36133, follows). #36212 (#36194 + #36195) merges main after this one.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 21, 2026 23:29
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit c1b35c3 Nov 21, 2026
65 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-7uyrn8 branch November 21, 2026 23:52
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…objectstack-ai#36129)

repo:objectstack#1 · os-sales · session_01L6bhgTKEPqtmiK9SGpHsmW

Fixes objectstack-ai#35892

## What changes

On a record page, a related list opened as its own tab (and the same
list in the record drawer) now works like the child object's list page:

- **Head row.** The child list's tile and title on the left, **+ Add**
on the right. The **Open in list** (↗) button is gone.
- **Condition row.** The list page's own Sort (several levels) and
Filter: `@object-ui/plugin-list` exports it as `ListConditionsBlock`,
and because `plugin-detail` sits below `plugin-list`, the record page
hands it to the tab through a new slot,
`RelatedListConditionsSlotContext` (`@object-ui/plugin-detail`), the way
`RecordBodyTableEditorSlotContext` hands in the edit-state editor. It is
a host element, not a registered node type, so the registered-types
ratchet (every registered type is authorable) is untouched. No view
switch, view settings or search. Its labels fold to icons by the row's
own width (narrow tab, drawer, phone); no horizontal page scroll.
- **Grid.** The list page's grid host keys: column menu, select-first
cells with the list page's cell editing wherever the reader may edit the
child object (`listInlineEdit` affordance), row selection with the
floating bulk bar, and the footer row. Bulk delete is offered where the
host hands a row delete and the child object's `relatedRowDelete` row of
the affordance map allows it (the write census names the new site). It
asks once, counting the rows, then sends the selection (up to every
matching row) to the data source's `bulkDelete` in one call; only a data
source without one falls back to the row delete the list was handed, all
rows settled together, as the list page settles them. The tab then shows
how many rows were deleted and how many failed, in the list page's own
words (`objectActions.bulkDeleteSuccess` / `bulkDeletePartial`). Footer
calculations run over every matching row (`findParams`), not the loaded
ones. A status-grouped tab draws no footer row.
- **Loading.** Rows load as the reader scrolls (a growing window of 50,
sentinel 320px ahead) instead of a pager.
- **Counts.** The tab title keeps counting every child; a filter never
changes it. The footer counts the rows the filter keeps. A filter that
matches nothing says so and keeps the condition row.
- **What lasts.** Sort, filter and footer picks last while the reader
stays on the record: across its tabs and between its page and drawer.
They are keyed by the reader as well as the record (as the list page's
draft is keyed by its reader), so another account signed in on the same
tab starts from the default. A reload or another record clears them; a
drawer opened over another record counts as another record, so the tab
behind it starts from the default again, which is the ruling's "another
record". **Discard** appears once something changed and puts the tab
back; there is no Save. The list page's Discard and this one are one
component, `ConditionDiscardButton` (`app-shell`'s `ListDraftActions`
now draws it; same look and behaviour as objectstack-ai#36026).
- A header sort pick joins an existing multi-level sort by the list
page's rule, now shared as `withHeaderSortPick` (`@object-ui/core`).
- The record page (`app-shell` `RecordDetailView`, which the drawer
draws too) fills the slot with the block, lazy-loaded with the first tab
that draws it.

Supersedes the remembered related-tab sort of objectstack-ai#35601 (取代 objectstack-ai#35601 的记住排序),
on ruling
objectstack-ai#35892 (comment)
(session-only). Column widths and order for the related tab move to the
reader's browser, as the list page keeps them, on ruling
objectstack-ai#35892 (comment):
`RelatedList` no longer reads or writes them in `sys_user_preference`;
the `RelatedListPreference` type stays (no narrowing). Keeping widths
after sign-out is objectstack-ai#36110, not this PR.

**Upgrade note** (also in the changeset): the header sort and the column
widths and order an earlier version remembered for a related tab no
longer apply (子表页签里以前记住的排序不再生效). The tab opens in its declared order and
its widths start from the default once. Nothing stored is deleted. The
default sort and columns of every related list are unchanged.

## Why

objectstack-ai#35892 (epic objectstack-ai#35590): the related tab was a reduced list with a pager
and an exit to the list page; the reader had to leave the record to
sort, filter or total the children.

## Verification

Evidence: `/mnt/project-files/build-seat1/35892/` (index `README.md`,
shots in `shots/`), from `examples/app-crm` with this branch's console
build, Acme Corp → Opportunities (70 children). Light and dark at 1440,
720, 375, plus the record pane opened from the list (app-crm has no
drawer navigation).

Measured in the real console:
- Sort + filter chips, Discard after a change and gone after Discard;
kept after another tab and back; cleared by reload.
- Tab title 70 while the footer says 14 records under a filter.
- Scroll loads 50 → 70.
- Footer Sum 3,349,000.00 equals the API total over all 70 rows.
- 375: labels fold to icons, no horizontal page scroll.

**objectstack-ai#36023 leftover 2 (三项实测, in the tab at 1440):**
1. Enter while editing Deal Value (9000 → 9100): `PATCH crm_opportunity
{"amount":9100}`, toast "1 row saved", the selection stays on the same
cell.
2. Tab while editing (9100 → 9000): `PATCH {"amount":9000}`, the
selection moves one cell right.
3. Enter on Expected Close: the calendar opens directly under the cell
(cell bottom 345px, popover top 347px, same left edge) with Today /
Tomorrow / Next week / Clear; picking the 15th sends `PATCH
{"close_date":"2026-12-15"}`, the cell reads "Dec 15" and the calendar
closes.

The edited record was restored afterwards.

Tests:
- New: `RelatedList.tab-35892.test.tsx` (13, including a host that
supplies no condition row, the batch delete in one call, a partial
failure on both paths, and a second reader starting from the default),
`relatedTabConditions-35892.test.ts` (5),
`ListConditionsBlock-35892.test.tsx` (5).
- Rewritten: `RelatedList.enlargedListGrid-28865.test.tsx` (growing
window, scroll load, footer, column widths no longer stored
server-side), `RelatedList.enlargedToolbar-27524.test.tsx` (no ↗, header
sort not written, remembered sort not read).
- `vitest run packages/plugin-detail`: 398 files / 3664 tests passed.
plugin-list, i18n, app-shell views, core: see the checks.
- Builds of `@object-ui/plugin-list`, `plugin-detail`, `app-shell`,
console: pass. ESLint on the changed files: 0 errors. Eager
ui-components budget unchanged in kind (339.5 / 346.7 KB).

Overlap (`scripts/pm/overlap-check.mjs` at 5b76d7a): merges cleanly
with `origin/main` (main merged in at 5bad102, which also took objectstack-ai#36096:
the `@object-ui/core` import line of
`ui/packages/plugin-list/src/ListView.tsx` keeps both
`isObjectExportOffered` and `withHeaderSortPick`) and with objectstack-ai#36131,
objectstack-ai#36128, objectstack-ai#36123, objectstack-ai#36114. With objectstack-ai#36136 one line conflicts: the
`@object-ui/plugin-detail` import line of
`ui/packages/app-shell/src/views/RecordDetailView.tsx`, where this PR
adds `RelatedListConditionsSlotContext` (plus the
`./relatedListConditions.js` import) and objectstack-ai#36136 adds `stepDisplayText`
to the `./RecordApprovalsPanel.js` import. Whichever lands second keeps
both.

Clause-②: yes
Metadata-protocol: none

Clause-② is a widening: new exports `ListConditionsBlock` and
`ListConditionsHostProps` (`@object-ui/plugin-list`), the slot
`RelatedListConditionsSlotContext` and `RelatedListConditionsProps`
(`@object-ui/plugin-detail`), new exports `ConditionDiscardButton` and
its type `ConditionDiscardButtonProps` (`@object-ui/plugin-list`) and
`withHeaderSortPick` (`@object-ui/core`), new i18n keys in every locale
pack (`listConditions.chips.discard`,
`listConditions.chips.discardHint`, `detail.relatedNoMatches`,
`detail.deleteRowsTitle`, and the count family
`detail.deleteRowsConfirmation` with the plural slots each pack needs);
nothing removed or renamed.

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (not touched)
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01L6bhgTKEPqtmiK9SGpHsmW

<!-- signed: repo:objectstack#1 · os-sales ·
session_01L6bhgTKEPqtmiK9SGpHsmW -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
… drawer; lookup cells draw an edit button (objectstack-ai#36015) (objectstack-ai#36128)

<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuLB1HMq57UcoRZFjpa8YhHZ)_

repo:objectstack#1 · os-sales · session_01L6bhgWkLah49N6UoD4CS3S

Fixes objectstack-ai#36015

The card's 11:13Z revision (maintainer: 「同意,改卡」): a single click on a
lookup chip opens that record in the side drawer, and a lookup cell has
a pencil button. objectstack-ai#36033 landed the rest of the card with `Refs objectstack-ai#36015`;
this PR is the lookup-cell part and closes the card.

Clause-②: yes (widening)
Metadata-protocol: none

## 维护者速读

- 列表里单击关联记录的小标签(比如联系人列表里的「客户」),右侧抽屉打开那条记录,列表不动。关掉抽屉后,滚动位置和选中的格子都还在。
- 点格子里小标签旁边的空白,只是选中这一格。一格里有几个标签,点哪个开哪个;选中后按 Ctrl+Enter / Cmd+Enter
在抽屉里开第一个;按住 Ctrl / Cmd 点,仍是新标签页整页打开。
-
关联格在鼠标移上去或已选中时,右边出现铅笔按钮,点了进入编辑(出现关联记录选择器),和双击、回车一样。没有编辑权限、字段只读、记录被锁时不出现。这个位置原来放「打开」图标,关联格不再画它。
- 人员的小标签(负责人、创建人,指向 `sys_user`
的关联)不变:单击只选中,选中后有「打开」图标,没有铅笔。邮箱、电话、网址、名称列都不变。手机上照旧整页打开。
-
抽屉的网址带上了记录和它的对象(`?recordId=…&recordObject=…`):刷新后抽屉还在,按后退关掉抽屉,和名称列「在侧边打开」一样。
-
风险:改到五个包(字段格子、表格、网格、列表、控制台抽屉);给宿主加了两个可选接口,不传时行为和以前完全一样;没有新文案键(铅笔用已有的「编辑」`table.edit`)。

## What changes

On a grid with the select-first cell model whose host opts in (today the
console's list page), a **reference cell** is a column of `lookup`,
`master_detail` or `tree` type whose `reference` is not `sys_user`.

**`@object-ui/fields`: `index.tsx`**

- `ReferencedRecordLink`'s anchor carries `data-record-object` and
`data-record-id`, the record the chip names. Nothing else changes in its
markup or its click.

**`@object-ui/components`: `context/gridCellSelection.tsx`, `index.ts`**

- `GridCellSelection` gains an optional `referenceCells?:
GridReferenceCells | null`. `GridReferenceCells` (exported as a type) is
`isReferenceColumn(columnKey)` (asked per column on every render, so it
answers from the column alone) and `openRecord(objectName, recordId)`.

**`@object-ui/components`: `renderers/complex/data-table.tsx`,
`dataTableCellSelection.ts`**

- New `recordChipAt` / `firstRecordChip`: the record a chip
(`a[data-record-link][data-record-object][data-record-id]`) at or around
the target names.
- In a reference cell, the select-first `onClickCapture` that objectstack-ai#36033
added still cancels a plain click on the chip and selects the cell, and
then calls `referenceCells.openRecord` for the chip clicked. A click
beside the chips only selects. Ctrl, Cmd, Shift and Alt clicks, a
non-primary button and a touch tap pass through to the link as before.
- A double-click on a reference chip does not also edit the cell (its
first click opened the record).
- Ctrl/Cmd+Enter on a selected reference cell opens its first chip
through `referenceCells.openRecord`; every other cell keeps objectstack-ai#36033's
behaviour.
- New `CellEditButton` in every reference cell while no editor is open:
a pencil at the cell's right edge, labelled with the existing
`table.edit` key, shown on cell hover (`group-hover/cell`) and while the
cell is selected. Its click calls `attemptEdit`, the same gate
double-click and Enter pass through. It is drawn only when
`readOnlyReasonOf(row, col)` is `null`; that is asked when the pointer
enters the cell and when the cell becomes selected, never per render
(the `describeCell` contract). It takes no focus. A reference cell does
not draw objectstack-ai#36033's `CellOpenButton`.

**`@object-ui/plugin-grid`: `ObjectGrid.tsx`**

- New runtime prop `openReferencedRecord?: (objectName, recordId) =>
void`. With `cellSelection` and this prop, the grid's
`GridCellSelection` carries `referenceCells`: `isReferenceColumn` reads
the column's field (`opensReferenceInPlace`: lookup / master_detail /
tree, reference not `sys_user`), `openRecord` is the prop.

**`@object-ui/plugin-list`: `ListView.tsx`**

- New host prop `openReferencedRecord`, handed to the grid only
(`object-grid` views), as `recordLinkAdornment` is.

**`@object-ui/app-shell`: `urlParams.ts`,
`views/objectViewRecordNavigation.ts`, `ObjectView.tsx`,
`objectViewListRenderer.tsx`, `objectViewRecordOverlay.tsx`,
`recordDrawerStack.tsx`**

- New reserved URL param `RECORD_DRAWER_OBJECT_PARAM` (`recordObject`),
listed in `RESERVED_URL_PARAMS`: the object of the drawer root's record
when it is not the listed object.
- `handleOpenReferencedRecord(objectName, recordId)`: the listed
object's record opens as the name cell's 「在侧边打开」 icon opens it
(`?recordId=` only); another object's sets `?recordId=` and
`?recordObject=` (a push, so Back closes it). A chip clicked while the
drawer is open swaps its root.
- `drawerRoot` is that record when `?recordObject=` names another object
the console knows and the server reads one record of
(`servesRecordRead`); it has no sibling set, so the drawer draws no ↑ ↓
counter. Unknown or unread object: no drawer.
- Closing the drawer, the name cell's icon and the page origin a phone
redirect builds drop `?recordObject=` with `?recordId=`.
- The drawer's ⤢ at a root of another object opens that object's page
(`expandedRecordPath`); the listed object's root keeps its list-relative
route and origin.
- On a phone a `?recordObject=` link answers with that record's own
page, as `?recordId=` does for the listed object.
- `RecordStackDrawer` takes `listObjectName`; the list marks the root's
row as active only when the root is a record of the listed object.
- `ObjectView` passes `handleOpenReferencedRecord` only when its list
has the drawer (`navOverlay.mode === 'drawer'`, not a phone), the same
condition as `openInPanel`. A list whose rows open nothing (`none`, a
list-only object) keeps objectstack-ai#36033's behaviour: the chip only selects.

**Field types this reaches:** `lookup`, `master_detail`, `tree` drawn
through `LookupCellRenderer` / `ReferencedRecordLink`, when the
referenced object is routable from the list (the chip is an anchor only
then). A `user` field (`UserCellRenderer`, avatars) draws no link and is
untouched.

**Readings (claim A–G):**

- **A.** Only grids whose host passes `openReferencedRecord` (the
console's object list). Every other host keeps objectstack-ai#36033's behaviour.
- **B.** Ctrl/Cmd+Enter on a lookup cell opens its first chip in the
drawer.
- **C.** Person cells (lookups to `sys_user`) draw no pencil and keep
objectstack-ai#36033's open button.
- **D.** A chip clicked with the drawer open swaps the drawer's root, as
the name cell's icon does.
- **E.** A lookup to the listed object itself opens the listed object's
drawer, with `?recordId=` alone.
- **F.** A chip with no link (unroutable, unread, restricted or
name-only) only selects; an editable cell still draws the pencil.
- **G.** The drawer's record and object live in the URL, as `?recordId=`
does (ui `AGENTS.md` objectstack-ai#8).

Docs: `content/docs/frontend/plugins/plugin-grid.mdx` § On an object's
list page (new bullet after the click bullet; the click bullet objectstack-ai#36033
wrote now leaves out the lookup chip a host opens in place). objectstack-ai#36033's
changeset is untouched; this PR's own changeset says it (Notes, below).

## Notes

- **objectstack-ai#36033's pending release note is left as it is**
(`.changeset/36015-list-cell-click-only-selects.md`, restored from the
base in `87d42cbd`; head `b59bf991`..`9c225b51` had added a sentence to
it as a declared correction, which kept `Check Changeset` red). This
PR's own note, `.changeset/36015-lookup-chip-opens-in-drawer.md`, now
says what it changes about that note instead: "This replaces, for lookup
chips on that page, the earlier change in this release where a plain
click on a lookup chip only selected its cell." The docs bullet in
`plugin-grid.mdx` keeps the L1-b N1 rewording.

## Tests

Added, each a top-level `describe` in the component's existing harness
file:

- `components/src/__tests__/data-table-select-first-35684.test.tsx`, "a
reference chip opens its record in place": a plain click on the chip
calls `openRecord` with the chip's record, cancels the default and
selects the cell, and a double-click on it opens no editor; a click
beside the chip only selects, Ctrl and Cmd clicks follow the link;
Ctrl+Enter opens the first chip through the host; the edit button is
hidden until the pointer enters the cell, then shown on hover and while
selected, opens the editor, and the cell draws no open button; a cell
the host says opens no editor draws no edit button; a column the host
does not name (a person) keeps the link behaviour and the open button;
control: with no `referenceCells` the chip only selects and no edit
button is drawn.
- `plugin-grid/src/__tests__/ObjectGrid.cellSelection-35684.test.tsx`,
"a lookup chip opens its record in the host's place": through
`ObjectGrid` with a routing host, the account chip carries
`data-record-object` / `data-record-id` and a single click calls
`openReferencedRecord('crm_account', 'a7')` without following the link;
the lookup cell's edit button opens its editor and the `owner_id`
(lookup to `sys_user`) cell draws none; a person chip only selects;
control without the prop.
-
`app-shell/src/views/objectViewRecordNavigation.listRows-27524.test.tsx`,
"a lookup chip opens the record it names in the list's drawer": the URL
params for another object and for the listed object, `drawerRoot` for
another object (no siblings), for an unknown object (`null`) and for the
listed object (siblings kept), close drops both params, ⤢ opens the
other object's page.

- After L1-b's S1 (fixed in `9c225b51`: a double-click on a chip opened
its record twice, so the console's router pushed the same URL twice and
the first Back left the drawer open). The grid opens a chip on a click's
first press only (`e.detail > 1` opens nothing), and
`handleOpenReferencedRecord` returns when the URL already names that
record of that object, which also covers a fast repeat click. Each test
below fails without the fix:
- `data-table-select-first-35684.test.tsx`, "a double-click on the chip
opens its record once": click, click (`detail: 2`), dblclick;
`openRecord` is called once and no editor opens.
- `objectViewRecordNavigation.listRows-27524.test.tsx`, "the record the
drawer already shows is not pushed again": no `setSearchParams` for the
record already shown, of another object or of the listed one; the same
id under another object still opens.
- same file, "in a router: a chip opened twice (a double-click) leaves
one history entry, and one Back closes the drawer": a declarative
`MemoryRouter` (it pushes on every navigate, the same URL included);
after two opens the URL names the record, and one `navigate(-1)` returns
to `?view=all`.

No existing test was rewritten or dropped.

Local runs. First on main `8145424b` merged with objectstack-ai#36033's head
`cefd3e31`, a full `pnpm build`:

- `vitest run packages/components/`: 501 files passed.
`packages/fields/`: 316 passed. `packages/plugin-grid/`: 298 passed.
`packages/plugin-list/`: 181 passed.
- `packages/app-shell/` in full did not finish inside this container's
50-minute window; the parts this diff touches ran:
`src/views/ObjectView*`, `src/views/objectView*`,
`src/views/__tests__/recordDrawer*`, `src/views/__tests__/recordPane*`,
`src/urlParams*`, `src/__tests__/`: 128 files passed.
- After objectstack-ai#36033 merged, the change was replayed on main `dc10b3b4` as one
commit (conflicts only in `objectViewListRenderer.tsx`'s memo
dependencies and the two appended describes of
`ObjectGrid.cellSelection-35684.test.tsx`, both sides kept), then a full
`pnpm build` and `vitest run` of `components/src/__tests__/data-table*`,
`plugin-grid/src/__tests__/ObjectGrid.cellSelection*`,
`app-shell/src/views/objectViewRecordNavigation*`,
`app-shell/src/views/__tests__/recordDrawer*` and `fields/src/`: 348
files passed (2 skipped).
- `type-check` in `components`, `fields`, `plugin-grid`, `plugin-list`,
`app-shell`: exit 0 (on both bases).
- `eslint` on the changed files: 0 errors.
- `overlap-check` on the pushed head `b59bf991`: clean against
`origin/main` (`dc10b3b4`, objectstack-ai#36033 merged) and the four open PRs sharing
a file (objectstack-ai#36114, objectstack-ai#36105, objectstack-ai#36096, objectstack-ai#36024).
- `87d42cbd`: `main` `6c7c6db2` merged in (clean).
`check-empty-changeset` and `check-changeset-no-major`: pass.
`overlap-check`: clean against `main` and objectstack-ai#36123; objectstack-ai#36133 (draft)
conflicts only on the one-line `useMemo` dependency list in
`objectViewListRenderer.tsx`, which each PR extends by one name; the
second to land merges `main`.

## Verification (browser)

CRM and Todo examples (`--fresh`), Console via Vite on this tree,
Chromium, 1280 light and dark, 375 light and dark. Screenshots and the
journey log: project folder `build-seat1/36015/PR2/` (`after-*`,
`after-journey.log`). The before state is objectstack-ai#36033's after state
(`build-seat1/36015/after-*`): a chip only selected its cell.

| Step | After |
|:--|:--|
| Contacts, hover the Account cell | pencil at the cell's right edge |
| Click the Acme Corp chip | drawer opens Acme Corp
(`?recordId=…&recordObject=crm_account`), the list stays, the cell is
selected |
| Close the drawer | params gone, the Account cell still selected |
| Click beside the chip | cell selected, nothing opens |
| Click the pencil | the lookup editor opens in the cell |
| Ctrl+Enter on the selected Account cell | drawer opens Acme Corp |
| Click the email text | cell selected, no navigation, open button in
the cell |
| Click the name | the contact's record page |
| Todo tasks, hover the Assigned To cell (lookup to `sys_user`) | no
pencil |
| Click the Dev Admin chip | cell selected, page stays, open button on
hover |
| 375 | phone cards (no grid), unchanged |

## Acceptance notes

1. Click a lookup chip: the drawer opens that record, the list stays,
closing it keeps scroll and selection: yes (browser).
2. Click beside the chip: the cell is selected, nothing opens: yes.
3. Hover a lookup cell: a pencil; it opens the cell's editor (the lookup
picker); none on a read-only field: yes (browser for the pencil and the
editor; read-only unit-pinned).
4. Person chips (owner): single click only selects: yes (browser, Todo's
Assigned To, a lookup to `sys_user`).
5. Ctrl/Cmd-click a chip opens the record in a new tab: yes (the click
passes through to the anchor; unit-pinned).
6. Email, phone, URL, Ctrl/Cmd+Enter on them and the name column:
unchanged from objectstack-ai#36033: yes.
7. This body lists the field types reached and the tests: above (none
rewritten).

---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgWkLah49N6UoD4CS3S)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01L6bhgWkLah49N6UoD4CS3S

<!-- signed: repo:objectstack#1 · os-sales ·
session_01L6bhgWkLah49N6UoD4CS3S -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…ckage view's refused save says why in the reader's words (objectstack-ai#36212)

<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4Uu3R6vTvrF8uP9Z2MFVbqmJV)_

repo:objectstack#1 · os-sales · session_01L6bhgX7ez5A7JDsmzTy9Ks

Fixes objectstack-ai#36194
Fixes objectstack-ai#36195

Clause-②: yes (widening) — two new keys in every `@object-ui/i18n`
locale pack (`console.objectView.personalizedParts.summaries`,
`console.objectView.saveRefused.packaged`); zh-Hant regenerated; nothing
removed or renamed. `ListView` / `ObjectGrid` props unchanged (doc
comments only).
Metadata-protocol: none

## 维护者速读

-
列表底部选、换、去掉一列的统计:马上显示结果,不再写进视图或个人视图;和筛选排序一样算草稿,出现「放弃」「保存」,「保存」菜单的未保存列表多一项「统计」。「放弃」还原;「保存到这个视图」(自己的视图)和「另存为我的视图」把统计一起存进去。
- 包里带的视图(比如
HotCRM「全部客户」)、没有权限改的共享视图:照样能选统计,进草稿,「保存」里只有「另存为我的视图」。任何时候都不会再出现卡上那段英文报错。
- 服务端拒绝保存包里带的视图时,提示改成一句中文(11
种语言都有):「这个视图来自应用包,不能直接修改,可以另存为我的视图。」其它拒绝照旧显示服务端那句话(那些是写给人看的,已有测试钉着)。
- 卡上那段报错的来历:包可写的判断要等包列表读回来,列表为了不和页面抢网络,要等页面请求安静下来(最多 8
秒)才读;这之前判断按设计放行,底部入口就直接写了视图。统计改成草稿后,这段时间里底部不再写任何东西。

## What changes

**A footer calculation is a draft part** (`objectViewListRenderer.tsx`,
`listDraftStore.ts`, `columnSummaryWrite.ts`, `ObjectView.tsx`)

- `ListDraft` gains `summaries` (column → calculation, `null` = None
over a column the view sums); an emptied part is no part. It lives
exactly as the other parts (objectstack-ai#35955 item 4: kept on a record round trip,
dropped on another view or object and on a reload).
- The renderer lays the draft's calculations over the columns it hands
`ListView` (`columnsWithSummaries`), so the grid draws them at once, and
`onColumnSummaryPick` only patches the draft and answers `true`. A pick
equal to the column's own calculation (`columnSummaryOf`) drops the
column from the draft.
- The menu is offered (`columnSummaryPickFields`) on the columns the
list draws, the reader's added fields included: the columns a saved body
carries. Where the list holds no draft (an environment list, no open
view) nothing is offered (`listViewActions.draftsSummaries`).
- Removed: `handlePickPersonalViewSummary` (wrote the reader's own view
at once) and `handlePickSharedViewSummary` (wrote the shared view's
draft, `PUT /meta/view/<name>?mode=draft`). No footer pick writes
anything now.
- The Save menu's unsaved list names it: host-side part `summaries`
(`ListDraftActions`' `ListPersonalizationPart` gains it; `ListView`'s
own vocabulary is untouched), pushed in `objectViewListUrlState.ts` like
`columns`.
- Saves carry it: `PersonalViewListState.summaries`, laid by
`buildPersonalViewConfig` on the columns it keeps (after added fields,
order and hidden columns). Callers: Save to this view (own view), Save
as my view, the switcher's create card with "include current".

**A view the reader cannot change in place** — the same "can save in
place" reading as the filter and the Save menu, no second rule: the Save
menu offers Save to this view on the reader's own view only (on `main`),
so a package's view and a non-admin's shared view get Save as my view
alone. With objectstack-ai#36123 merged in, its shared-view Save to this view keeps
its own test (`canSaveToSharedView`, now waiting for the package list:
small call 5) and stores the calculations too.

**A refused save of a package's view** (`viewSaveRefusal.ts`,
`objectViewViewCrud.tsx`, `ObjectView.tsx`)

- `viewSaveRefusalText(err, t)`: `code === 'NOT_OVERRIDABLE'` (the
door's close on an item a package ships,
`protocol-packaged-base-refusal.ts`) →
`console.objectView.saveRefused.packaged`; anything else →
`formatMetadataError` as before. Used at every view-write toast on the
object page except delete (view settings save, create, rename, pin, set
default, personal create / save / save as).

**Docs**: `content/docs/ui/views.mdx` § "A user's list state never
writes the view". Changeset `36194-footer-calculation-draft.md`.

## Small calls made in this thread (Sales 22:19:27Z rule; seat agreed
22:51Z)

1. The menu is offered on every column the list draws, not only the ones
the view declares: the draft can carry a calculation on any column the
saved body keeps (objectstack-ai#35702's declared-only limit existed because the pick
wrote the view).
2. A reader who is no admin gets the menu on a shared view too (their
pick is their draft; Save as my view keeps it). The card's "no entry for
a reader without permission" acceptance line predates the fold; the
brief settles it as "into the draft, Save as my view alone".
3. Only `NOT_OVERRIDABLE` is reworded. Other refusals (403 permission,
422 field issues, pin / default / rename) keep the door's message, which
objectui#11583 / objectstack-ai#12417 pin as worded for the person saving.
4. The switcher's create card carries the calculations only with
"include current", as it does the filter and sort.
5. **Done after objectstack-ai#36123 merged:** its 「保存到这个视图」 on a shared view stays
hidden while the package list is unread, and for a package listed
read-only (`usePackageSaveRead`: the same session-held read as
`usePackageRefusesSaves`, with the in-flight state told apart; a failed
read or an unlisted package still offers it, as today). Reason measured
below: the unread window is where the card's error came from.

## Root cause of the card's error (measured, client-side)

HotCRM 6.5.0 on `main` (`fa304140`), console from this tree's `ui/`
against it: the server's package list reports `app.objectstack.hotcrm`
`writable: false`, and `crm_account.all_accounts`'s row carries
`_packageId: app.objectstack.hotcrm`. The reading is right once read;
but `fetchSessionPackages` waits for the page's own requests to go quiet
(up to 8 s) before it reads, and until then `usePackageRefusesSaves`
fails open by design. Measured at 1440: the list drew with 「+ 添加统计」 at
7.2 s, the package list answered at 8.0 s, and the entry went. A pick
inside that window sent the `PUT ?mode=draft` the card shows. With this
PR the pick writes nothing in any window.

## Tests

- `ObjectView.footerCalculationDraft-36194.test.tsx` (7, renamed from
`ObjectView.readOnlyPackageView-35933.test.tsx`; real `ObjectView`,
`ListView` stand-in that draws the condition row's end, every non-GET
`fetch` recorded): a pick is drawn, writes nothing, Save names it,
picking None again drops it; Discard takes it off; the reader's own view
stores it only on Save to this view; a view that declares no columns
gets the menu on the drawn columns and Save as my view stores it; a
package's view: drawn, no write, Save offers Save as my view alone,
which stores it; the package list unread: still a draft; a non-admin on
a shared view: a draft, Save as my view alone.
- `__tests__/footerCalculationDraft-36194.test.ts` (9):
`columnsWithSummaries` / `columnSummaryOf`; the draft store's empty
part; `buildPersonalViewConfig` stores calculations on kept columns
(added kept, hidden dropped) in a body `ListViewSchema` accepts;
`viewSaveRefusalText` (package refusal reworded, a 403 keeps the door's
words, issues keep the list).
- `AppContent.draftSaveKeepsList-35932.test.tsx` (8, adapted): the pick
no longer writes, so the refresh pulse a draft save announces is
announced by the test (`emitMetadataRefresh`); no skeleton, no remount,
picks drawn through it; a reader's pick is offered (their draft).

## Verification

Local at head (`claude/project-thread-8r2qm4`):

- `pnpm --dir ui exec vitest run packages/app-shell/src/views/ObjectView
packages/app-shell/src/views/__tests__
packages/app-shell/src/views/ListDraftActions
packages/app-shell/src/views/personalViews
packages/app-shell/src/console/__tests__/AppContent packages/i18n
packages/plugin-list/src packages/plugin-grid/src/__tests__` → 797
files, 8404 passed / 13 skipped; the 7 failures of that run were the
first version of the refusal helper (it also reworded every 403) and a
stale zh-Hant; both fixed, and the three files re-run green
(`ObjectView.viewWriteRefusal-11583`,
`ObjectView.createViewRefusal-11578`, `packages/i18n` 106 files).
- `@object-ui/app-shell` `type-check` (both `tsc --noEmit` and
`tsconfig.test.json`): exit 0.
- `eslint` on every changed file: 0 errors.
- The whole app-shell package is left to CI's shards.

## Since the first L1-b read (`ef54913f` → `efa7c4f0`)

- Merged `main` twice (objectstack-ai#36128, then objectstack-ai#36123). Resolutions: the renderer's
memo deps take objectstack-ai#36128's `openReferencedRecord` and keep this PR's drop
of `summaryPickKey`; `ObjectView`, `personalViews`, `listDraftStore` and
`views.mdx` keep both sides (calculations beside objectstack-ai#36123's layout and row
colour).
- The shared-view Save to this view passes `summaries` to
`layListStateOverView`, which lays them after the added, ordered and
hidden columns; it still writes neither the reader's row height nor
column widths.
- Small call 5: `usePackageSaveRead` in `useStudioDesignGate.ts`
(`unread` / `refuses` / `takes`); `canSaveToSharedView` asks for
`takes`.
- L1-b N1: `viewSaveRefusalText` reads the code with `errorCodeIs`.
- Tests: three new cases in `ObjectView.sharedViewSave-35955.test.tsx`
(a pick on a shared view writes nothing and Save to this view stores it
with the view's own row height; unread package list hides the save, the
answer offers it; a failed read offers it). Local: 203 files / 1769
tests green (ObjectView*, the gate hook, `views/__tests__`, the console
draft test); app-shell type-check 0; eslint 0 errors.

## Evidence (HotCRM 6.5.0, 1440×900,
`/mnt/project-files/build-seat1/36194-36195/`)

- Before: `before-1440-{light,dark}-hotcrm-pick-refused.png` — 「全部客户」,
the package list held 15 s to show the window, a 「去重」 pick: `PUT
…/crm_account.all_accounts?mode=draft`, the English refusal toast.
- After (same hold): `after-1440-{light,dark}-hotcrm-pick-in-draft.png`
(「去重 9」 drawn, 「放弃」「保存」, no write),
`after-1440-{light,dark}-hotcrm-save-menu.png` (「未保存的改动: 统计」, 「另存为我的视图」
alone), `after-1440-light-hotcrm-discarded.png`,
`after-1440-light-saved-as-my-view.png` (「全部客户 副本」 keeps 「去重 9」),
`after-1440-light-my-view-save-menu.png` (own view: 「保存到这个视图」 offered),
`after-1440-light-my-view-after-reload.png` (saved 「非空 9」 survives a
reload; the only write of the run: `PATCH
/api/v1/data/sys_personal_view/<id>`).

## Overlap

`overlap-check.mjs` @ `efa7c4f0`: merges cleanly with `main`
(`af2361ee`, objectstack-ai#36123 and objectstack-ai#36128 in); textual conflict with objectstack-ai#36133 only
(`listDraftStore.ts`, `objectViewListRenderer.tsx`).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01L6bhgX7ez5A7JDsmzTy9Ks

<!-- signed: repo:objectstack#1 · os-sales ·
session_01L6bhgX7ez5A7JDsmzTy9Ks -->

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…side the record's tabs; the right summary rail is retired (objectstack-ai#35890) (objectstack-ai#36136)

<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
Fixes objectstack-ai#35890

_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuSuWjKV41568rAPVdLLNa2U)_

repo:objectstack#1 · os-sales · session_01L6bhgUZTwDqtEFzNFCVTri

Part of epic objectstack-ai#35590 (record page redo). One PR for the card.

Clause-②: yes (widening): `RecordPageColumns` (exported from
`@object-ui/plugin-detail`) gains the optional props `fullPage`,
`detailsWidth`, `onDetailsWidthChange` and `onShownTabChange`, and
`onEnlargeRelated` an optional second argument `{ replace?: boolean }`.
`rightColumn` and `rail` stay on the props as `@deprecated` no-ops, so
no caller breaks. New exports: `RECORD_PAGE_DETAILS_WIDTH`,
`RECORD_PAGE_PIN_MIN_WIDTH`, `recordPagePinsDetails`;
`recordPageTierHasRightColumn` stays exported and is now `@deprecated`.
`@object-ui/i18n`: two new keys in every pack
(`detail.approvalPendingStep`, `detail.detailsColumnResize`), and
`detail.recordTabOverview` changes its text (概览 / Overview → 详情 /
Details); every key the retired rail read stays in every pack, unread.
The `RecordSummaryRail` module was internal (never exported from the
package entry) and is deleted.
Metadata-protocol: none

## 维护者速读

- 记录整页够宽时(放得下左 320 + 间隔 24 + 右
400),字段固定在左栏,其他页签(子表、附件、审批、动态)在右边,默认打开第一个;左栏默认 400,空间紧时自动让到
320,可以拖动,宽度按对象记在浏览器里。
- 右侧摘要栏(审批 / 附件 / 最近动态 / 其他相关卡片)在所有宽度都去掉了,⊟ 按钮和 ⌘⇧, 快捷键一起去掉;第一个页签改名「详情」。
- 「审批中」标签在有当前步骤时显示「审批中 · 当前步骤」(审批人自己仍是「待你审批」)。
-
抽屉、手机、窄窗口不分栏,照旧是一栏页签;它们也会看到两处变化:右侧摘要栏没了,第一个页签叫「详情」。手写的记录页不受影响;字段里放了子表的页面(objectstack-ai#35889)不分栏。
- 隐藏了的子表仍能从「更多」或带 `?related=` 的链接打开。
- 实测:1440 宽、左侧导航展开、评论栏打开时,内容只有 708,不够 744,页面退回一栏页签(打开的页签保持不变)。1280 和
1366 评论栏打开仍分栏。Sales 已接受这个代价,收起导航即恢复三栏(objectstack-ai#35890 note 7069882604)。等 objectstack-ai#36112
改成 1280 起默认展开导航后,1280 和 1366 展开导航再打开评论栏也会退回页签,收起导航即恢复三栏。

## What changes

**When the page pins.** Ruling on the card ([comment
7064066204](objectstack-ai#35890 (comment)),
option 0 of the reviewed decision card): a full page pins its details
when its content fits **left 320 + gap 24 + right 400** (744 content
px). The left column is 400 px (or the reader's dragged width) and
narrows by itself to 320 px to leave the tabs 400 px; narrower than
that, the page falls back to the tab row. This replaces the card's line
「沿用出现右栏的宽度」. Pinning is measured on the page content's own width
(`clientWidth`, ResizeObserver), never on the window, so the comment
panel of objectstack-ai#36075, which gives way at window widths of 1280 and up,
narrows the page and the page re-decides by itself.

What that means on common windows, **measured** in the console against
the CRM example (`measure-l1c.json`; the page frame is the window minus
the nav minus the host's 48 px margin, and the content is the frame
minus its 48 px padding; at 1280 and 1366 the nav is collapsed, at 1440
it is open at 256 px; comment panel 380 px, `beside`):

| Window | Frame, panel closed | Panel closed | Frame, panel open |
Panel open |
|---|---|---|---|---|
| 1280 | 1232 | pinned, details 400 / tabs 760 | 852 | pinned, details
380 / tabs 400 |
| 1366 | 1318 | pinned, details 400 / tabs 846 | 938 | pinned, details
400 / tabs 466 |
| 1440 | 1136 | pinned, details 400 / tabs 664 | 756 (content 708) |
**not pinned**: the tab row, with 「详情」 first and the shown list kept |

The earlier 1440 row (record area 1184, tabs 412) assumed no host
margin; the measured frame is 48 px narrower, so with the nav open and
the panel open the content is 708, under 744, and the page uses the tab
row. Windows of about 1416 to 1475 with the nav open and the panel open
land here. This follows the ruled threshold as written, and Sales
accepted it: with the sidebar expanded, opening the comment panel can
return the fields to the tab row, and collapsing the sidebar restores
three columns ([note
7069882604](objectstack-ai#35890 (comment)),
with objectstack-ai#36112 F1). These windows hold for today's sidebar threshold
(expanded from 1416). Once objectstack-ai#36112 PR B makes the sidebar start expanded
from 1280 (ruling 7069868269), the band with the sidebar expanded
becomes about 1280 to 1475, so 1280 and 1366 also go to the tab row when
the panel opens; collapsing the sidebar still restores three columns.
The 1416 comment in `recordPageColumns.ts` is updated by objectstack-ai#36112 PR B.

**Layout, pinned.** `[details 320–400+ px] [24 px separator] [tabs
minmax(0,1fr)]`. The details render at one field column
(`DetailsColumnCapContext` = 1). The tab row moves into the right column
and drops 「详情」; the open tab is the address's `?related=` when it names
one, otherwise the first tab (implied, never written). Each column
scrolls on its own when the page has a scroll parent with room
(`usePinnedHeight`). Esc does not close a tab while pinned (there is no
"back to details" to go to).

**The separator.** `role="separator"`, `aria-orientation="vertical"`,
`aria-valuenow/min/max`; pointer drag previews and commits on release;
←/→ move 16 px, Home/End go to the ends. The width is the
`record.columns.details-width` workspace preference (per object, `{
width, v: 1 }`), which replaces the retired `record.columns.related` (⊟)
preference.

**Narrowing out.** When a pinned page narrows below the threshold on the
same record and the address names no tab, the implied tab is written to
the address with `replace`, so the reader stays on what they were
looking at and Back history does not grow.

**Not pinned.** A page with no other tab draws the details alone, with
no tab row. A page whose details hold a related table among the fields
(objectstack-ai#35889) does not pin. Drawer, split pane and phone (`fullPage` false or
too narrow) keep the one-column tab row and never pin. What reaches
them: the rail is gone there too, and the first tab reads 「详情」.
Measured: drawer at 1440 (details 622 across, 「详情」 shown) and phone at
375 (details 327 across, 「详情」 shown), both with no rail.

**Rail retired.** `RecordSummaryRail` is deleted with the ⊟ panel
toggle, its `⌘⇧,` shortcut and the `record.columns.related` preference;
the attachment-count hook and approval-pending test move to
`recordTabBadges.ts`. The `PanelToggles` plumbing stays (empty) for
objectstack-ai#36075. The hidden-list foot line under the rail goes too; hidden lists
and the reset are in the tab row's 「更多」 menu. The "default order
changed" hint stays, under the tab row. A hidden list still opens, from
its 「更多」 item or from `?related=` naming it (`requested` accepts ids in
`resolved.hidden`; test red without the fix).

**Other card items.** The overview tab is labelled 「详情」 in every locale
(`detail.recordTabOverview` takes the `detail.details` word). The
in-approval tag reads `In approval · {{step}}`
(`detail.approvalPendingStep`, 11 locales) for non-approvers when the
request names a step, using the approvals panel's own `stepDisplayText`.

**Host.** `RecordDetailView` passes `fullPage={!embedded}`, the width
preference and `onShownTabChange`. When the shown tab is the 动态 timeline
(implied or chosen), the full activity window is read, as it was when
the tab was chosen. Feed reads at open are unchanged (the page payload
still asks discussion + activity top 5 for the tab's count), to stay out
of objectstack-ai#36075's way. Merged with `main` after objectstack-ai#36114 and objectstack-ai#36178 (the comment
panel, PRs 1 and 2), keeping both sides: the rail's 最近动态 card that
objectstack-ai#36114's `RecordCommentsInPanelContext` note spoke of no longer exists.
`overlap-check.mjs` at push (`241f4b21`): clean against `main`, objectstack-ai#36187,
objectstack-ai#36123 and objectstack-ai#35923; it conflicts with objectstack-ai#36183 (objectstack-ai#36047 slice 2, the
text-size sweep) in `RecordSummaryRail.tsx` (deleted here), the e2e spec
(renamed here) and two plugin-detail tests. Whichever lands second
resolves it; objectstack-ai#36183 re-runs its mapping script on `main`.

**Docs.** `content/docs/ui/pages.mdx` (Record pages › The synthesized
default) now describes the tab row, the pinned layout and when related
rows are read, instead of the right column.

## Acceptance notes (card checklist)

- Wide full page: fields left, other tabs right, first of them open. ✔
(`RecordPageColumns.test.tsx` pinned block; `recordPageTiers-26678` at
1440 / 1100 / 800 px)
- No other tab: fields fill the page, no tab row. ✔
- Right summary cards removed at all widths. ✔ (every tier asserts no
`[data-record-summary-card]`)
- Left column 400, draggable, remembered per person per object. ✔
(keyboard + pointer tests; host test writes and re-reads the
preference). Kept in the browser's workspace preference store, like the
other record-page preferences.
- First tab 「详情」. ✔
- 「审批中 · 当前步骤」. ✔ (`approvalDeclaredActions` test, machine name and
label)
- Body-table page does not pin. ✔
- Narrowing keeps the tab (URL replace). ✔ (measured: 1440 with the
panel opened wrote `?related=crm_activity.account`)
- A hidden list opens from 「更多」 and from `?related=`. ✔
(`readerArrangement-35595`, red without the fix)
- Drawer / phone never pin and keep the one-column tab row; what reaches
them is the rail's removal and the 「详情」 name. Hand-written pages
untouched. ✔
- Deliberate drops: the ⊟ control and `⌘⇧,`; the hidden-list foot line
(its job is in 「更多」); the rail's three-row previews of each related list
(a list now reads its rows when its tab opens).

## Why

Sales asked for the record page they remembered: on a wide full page,
the main form on the left and the child tables in tabs on the right
(objectstack-ai#35890, under epic objectstack-ai#35590). The width rule was put to Sales after a
decision review because the card's 760 px reading and the 1120 px
reading both broke the comment panel layout on common laptops; option 0
keeps three columns (fields | tabs | comments) on every common laptop,
which is the figure Sales approved on objectstack-ai#36075.

## Verification

- Local, on the merged head `079c7723` (shared box, under
`os-verify-lock`): plugin-detail, i18n, app-shell Record*,
recordCommentsPanel, relatedListConditions and workspacePreference: 647
files / 6,742 tests pass; app-shell type-check (src and tests) clean. On
`241f4b21`: plugin-detail + i18n 509 files / 5,677 tests pass, both
type-checks clean, `record-tabs-35595.spec.ts` 6/6 locally. Earlier, on
`fbe6e33d`: `vitest run packages/plugin-detail packages/i18n`: 500 files
/ 5,598 tests pass (31 skipped, existing). `vitest run
packages/app-shell/src/views/Record
packages/app-shell/src/utils/workspacePreference`: 133 files / 1,005
tests pass. The whole app-shell suite did not fit the 28-minute local
window; CI is the full reading.
- `type-check` (src and tests) clean for plugin-detail, i18n and
app-shell; ESLint `--quiet` on every changed file: 0 errors;
`check:test-source-alias` OK.
- Rewritten / converted tests: `RecordPageColumns.test.tsx` (new pinned
describe: threshold 744, auto-narrow 824→400 / 800→376 / 744→320 /
743→not pinned, drag, keyboard, drawer never pins, body table, narrowing
writes the implied tab with replace, `onShownTabChange`),
`RecordDetailView.recordPageTiers-26678` (host at 1440 / 1100 / 800 /
720 / 390, embedded, `?related=timeline` pinned and not, width
preference round-trip), `workspacePreference.test.ts` (details-width
codec). Deleted with the code they pinned:
`RecordPageColumns.switches-27052`,
`RecordDetailView.panelToggles-27052`.
- Tests that read the rail now open the 动态 tab or assert its absence:
`recordOpenWaves-13010`, `recordOpenOneRequest-28470`,
`timelineCount-28737`, `harness › relatedCountsFirst-27056`,
`accessibleNames-12625`, `topBar-27524`, `phoneFace-27058`,
`feedLoadFailure-29188`.
- Screenshots (1280 / 1440 / 1920, light and dark, with and without
other tabs) are attached in the project thread, plus the comment panel
open at 1280 / 1366 / 1440, the drawer at 1440 and the phone at 375; the
measured numbers are in the evidence comment.
- e2e: `ui/e2e/record-tabs-35595.spec.ts` (renamed from
`record-tabs-rail-35595.spec.ts`).

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(No `packages/spec` change.)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes (changed files,
`--quiet`).
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset
(`.changeset/35890-record-details-pinned.md`), and both declaration
lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: not touched.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English (the 维护者速读 block is the
maintainer's summary, in the maintainer's language).
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgUZTwDqtEFzNFCVTri)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01L6bhgUZTwDqtEFzNFCVTri
<!-- signed: repo:objectstack#1 · os-sales ·
session_01L6bhgUZTwDqtEFzNFCVTri -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…his browser only (objectstack-ai#36133)

<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuVWbxPZ72M6BDYup19WL5XS)_

Part of objectstack-ai#35955

## What changes

On a Console object list, the column widths, the row height and the
order of the view tabs are now kept in the reader's browser only. The
Console no longer reads or writes the per-user list preference row
`sys_user_preference` `ui.list.<object>`.

- New `ui/packages/app-shell/src/views/listLayoutStore.ts`: one
localStorage entry per signed-in reader and object, `list-layout:<user
id>:<object>`, holding `viewOrder` and per view `widths` / `rowHeight`
and nothing else. With nobody signed in there is no key: nothing is read
or written. Built on `useSyncExternalStore`, so every reader of the same
object sees a write at once.
- The keys an earlier Console wrote list state under (`list-state:*`,
the cache of the retired server row; `list-filters:*`; the bare
`viewOrder:*`) are removed once per page load and never read. What they
held is not carried over.
- `ListPreferencesProvider` is deleted; `ConsoleShell` no longer creates
or attaches the `ui.list.` family, and `UserStateAdapters` drops its
list-state slot. The boot read of the reader's preferences now asks for
the four keys and the `ui.record.` prefix only.
- The list no longer waits for a preference read before it mounts (the
`object-view-list-preferences-pending` placeholder is gone).
- `listFilterStorage.ts` is deleted: `writeListFilterState` had no
caller (F4 of the card).
- The relay-shape types the list draft uses (`ListViewPreference` and
friends) move into `listDraftStore.ts`.
- `RecordPreferencesProvider` (`ui.record.*`) is untouched.
- Docs: `content/docs/ui/views.mdx` says the layout stays in this
browser. The platform checklist items
`records-forms.adhoc-filter-sort-builder` (rev 14) and
`records-forms.grid-personalization` (rev 10) are re-pointed; the latter
now reads that widths and row height do not follow the reader to a fresh
browser (Sales ruling D1 on objectstack-ai#35955).
- Comment and README fixes in `@object-ui/data-objectstack`,
`@object-ui/react` and `@objectstack/platform-objects` that named the
retired key.

Not in this pull request:

- `os migrate list-preferences`, the operator command that deletes the
stored `ui.list.*` rows (dry run by default, `--apply` only with an
owner-only `--export`). This PR was over 3,000 changed lines with it, so
it follows in its own pull request once this one merges. Until then the
rows stay, unread.
- Keeping `list-layout:` entries across a sign-out by the same person:
follow-up objectstack-ai#36110. Sign-out still clears them, as today.
- Related-tab column widths (`ui.record.<object>.relatedLists`): objectstack-ai#35892.
- The spec `columnState` retirement.

## Why

Card objectstack-ai#35955 (epic objectstack-ai#35547): a list change is a draft, and what never
becomes a draft (widths, row height, tab order) is arranging only, so it
stays in the reader's browser and never reaches another user, device or
browser.

## Verification

- The 13 changed or rewritten test files pass: 177 tests (`pnpm --dir ui
exec vitest run …`). They include `listLayoutStore.slot-35955.test.tsx`
(sanitize, patch, localStorage-only writes with no request,
cross-instance sync, entry removal, no entry while signed out,
retired-key sweep), `ObjectView.userListState-12418.test.tsx` (40 cases
on the real page, writes recorded at the storage door),
`signOutPurge.test.tsx` and `consoleUserPreferenceBudget.test.tsx` (one
read, no `ui.list.` prefix, no `ui.list.*` write).
- `@object-ui/app-shell` type-check (`tsc --noEmit` and `tsc -p
tsconfig.test.json`) passes.
- ESLint on the changed files: 0 errors.
- `node scripts/check-platform-checklist.mjs`: OK.
- The full `@object-ui/app-shell` suite runs in CI (Test UI).

Tests rewritten because the provider they drove is gone:

- `ListPreferencesProvider.slot-12418.test.ts` →
`views/listLayoutStore.slot-35955.test.tsx`.
- `ObjectView.userListState-12418`: the provider and family harness is
replaced by a seeded localStorage entry. "Waits for the read" cases are
gone. The 500 ms debounce case is replaced by "re-stating a width just
written sends no second write". The provider-less CONTROL block now pins
the retired-key sweep.
- `ObjectView.personalViews-29635` (objectstack-ai#30034): the default view's state is
a held draft, so the second read is gone. The "reverse order" case
becomes "the personal views read landing at once".
- `signOutPurge`: the server-save-before-sign-out case is gone, since
there is no server save. The sign-out sweep cases now cover
`list-layout:*`.
- `consoleUserPreferenceBudget`, `ObjectView.listPersonalized-28950`,
`ObjectView.listUrlState-11860`, `ObjectView.ufViewSwitch-11992`,
`ObjectView.emptyColumnsNoProjection-10694`,
`objectViewViewCrud.draftBarChange-35932` and
`ObjectView.overlayPatchOnly`: the harness or source pin is updated.

Overlap: merges cleanly with `main`. It textually overlaps objectstack-ai#36123 (PR2
of the same card) and objectstack-ai#36128. Whichever of PR2 and this one lands later
merges `main`.

Clause-②: no
Metadata-protocol: none

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (Not touched.)
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01L6bhgUkr3W7rNEqPk3J858

---------

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…, so Save to this view never publishes it (objectstack-ai#36137) (objectstack-ai#36318)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XURgXCZHcjPoyo5g9cMEATi)_

Fixes objectstack-ai#36137

Clause-②: yes (widening) — `ViewConfigPanel`'s `onSave` host prop gains
an optional second parameter, the panel's draft-version guard
(`saveDraft`), which the panel always passes; a host that takes one
argument is called as before; nothing removed or renamed
Metadata-protocol: none

## 维护者速读

-
管理员在视图设置里保存时,若另一位管理员正好在「保存到这个视图」,这次保存会被拒绝,并弹出“草稿已被改动”的提示,可选重新加载、覆盖或继续编辑;平时保存无感。新建视图时若同名视图已有未发布的修改,也会被拒绝,而不是盖掉它。
- 属于共享视图「确认后立即对所有人生效」那件事的收尾:保证一个人的未发布修改不会被另一个人的保存顺带发布。
- 出错时最多是管理员偶尔多看到一次冲突提示、需要重新加载或确认覆盖;可直接撤回本改动,恢复原来的保存方式。
- 无。

Route: direction B of the card, client-only (area claim 7073591363). No
`/meta` door, server or `packages/spec` change.

## What changes

**The view settings panel's draft save is pinned** (`ViewConfigPanel`,
`handleViewConfigSave`, `persistRuntimeMetadata`)

- The panel's load already reads the stored view (`layered`) and the
served draft. The draft read is now `MetadataClient.getDraft`, the
envelope, so its `version` pins the buffer's saves through the Studio
editors' guard (`useDraftSaveGuard`, `draftPinOf`): `If-Match` with the
version the load read, `If-None-Match: *` when the view had no draft. A
save that lands holds its receipt's version for the next one. Read and
save both name no package, the address the server resolves the same way
for both.
- The panel hands its guard to the host as `onSave`'s second argument;
`handleViewConfigSave` passes it to `persistRuntimeMetadata`, which
writes through it when given (a report's save still goes unpinned,
untouched).
- A `409 METADATA_CONFLICT` opens the guard's dialog
(`DraftConflictDialog`, its existing `engine.draftConflict.*` text:
"This draft changed since you opened it … saved elsewhere — by someone
else or in another tab"): **Reload saved version** re-reads the stored
view into the panel and refreshes the host's list (the path a draft-bar
publish or discard takes); **Overwrite…** re-sends pinned to the
refusal's `currentVersion` after a second confirmation; **Keep editing**
saves nothing, keeps the edit in the panel and Save live, and says "Not
saved" through the host's existing refusal toast.
- A draft-bar Publish or Discard re-reads the view (as before), so the
next save is pinned to "no draft" again.
- The panel renders the conflict dialog while closed too (it portals out
of the hidden container). A save still in flight when the panel closes
(Discard, another view tab) and refused after it closed still asks the
author; once answered, the host hears the outcome and the save is no
longer in flight, so Save is live when the panel reopens.

**A view create carries the first-write pin** (`createRuntimeMetadata`)

- `{ mode: 'draft', ifNoneMatch: '*' }` (with the app's package when
there is one): a create over a name that already holds a pending draft
is refused instead of written over it. `createRuntimeMetadata` has two
non-test callers at this head, both views: `handleViewCreate` in
`objectViewViewCrud.tsx` (the Create View dialog and the panel's create
mode) and `handleSaveAsView` in `ObjectDataPage.tsx` (Save as view);
measured by `git grep -n createRuntimeMetadata` outside test files.

**Docs**: `content/docs/ui/views.mdx`, the Save to this view bullet, one
sentence. Changeset `36137-pinned-view-draft-writes.md`
(`@object-ui/app-shell` patch).

## Tests

- New `ViewConfigPanel.pinnedDraftSave-36137.test.tsx`, against a
`fetch` double of the `/meta` view doors with the real `MetadataClient`
and the real panel:
- the card's interleave: Save to this view's pinned draft write lands,
its publish is parked; a settings save then goes out `If-None-Match: *`,
is refused 409 and opens the dialog, and the Save's draft is untouched;
the publish then publishes exactly the Save's body. Keep editing leaves
the edit on screen and Save live, with nothing written;
- the same interleave, then Reload: nothing written, the panel holds the
published view, and its next save goes `If-None-Match: *` and lands;
- the same interleave with the settings save parked at the door and the
panel closed (Discard) before the door answers: the refusal still opens
the dialog, Keep editing reaches the host as a refusal, and after
reopening an edit leaves Save live;
- over no draft: the first save `If-None-Match: *`, the next `If-Match`
on the first receipt's version;
  - over its own loaded draft: `If-Match` on the version the load read;
- a create over a name holding a pending draft is refused with `status:
409` and `code: 'METADATA_CONFLICT'`, sent `If-None-Match: *`, and the
draft is unchanged; a create of a new name lands (control).
- `ObjectView.viewConfigSaveWiring-10210.test.tsx` (+1 describe):
`ObjectView`'s handler writes through the guard the panel hands it,
never straight to the client.
- Updated to the pinned create options (`ifNoneMatch: '*'`), same
assertion otherwise: `runtime-metadata-persistence.test.ts` (2),
`runtime-metadata-persistence.otherTypesUntouched-35624.test.ts`,
`ObjectView.createChartView-11576.test.tsx`,
`ObjectView.createKanbanView-11581.test.tsx`;
`ViewConfigPanel.resumeEnvelope-10210.test.tsx`'s client serves the
draft read through `getDraft`.

## Acceptance notes

- **Every Console writer of a view draft, measured at the merge base**
(`git grep "mode: 'draft'"` under `ui/packages`, cited by symbol):
- view settings save, `handleViewConfigSave` → `persistRuntimeMetadata`:
was unpinned, pinned here;
- view create, `createRuntimeMetadata` (`handleViewCreate`,
`ObjectDataPage`'s Save as view): was unpinned, pinned here;
- Save to this view, `saveAndPublishRuntimeMetadata`: already
`If-None-Match: *`;
- Studio writers (`ObjectListViewInspector`, `useFormViewDraft`,
`ResourceEditPage`, `StudioBundleItemEditor`, `StudioDesignSurface`'s
creates and leaf drafts): already through `useDraftSaveGuard` or the
first-write pin;
- the footer calculation: no longer a server writer since it became a
part of the list draft, so nothing to pin;
- `ObjectStackAdapter.updateView`'s draft half (rename, pin, set as
default on a view with a pending draft): unpinned, **not changed here**.
It reads the draft and writes it back in one call, so both requests can
fall inside the window; a pin on its own read would carry the Save's
draft version and pass. Only a publish precondition (the card's
direction A) closes it. Routed to a follow-up card: filed objectstack-ai#36350
(direction A, protocol face).
- The card's second acceptance line: no docs or changeset text in the
tree carries the "known edge" note (`git grep -i "known edge"` and the
card number: zero hits outside an unrelated ADR's "Known edges"
heading); it lives only in the merged PR objectstack-ai#36123's body, which is landed
history and not edited here.
- `DraftConflictDialog`'s module header says a draft read naming no
package serves `version: null` for a package-bound draft; the server's
`readVersionToken` now serves the token of the draft a package-less save
overwrites. Both of this panel's requests name no package, so they agree
either way. Not changed.

## Verification

Final head `c7898258` (review round: `da52918b` the create refusal's
`code` and the test header, `55cbba6f` the changeset sentence,
`c7898258` the closed-panel dialog and its test). CI on `c7898258`: 60
check-runs, 48 success, 12 skipped, 0 failed, 0 pending (Test UI, Type
Check UI, Lint UI, Build & E2E UI, Live E2E UI, Test Core, TypeScript
Type Check, Lint & Repo Gates, Governed Surface Queue Guard, Dogfood
Regression Gate, Check Changeset among them).

<details><summary>Local runs at c789825 (under the shared verification
lock)</summary>

- Dependency closure `pnpm --filter '@object-ui/app-shell^...' build`:
VERDICT command-exit 0.
- `pnpm --dir ui exec vitest run` over `app-shell/src/views/`
`ViewConfigPanel*`, `ObjectView*`, `runtime-metadata*`,
`objectViewViewCrud*`, `metadata-admin/DraftConflictDialog*`,
`ObjectDataPage*`, `CreateViewDialog*`, `RuntimeDraftBar*`,
`ReportView*`, `viewCacheInvalidation*`: Test Files 142 passed (142);
Tests 1290 passed (1290). The new file alone: Tests 7 passed (7).
- `pnpm --filter @object-ui/app-shell run type-check` (both programs):
VERDICT command-exit 0.
- Ablation of the closed-panel dialog (`scripts/ablation-replace.mjs`,
anchor hit 1 to 0, blob `d5040af2` to `c3ef1c2c`; no build involved, the
test imports the source): the new file reads Tests 1 failed, 6 passed
(7), the closed-panel case red on `Unable to find an element by:
[data-testid="draft-conflict-dialog"]`; restored, blob equals HEAD and
`git diff HEAD` is empty.
- Gates narrowed to the files this round changed (the panel, its test,
the changeset), exit 0 each: `check-adr-0087-registration`,
`check-changeset-no-major`, `check-empty-changeset`,
`check-closing-keyword-parity`, `check:nul-bytes`,
`check:test-source-alias`, `check:cross-package-test-inputs`,
`check:changeset-gate-self-tests`, `check:doc-authoring`,
`check:refd-timer-probe`, `check:tier-file-adoption`. The rest of the
derived list is CI's (green above). eslint on the two changed files: 0
errors.
- `node scripts/pm/overlap-check.mjs`: `VERDICT clean exit 0` against
`origin/main` `c448c615`.
- The previous round's runs (at `7f297043` and `f86ba5fc`) are in the
dev report on the card.

</details>

**Read first**: `ViewConfigPanel.tsx` (the load's pin, the guard's
reload, and the closed branch that keeps the dialog),
`runtime-metadata-persistence.ts` (`persistRuntimeMetadata`'s
`'reloaded'` path writes and announces nothing),
`ViewConfigPanel.pinnedDraftSave-36137.test.tsx`.

**Two-minute check**: `pnpm --dir ui exec vitest run
packages/app-shell/src/views/ViewConfigPanel.pinnedDraftSave-36137.test.tsx`
— 7 tests pass (the first is the card's interleave: the settings save is
refused 409 and the publish carries only the Save's body; the third
closes the panel before the refusal lands).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01QsR2jUc3qp6bHKSWijbjds

<!-- signed: repo:objectstack#7 · zhuangjianguo ·
session_01QsR2jUc3qp6bHKSWijbjds -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
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/xl 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.

2 participants