Skip to content

feat(console): a change on a list is a draft, with Discard and Save (#35955 PR 1) - #36026

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

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

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_01L6bhgUr9HRqChVQu82hqdz

Part of #35955 (PR 1 of three: PR 2 saves into a shared view, confirm then publish per ruling 7058616478, after #35932; PR 3 retires the server-side list preference. The card stays open.)

Clause-②: yes (widening) — nine new console.objectView.draft.* keys in every @object-ui/i18n locale pack; no key removed or renamed (the retired marker's four keys stay in every pack); @object-ui/app-shell is private; @object-ui/plugin-list changes only its README (no prop changes)
Metadata-protocol: none

维护者速读

  • 列表上的排序、筛选、分组、搜索、隐藏列、加列、拖列顺序,改了立刻生效,但不再自动存到「我的个人列表偏好」里:它们现在是草稿,只在这个浏览器标签页里。
  • 有草稿时,条件行右端出现「放弃」和「保存 ▾」(原来的「已个性化 · 重置」去掉)。手机和窄屏上合成一个「保存 ▾」,菜单里三项:保存到这个视图、另存为我的视图、放弃。
  • 「保存 ▾」菜单先写出哪些没存(例如「未保存的改动:排序」)。在自己的个人视图上可以「保存到这个视图」;任何视图上都可以「另存为我的视图」:先起名(默认「原视图名 副本」),存好后切到新视图。存完弹「已保存」,按钮消失,排序 / 筛选标签留着。
  • 草稿在点开记录再返回时还在;切到别的视图或对象、或刷新页面就没了,列表回到视图本来的样子。
  • 列宽、行高、视图标签的顺序不算草稿,照旧按人记住(在 PR 3 之前仍写服务端同一行)。
  • 升级影响:以前自动存进个人偏好里的排序、筛选、搜索、列顺序、隐藏列、加的列从此不再生效,用户打开列表看到的是视图本来的样子。数据本身这次不删(PR 3 清)。
  • 这次没做:共享视图上的「保存到这个视图」,以及把显示面板的「布局 / 行颜色」存进视图(「放弃」已能还原它们),两样都在 PR 2。

What changes

The draft — new ui/packages/app-shell/src/views/listDraftStore.ts. One draft at a time, for one reader, object and view (listDraftScope), held in module memory (not React state: the list page unmounts while a record is open as a page). Read through useListDraft (useSyncExternalStore).

  • It holds the sort, the Filter panel's group, the grouping, the search, the column order, the hidden fields and the added fields. A sort is kept as { field, order } (the grid's row ids dropped); a filter group with no condition is no filter.
  • claimListDraft drops a draft held for another scope when a list takes its seed (another view or object opened). A reload is read once per document (takeDocumentReload, the navigation timing's type === 'reload') and counts only when the reloaded address (origin, path, query) is the address the list opens on: a reload of the list's own page ignores its uf_* params and starts clean, while a reload of another page leaves an in-app link to a list free to apply its uf_* state.
  • listDraftPreference lays the draft over the stored row in the ListViewPreference shape the list relay and the view builders already read, taking only the column widths and the row height from what was stored. A sort, filter, column order, hidden or added column stored by an earlier console is no longer read.

The writes (objectViewListRenderer.tsx). The sort, grouping, filter, search, hidden fields, added fields and column order go to the draft. A column report is split: its order goes to the draft, its widths to listPrefs.patchView(id, { columnState: { widths } }), and only when they differ from what is stored. Density and the views' order are unchanged (stored). The list's own "Reset to view default" drops the reset parts from the draft (and the stored row height). The Filter panel's per-browser search cache is no longer written.

The seed (objectViewListUrlState.ts). The list seeds from the address's uf_* state, else from the draft. The parts that light Discard and Save are the parts the list reports, minus density and search, plus columns while the draft holds a column order or added fields. handleResetView (Discard) drops the draft, strips the list's uf_* params and remounts the list; widths and row height stay.

Discard and Save — ListPersonalizedMarker.tsx → ListDraftActions.tsx, in the same conditionRowEnd slot (objectstack#35878). Wide face: a ghost Discard beside Save ▾. Below @[40rem]/list (and in the phone chip row, objectstack#35883): one Save ▾ whose menu also holds Discard. The menu's label names the unsaved parts.

  • Save to this view: offered on a personal view the reader may update; handleSaveToPersonalView as before, now with a "Saved" toast. buildPersonalViewConfig (personalViews.ts) also appends the draft's added fields as columns.
  • Save as my view: offered where the reader may create a personal view. It opens PersonalViewNameDialog with " copy", builds the view with buildInPlaceViewConfig from the draft, saves it, clears the source list's draft and address state, toasts "Saved" and opens the new view.
  • No shared-view save yet (PR 2).

i18n: console.objectView.draft.{discard, discardTitle, save, heading, partSeparator, saveToView, saveAsMyView, copyName, saved} in all ten hand-written packs, zh-Hant regenerated (pnpm gen:zh-hant, no diff after). personalized, personalizedHeading, resetView and resetViewTitle are no longer drawn and stay in every pack (the objectstack#35684 precedent), so no published key goes away.

Docs: content/docs/ui/views.mdx "A user's list state never writes the view" (heading kept: two READMEs link its anchor) now describes the draft. Platform checklist records-forms.adhoc-filter-sort-builder revision 13: the in-app-navigation restore becomes the record round trip, and the user-scope clause reads that nothing is stored (not loosened: a second account still sees none of the first account's filters).

Changeset: .changeset/35955-list-changes-are-drafts.md (@object-ui/app-shell, @object-ui/i18n patch) with the upgrade note.

Why

Card #35955: everything changed on a list is temporary and applies at once; Discard and Save replace 「Personalized · Reset」; column widths, row height and tab order are never a draft. D1 settled 06:09Z (browser-only, done in PR 3); D2 ruling 7058616478 applies to PR 2.

Tests

Rewritten to the new premise (each old pin asserted a ui.list write that this card retires):

  • ObjectView.userListState-12418.test.tsx — rewritten (40 cases): a sort, hide, add or filter writes nothing stored and is the draft's; a resize lands as one save, widths only; a drag is the draft's order with its widths stored; stored sort, filters, hidden and added fields from an earlier console no longer apply; Discard writes nothing and keeps widths and density; the view's defaults (viewDefaults) are unchanged; "Reset to view default" drops the draft part; a width change writes only when it changes; the Manage Views drag and the view editor's /meta/view write unchanged.
  • ObjectView.listPersonalized-28950.test.tsx — the marker block rewritten for Discard and Save (parts named in the menu, both faces, Discard drops the draft and the uf_* params, widths stay).
  • ObjectView.personalViews-29635.test.tsx — the save paths use the new testids and toast; new case for Save as my view (name defaults to "View 1 copy", nothing written before the name, the new view opens, the source draft is gone).
  • ObjectView.listUrlState-11860.test.tsx, ObjectView.emptyColumnsNoProjection-10694.test.tsx, ObjectView.ufViewSwitch-11992.test.tsx — seeds moved from the stored row to the draft; new pins that stored sort, filter, search and hidden fields no longer apply; a view switch opens clean.
  • consoleListStateWall-12418.test.tsx — under the walled posture a sort and a hide write nothing; the drag and the density still land as one preference write each.
  • view-filter-fold.ratchet.test.ts, ObjectView.overlayPatchOnly.test.ts — the source regexes follow the draft writes.
  • ObjectView.listPageInUrl-30850.test.tsx — resets the draft between cases (one case's search leaked into the next).

Local runs: @object-ui/app-shell full suite 22097 tests, 4 failed on the first run (the two files above, both old premises), both files re-run green after the fix (9/9); @object-ui/i18n 1957 passed; app-shell tsc --noEmit clean; check:i18n-keys, check:i18n-drift, check:i18n-dead-keys clean (no new key reported); check:platform-checklist OK; eslint on the changed sources 0 errors; overlap-check clean against main and 6 open PRs.

Verification

Browser, showcase (os dev --seed-admin --fresh), console from this branch's ui/ (vite), Chromium 1440×900 and iPhone 13. Screenshots and probe scripts: project folder build-seat1/35955/shots/.

Reading Result
All Tasks opened no Discard / Save
Sort by Title through the condition row applies at once, uf__sort in the address, Discard + Save ▾ drawn; menu "Unsaved changes: Sort · Save as my view" (shared view: no Save to this view)
Open a record, browser Back sort still on, Discard + Save still drawn
Reload list opens as the view declares it, no uf_*, no buttons
Save as my view name defaults to "All Tasks copy"; after Save the new personal view opens, toast "Saved", buttons gone, the sort chip stays
On that personal view, Filter Status = Done, Save → Save to this view menu "Unsaved changes: Filters · Save to this view · Save as my view"; toast "Saved"; after a reload the view opens with the filter (2 rows)
Remove the saved filter chip, then Discard 10 rows → Discard → back to the view's 2 rows, no buttons
Phone (iPhone 13), a sort only the compact Save ▾ is visible; its menu: "Unsaved changes: Sort · Save as my view · Discard"
Preference writes on the wire during the whole run none to ui.list.* (only the recent-items and app rows); one PATCH sys_personal_view/<id> for Save to this view

Review round 1 (L1-b REWORK 7060128462, L2 PASS + F1) → fe3589d

  • M1 takeDocumentReload(currentHref?) counts a reload only when the reloaded address (origin, path, query) is the address the list opens on; still read once per document. A reload of the AI chat page followed by an answer's in-app list link now applies the link's uf__filter. Three new cases in ObjectView.listUrlState-11860.test.tsx (reload of the list itself strips uf_*; reload elsewhere then in-app link applies the filter; first load applies it). Ablation: with the address check forced true, the "reload elsewhere" case fails.
  • Merge main at 19cf136 (seat asked, K=18): no conflicts; the files both sides touched are the 11 locale packs and records-forms.json (other items). After the merge: 204 affected test files 2832/2832 (13 skipped), check:platform-checklist OK, zh-Hant regen identical, overlap-check clean. L2 nit G1 (the old reload rule in What changes) is fixed in this body.
  • S1 ListDraftActions: with no save offered, the narrow face is a plain Discard (no Save ▾). New ListDraftActions.noSave-35955.test.tsx (2 cases).
  • S2 plugin-list/README.md (added fields are part of the draft; changeset now lists @object-ui/plugin-list patch for the README) and the stale "Reset to view" / 「Personalized」 comments in objectViewListRenderer.tsx, objectViewListUrlState.ts, ObjectView.tsx.
  • S3 records-forms.grid-personalization revision 9: steps[2], steps[6], acceptance[0] say a column order is a draft and does not come back after a reload; widths and row height still must.
  • N1 changeset: "Nothing stored is deleted; a later column-width change rewrites that row's column state with the widths alone."
  • N2 one canCreatePersonalView test shared by Save as my view and the switcher's create card (adds listReadable and !viewAccess.refusal to Save as my view).
  • N3 / F1 ListDraft.viewType / rowColor and the module header say they are written from PR 2; the PR 2 gap line above names the record round trip.
  • Local: the 8 affected files 138/138; app-shell tsc clean; eslint on every changed app-shell file 0 errors; check:test-source-alias, check:platform-checklist, overlap-check clean. Docs views.mdx: reload of the list's page drops the draft; an in-app link's state applies.

Known gaps (for the seat)

  • Save does not keep layout or row colour yet, and they do not survive opening a record as a page and coming back (the draft does not hold them yet); PR2
  • Widths, row height and the views' order still go to the server-side row until PR 3 (seat item 6). PR 3 moves them to the browser and clears the stored rows.

Read first: ui/packages/app-shell/src/views/listDraftStore.ts, then the writes in objectViewListRenderer.tsx (search listDraft.patch) and the seed in objectViewListUrlState.ts.

Two-minute check: open any object list, sort by a column (Discard and Save appear), open a record and press Back (still there), reload (gone); sort again, Save → Save as my view, accept the name (the new view opens with the sort, "Saved").


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgUr9HRqChVQu82hqdz

Finishes the draft layer: the tests follow it, the docs and the platform
checklist item say it, the retired marker's locale keys stay in every pack,
and a changeset carries the upgrade note. Column widths, row height and the
views' order stay stored for the reader.

Claude-Session: https://claude.ai/code/session_01L6bhgUr9HRqChVQu82hqdz
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 21, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Posted 2026-11-21T08:42Z. The brief handed to the isolated declaration-face reviewer for PR #36026 (owed by the changeset's Clause-②: yes (widening) line). The record follows as its own comment.

Contract review brief — PR #36026 @ cb6774f68f8321093c5f3fd92b63db58ac47b266 (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)
· PR #36026: its body, its file list, and the net diff against main at cb6774f68f8321093c5f3fd92b63db58ac47b266
· the check-runs on cb6774f68f8321093c5f3fd92b63db58ac47b266: 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-36026/ 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

席位核对 — REWORK (L1-b)

Head-sha: cb6774f · read 2026-11-21T08:44Z · full read of b113178..cb6774f (32 files, +1330/−706), against card #35955's PR 1 scope in the split plan, rulings 7058616478 (shared-view save → PR 2) and D1 (widths, row height and tab order stay browser-remembered), and the seat's 08:02Z note (layout and row colour save → PR 2).

维护者速读

  • 方向和卡片一致:在列表上改排序、筛选、分组、搜索、隐藏列、加列、拖列都只算「草稿」,不再自动存进个人偏好。条件行末尾出现「放弃」和「保存」;保存可以存进自己的视图,或「另存为我的视图」。打开记录再回来,草稿还在;换视图或刷新页面后草稿丢失。
  • 有一处必须改:判断「是不是刷新」的方式太宽。现在只要这个页面是刷新打开的,之后进入的第一个列表就会被当作刷新,链接里带的筛选会被丢掉。实际例子:用户刷新了 AI 助手页,再点回答里「查看这些记录」的列表链接,列表会显示全部记录,不是回答说的那几条,而且没有任何提示。
  • 另外三处建议补:窄屏下没有保存权限时按钮仍写着「保存」,点开里面只有「放弃」;一个公开包的说明文档还写着旧的「恢复为视图设置」;测试清单里有一步仍说刷新后列顺序会保留。
  • CI 全绿,可合并状态为 clean。

Must-fix

  • M1 — "was this a reload" is read per document, not per list, so an in-app link's list state is dropped after any reload. takeDocumentReload() (listDraftStore.ts) returns true for the first list seed after a document whose navigation entry is type: 'reload', whatever page was reloaded. The seed then treats it as a reset (const reset = resetPendingRef.current || takeDocumentReload(), objectViewListUrlState.ts): it skips the uf_* state the address carries and its write-back strips it. In-app links do carry that state. The AI chat page builds /apps/APP/OBJECT?view=…&uf__filter=… for every list link in an answer (listLinkTarget, AiChatPage.tsx:204-214, objectstack#31869) and navigates there in-app. Scenario: a reader reloads the chat page, asks "my overdue leads", and clicks the answer's list link. The list opens unfiltered, showing every lead instead of the set the answer names, with no notice, and the link's filter is gone from the address. The same holds for any page reloaded before a uf_*-carrying in-app navigation. The comment's intent ("the first list a reloaded page seeds") only holds when the reloaded page IS that list. Fix: count it as a reload only when the reloaded document is this list's address, for example entry.type === 'reload' && entry.name === window.location.href at the seed (before the write-back), still consumed once. Add a jsdom case for both directions: a reload of the list itself opens the view's own state and strips uf_*, while a reload elsewhere followed by an in-app navigation to a uf__filter address applies that filter. No test pins takeDocumentReload today.

Should-fix

  • S1 — the narrow face draws 「保存」 with nothing to save. In ListDraftActions, when neither onSaveToView nor onSaveAsMyView is passed (offersSave false: personal views not ready, or no create grant on a shared view), the wide face correctly shows Discard alone. The narrow face still draws the compact trigger labelled draft.save ▾, and its menu holds only 「放弃」. At phone width a reader without the grant sees a Save that cannot save. Fix: with !offersSave, draw a plain Discard on the narrow face too, or label the trigger with the discard words, and add a case.
  • S2 — a published README still describes the retired behaviour. ui/packages/plugin-list/README.md:301-303: "The console wires both on the object list page, where the added fields are kept with the reader's other list preferences and cleared by "Reset to view"." After this PR the added fields are a draft, kept only by Save and dropped by Discard. The renderer's own comment at objectViewListRenderer.tsx:539-541 ("stored beside their hidden fields … dropped with the rest of the entry by "Reset to view"") is stale the same way.
  • S3 — one checklist step still expects the column order after a reload. records-forms.grid-personalization (revision 8), the reload step at records-forms.json:3611 at this head: "reload; confirm the columnState (widths, and the order where reorder is enabled) and row-height restored — they now persist in … ui.list.showcase_task (perView..columnState / rowHeight …)". The order is now a draft. On a reload the list passes { widths } (or {}) as columnState (objectViewListRenderer.tsx:773), and ObjectGrid takes props over its own grid-columns-* copy, so the order does not come back. Drop "and the order", bump the revision, and add the #35955 entry. The PR's checklist hunks (2925–3085) do not reach this item.

Nits

  • N1 — The changeset's upgrade note says "Nothing stored is rewritten or deleted by this change." patchViewPreference replaces a part whole, so the first width change after upgrade writes columnState: { widths } and drops a legacy stored order. That order no longer applies anyway; the sentence would be exact as "nothing stored is deleted; a later width change rewrites the column state with the widths alone".
  • N2 — canSaveAsMyView (ObjectView.tsx) is personalViewsReady && personalGrant('create') && !!activeView. The switcher's create door (canCreatePersonal) also requires listReadable && !viewAccess.refusal. A list the reader cannot read has no draft in practice, but sharing one condition removes the second spelling.
  • N3 — ListDraft declares viewType and rowColor, but nothing writes them in this PR (PR 2, per the seat's 08:02Z note). One line in the type's doc saying "written from PR 2" would stop a reader from looking for the writer.

Checked

  • Draft store. One slot per tab, keyed [user, object, view]. claimListDraft at the seed drops another list's draft without notifying (it runs in render). patchListDraft normalizes sort (fields and direction only) and treats an empty filter group as no filter; it skips no-op patches, so there is no emit storm. discardListDraft and useListDraft subscribe through useSyncExternalStore with stable callbacks per scope. Because the store is module memory, the draft outlives the list page while a record is open as a page, which is the card's rule.
  • Write sites. All seven former listPrefs.patchView toolbar writes go to the draft: sort, filters, search, hidden fields, added fields, column order, and the grouping (newly also in the draft, beside the URL). Widths and the row height stay on listPrefs (D1). A width write happens only when the widths really change, so a drag that only reorders no longer writes the server row. restoreViewDefaults splits the same way. The seed reads the draft (filters, search, sort, grouping through the new acceptGroupingConfig, the same per-level field gate as uf__group) and no longer reads the stored sort, filters or cached search. listDraftPreference lays the stored widths and row height over the draft and nothing else stored.
  • Discard / Save. Discard = discardListDraft + the reset seed (ignores and strips uf_*) + the remount. Save to this view (own view only; shared-view save is PR 2 per 7058616478) updates the personal view from draftPreferenceOf, then discards and toasts 「已保存」. Save as my view asks a name (draft.copyName, 「‹name› 副本」), builds with buildInPlaceViewConfig from the same reading, saves, clears the source view's draft and uf_*, toasts and opens the new view. buildPersonalViewConfig now carries added fields as columns in the view's own spelling, after the declared ones and before the dragged order is applied. NOT_DRAFT_PARTS keeps density and a search term alone from drawing Discard and Save.
  • Clause-② widening. Nine console.objectView.draft.* keys are in all 11 packs; zh-Hant is generated (CI green). The retired marker's keys stay in every pack, so nothing published goes away; linkFilterRefused only moves, with identical text. @object-ui/app-shell is private: ListPersonalizedMarker.tsx goes and ListPersonalizationPart moves to ListDraftActions.
  • Docs. content/docs/ui/views.mdx § "A user's list state never writes the view" matches the code: draft, Discard, Save's two choices, the copy name, survives a record round trip, dropped by another view, object or reload, and widths, row height and tab order kept in ui.list.<object>. The new-tab link sentence is right, and becomes right for in-app links too once M1 is fixed.
  • Changeset text matches the code apart from N1.
  • l1-face at cb6774f: CLEAN. 54 success, 10 expected skip, 0 failed; mergeable_state clean; Part of #35955 (PR 1 of 3).

Owed

  • M1, and S1–S3 if taken, on a new head. I will read only the delta.
  • The declaration L2 is the seat's. This L1 does not replace it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Contract review

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

Read: card #35955 (body and all three comments: triage 7053495976, claim 7058427316, ruling record 7058616478); PR #36026 body, its 32-file list (it matches the net diff), and the net diff origin/main...pr-36026. Check-runs on the head: 64, every one success or skipped, none failed or pending (Check Changeset, Type Check UI, Test UI 1-16, Lint, PR-body guards, Governed Surface Queue Guard, Live E2E UI and Dogfood Regression Gate included).

① Derived judgments

  1. i18n accept set, widened: right. Nine keys under console.objectView.draft (discard, discardTitle, save, heading, partSeparator, saveToView, saveAsMyView, copyName, saved) are added to all eleven packs (ten hand-written, plus zh-Hant generated). The only - lines in the locale diff are linkFilterRefused, which moves below the new block. Its text is byte-identical on main and on the head in every pack. personalized, personalizedHeading, resetView and resetViewTitle are untouched in every pack, so no published key goes away. Every copyName keeps its {name} interpolation slot (written with i18next's double braces in the packs), and only one draft member exists under objectView.
  2. Seed accept set (the list's reader state): right. listDraftPreference reads only columnState.widths and rowHeight from the stored ui.list.OBJECT row. A sort, filter group, hidden list, added list or column order stored by an earlier console is no longer applied. This is card item 6 ("不迁移", maintainer 「清掉」). The changeset's upgrade note says so, and it also says no stored data is deleted yet (PR 3). The preference row is reader runtime state, not authorable metadata or a door's contract, so this is no Clause-② narrowing.
  3. Writes: right for PR 1. The sort, filter group, grouping, search, hidden fields, added fields and column order now go to tab memory (patchListDraft). A column report is split: the order goes to the draft, and the widths go to listPrefs.patchView only when they differ from what is stored. The row height and the tab order are written as before. No new server write class is added; the width write is now narrower than on main.
  4. Address accept set: right. The first list seeded after a document reload ignores its uf_* params, and the write-back strips them (takeDocumentReload, navigation timing type === 'reload'). A link opened in a new tab is a navigate, so it still applies. This is card item 4 (刷新 drops the draft) and the seat-accepted reading R2. Edge: see F2.
  5. Grouping seed: right. A draft grouping goes through acceptGroupingConfig, the same level-by-level gate as uf__group, so a stale or unreadable field is dropped exactly as it is from a link.
  6. Saved view body: right. buildPersonalViewConfig now appends the draft's added fields as columns, in the view's own spelling, without duplicates. The body is still closed through buildViewConfigSaveBody. 「Save as my view」 uses the existing personalViews.save door behind personalGrant('create'). It builds the body with buildInPlaceViewConfig, then clears the source draft and its uf_* params, toasts and opens the new view. This matches card item 3 and the acceptance rows "另存为我的视图" and "隐藏一列后另存".
  7. No shared-view write: right. 「Save to this view」 is offered only under canUpdatePersonalView, and the view bar's save uses the same condition. PR 1 therefore writes no shared view. This does not contradict D2 A (ruling 7058616478: a confirmed shared save publishes at once, scoped to PR 2). It also does not contradict ruling 7045525672's rule that implicit toolbar changes never write a shared view.
  8. Discard: right. handleResetView → discardListDraft drops every part the draft holds: sort, filters, grouping, search, columnOrder, hiddenFields and addedFields. resetPendingRef makes the reseed ignore the uf_* params and strip them. The identity bump remounts ListView, which puts back the layout, row colour, row numbers, inline edit and the queue toggle; those are held in its own state. The renderer always hands the grid an object columnState (?? {}), so the grid's grid-columns-* localStorage fallback cannot bring back a discarded order. The column widths and row height stay, as card item 5 requires (they are never a draft). The card asks for nothing more to be restored.
  9. Removed ListPersonalizedMarker.tsx: right. @object-ui/app-shell is private: true, and neither the old nor the new component is exported from a package index.
  10. SQL push-down: no server, query or data-path code is in the diff. There is no new id materialisation or in-app join.

② Semver level

The changeset .changeset/35955-list-changes-are-drafts.md bumps @object-ui/app-shell (private) and @object-ui/i18n at patch. The PR body and the changeset body both carry line-initial Clause-②: yes (widening) and Metadata-protocol: none. Both lines match what the diff publishes: keys added, nothing removed or renamed, no metadata key, value or default changed, no @object-ui/plugin-list prop changed. Under AGENTS.md rule 3, a non-protocol widening ships patch. Check Changeset is green. Correct.

Clause-②: yes (widening), matched by the diff.

③ Boundary flags

  • Dev gap: "Save does not keep layout or row colour yet; PR2". This gap is stated in the body (Known gaps, and 维护者速读 「这次没做」). Accepted for PR 1. It is incomplete, though; see F1.
  • Dev gap: "Widths, row height and the views' order still go to the server-side row until PR 3". This gap is stated in the body, the changeset and views.mdx. It does not contradict D1. The maintainer's 「只记在浏览器里」 is executed in PR 3 (claim 7058427316, the PR body's Part-of line). PR 1 adds no new server write for these three settings; the width write gets narrower. Consequence: the card's acceptance row 「这三样没有产生任何发往服务端的写入请求」 is still unmet at this head. The card must stay open past PR 1, and the Part of #35955 link keeps it open. PR 3 also owes a rewrite of the views.mdx bullet and the changeset line that describe the server row.
  • D2 A (ruling 7058616478): this ruling applies to PR 2. PR 1 offers no shared-view save, so nothing here contradicts it. PR 2 still owes the confirm step, publishing at once, the 「已保存,所有人可见」 toast, and the refusal to publish someone else's unpublished draft.
  • open_questions: the body has none. D1 and D2 were the claim's two open questions, and the maintainer answered both.
  • Claim's provisional Clause-② line: see F3.

Findings

  • F1 (should-fix, non-blocking). ListDraft in listDraftStore.ts declares viewType and rowColor. Its module header says the draft holds "the Display panel's layout and row colour". Nothing in the diff writes either field: there is no listDraft.patch for them, and the renderer wires no layout or row-colour relay. Both settings stay in ListView's own state. Discard still restores them by remount, which is correct. But they do not outlive a record opened as a page, even though the reading R3 the seat accepted makes them draft parts and card item 4 keeps a draft across the record round trip. Save also drops them silently after toasting "Saved", which is the stated gap. Fix one of two ways: (a) correct the header and drop the two unwritten fields until PR 2 wires them; or (b) add the round-trip loss to the PR's gap list for PR 2.
  • F2 (nit). takeDocumentReload is consumed by the first list seeded in the document, not by the list the reload was on. If a reader reloads a record page and then follows an in-app link that carries uf_* to a list, that link's state is dropped. The edge is narrow; it could be tightened by also matching the reloaded URL's path.
  • F3 (nit). Claim 7058427316 still reads Clause-②: no (provisional ...), although the claim said it would be amended if the keys measured as widening. The PR body and the changeset carry the governing yes (widening), and this review is owed by that line. Nothing blocks on it.
  • F4 (nit). listFilterStorage.ts's write path (writeListFilterState) has no production caller any more. Only the sign-out purge (discardPendingListFilterWrites) and tests still use the module. Leave it for PR 3's retirement.
  • F5 (nit, forward to PR 2). buildPersonalViewConfig copies the reader's stored row height into the saved body (pref.rowHeight, through listDraftPreference). This is the behaviour already on main, and it is harmless on a view of the reader's own. Under D1, though, row height is a browser-only reader setting and not a draft, and the Save menu does not name it. PR 2's shared-view save should not publish one reader's row height to everyone.

No must-fix.

Implemented-by: claude/project-thread-ac708f
Reviewed-by: isolated L2 sub-agent of seat session_01L6bhgUkbQqRUUFSiu2HGob

VERDICT: PASS

…oad was of that list

Review round 1 of the list draft. The reload check now compares the
reloaded address with the list's own, so a reload of another page (the AI
chat page) followed by an in-app list link keeps the link's state. The
narrow face draws Discard alone where no save is offered. Save as my view
and the switcher's create card share one test. Stale comments, the
plugin-list README and the grid personalization checklist item follow the
draft; the changeset's upgrade note is exact.

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4

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

Head-sha: fe3589d · read 2026-11-21T09:16Z · delta cb6774f..fe3589d only (one commit, 11 files, +203/−69), on top of REWORK 7060128462.

维护者速读

  • 上一轮那处必须改的已改好:只有刷新的正是这个列表页时,才把列表恢复成视图原样。刷新 AI 助手页之后,再点回答里的列表链接,链接带的筛选会照常生效。
  • 三处建议也都已改:窄屏下没有保存权限时只显示「放弃」,不再出现点开后只有「放弃」的「保存」;公开包的说明文档改成了新的说法;测试清单不再要求刷新后保留列顺序。
  • 发布说明和文档同步更新。CI 全绿,可合并状态为 clean。

Must-fix / Should-fix

None. M1 and S1–S3 from 7060128462 are closed, and N1–N3 are taken.

Checked

  • M1 closed. takeDocumentReload(currentHref?) is still consumed once per document, and now answers true only when the navigation entry is reload AND entry.name names the same page as the address at the seed (window.location.href by default; origin, path and query compared, hash ignored, parse failure → false). The seed call is unchanged (resetPendingRef.current || takeDocumentReload()), and it runs in render before the write-back, so the address read is still the one the reload opened. Three new cases in ObjectView.listUrlState-11860.test.tsx: a reload of the list itself (filter and search dropped, uf__filter stripped); a reload of /apps/crm/ai-chat and then an in-app navigation to a filtered list (filter applied, param kept); and a CONTROL first load (navigate) that applies the link's filter. The thread reports an ablation: the middle case is red without the fix.
  • S1 closed. With no save offered, the narrow face is a plain ghost Discard (list-draft-compact-discard, title = discardTitle) instead of a Save ▾. With a save offered it is unchanged. ListDraftActions.noSave-35955.test.tsx covers both, with its CONTROL.
  • S2 closed. plugin-list/README.md now says the console's added fields "are part of the list's unsaved draft: Save keeps them in a view, Discard drops them". The changeset adds @object-ui/plugin-list: patch and says it changes only the README. The stale renderer and URL-state comments are reworded to Discard and draft.
  • S3 closed. records-forms.grid-personalization goes to revision 9. The reload steps now expect widths and row height only, and say a column order is a draft that does not come back. acceptance[0].verify names why (the console hands the grid the widths alone). The revisions entry has ref #35955 and says nothing was loosened. The thread also bumped adhoc-filter-sort-builder to 13 for the same draft rule.
  • N1–N3. The upgrade note now reads "Nothing stored is deleted…; a later column-width change rewrites that row's column state with the widths alone". canCreatePersonalView (with listReadable && !viewAccess.refusal) is now the one test for both the draft's Save as my view and the switcher's create card. viewType and rowColor say they are written from PR 2.
  • Docs. views.mdx now says a reload of the list's page drops the draft, and an in-app uf_* link (an AI answer's list link, after a reload of the chat page too) applies as a draft. That matches the code.
  • l1-face at fe3589d: CLEAN. 56 success, 12 expected skip, 0 failed, 0 pending; mergeable_state clean.

Owed

  • None from L1. The L1 is final at this green head.
  • The declaration L2 is the seat's, and PR 2 / PR 3 follow per the split. This L1 does not replace an L2.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Contract review

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

Delta review. The base is the PASS record on cb6774f68f8321093c5f3fd92b63db58ac47b266. I read only cb6774f68..fe3589d65: one commit (fix(console): a reload drops a list's address state only when the reload was of that list), a fast-forward on top of the old head, touching 11 files. I also read the PR body at this head and the check-runs on it: 68 runs, 56 success and 12 skipped, none failed or pending.

① Derived judgments

  1. Reload accept set (M1 in the body): right. takeDocumentReload(currentHref?) still counts a reload only once per document. It now counts it only when the reloaded address and the list's address have the same origin, path and query (sameAddress; the hash is ignored). A reload of the list's own page still drops the draft and strips the uf_* params, which card item 4 requires. A reload of another page, followed by an in-app link to a list, now applies that link's uf_* state. This closes my earlier F2. Three new cases in ObjectView.listUrlState-11860.test.tsx pin the list's own reload, a reload elsewhere, and a first load.
  2. Who is offered 「Save as my view」: right. canCreatePersonalView is now one test, shared with the view switcher's create card. It adds listReadable and !viewAccess.refusal to the earlier check (personal views loaded, create grant, an active view). The draft's Save menu is therefore offered to exactly the readers the create card already admits. This narrows only who sees a menu item; no door changes.
  3. Discard-only face: right. ListDraftActions now draws no narrow-width Save button where no save is offered. That narrow face becomes a plain Discard button. The new ListDraftActions.noSave-35955.test.tsx pins both cases. Discard's behaviour is unchanged: the delta does not touch handleResetView, discardListDraft or the remount, so it still restores every field the draft holds.
  4. Draft store docs (F1): right. The module header now says the layout and row colour belong to the draft "from PR 2". viewType and rowColor stay declared, each with a jsdoc saying nothing writes it yet and that PR 2 wires it. The body's Known gaps line now reads: "Save does not keep layout or row colour yet, and they do not survive opening a record as a page and coming back (the draft does not hold them yet); PR2". F1 is resolved by option (b), together with the header correction.
  5. Docs and checklist: right. views.mdx now says only a reload of the list's own page drops the draft, and that a link's uf_* state applies in-app too. records-forms.grid-personalization is at revision 9: a column order is a draft and does not come back after a reload, while widths and row height still must, and do. That matches D1's interim state (still kept in the server row until PR 3). The remaining edits are comments and the @object-ui/plugin-list README: the "Reset to view" and 「Personalized」 wording becomes Discard and Save, and added fields are described as part of the draft.
  6. SQL push-down: no server, query or data-path code is in the delta.

② Semver level

The changeset adds '@object-ui/plugin-list': patch. In that package the diff touches only the README, which ships in the tarball, so patch is right. @object-ui/app-shell (private) and @object-ui/i18n stay at patch. No locale file is in the delta, so the nine added keys and the four kept marker keys are as they were. The PR body and the changeset still carry Clause-②: yes (widening) and Metadata-protocol: none. The body's Clause-② line now also says @object-ui/plugin-list changes only its README and no prop. That is true: no ListView prop or type changes in the delta. Check Changeset is green.

Clause-②: yes (widening), unchanged by the delta.

③ Boundary flags

  • F1 (should-fix on the old head): resolved; see ①4.
  • F2 (nit on the old head): resolved by M1; see ①1.
  • F3, F4 and F5 (nits on the old head) are not touched by the delta and stand as filed. F5 stays a forward note for PR 2.
  • D1 and D2 A: the delta adds no server write and offers no shared-view save, so the old reading holds.
  • open_questions: none.

New findings

  • G1 (nit). The PR body's "What changes" paragraph still says "the first list a reloaded page seeds ignores its uf_* params and starts clean". That is the old-head behaviour. Under M1, it now applies only when the reloaded page is that list. The M1 note and the changeset carry the new rule; this one line is stale.
  • G2 (nit). The address match is exact on path and query, which has two edges. (a) An address rewrite before the seed means a reload of the list keeps its uf_* state, and the draft comes back from the address. Examples are a landing redirect or a view-segment normalisation. I found no such rewrite on a canonical list address. (b) If a reader reloads a record page and then presses Back to the list, the history entry's uf_* state applies again. That is consistent with "a link's state applies", but it is a reload after which the list's changes come back. Neither edge is pinned. Neither blocks.

No must-fix.

Implemented-by: claude/project-thread-ac708f
Reviewed-by: isolated L2 sub-agent of seat session_01L6bhgUkbQqRUUFSiu2HGob

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Regen-provenance: declaration-face record 7060513283 (delta PASS) · fe3589d65 → 19cf13657 · diff <(git diff MB_OLD fe3589d65 -- . ':!.changeset') <(git diff MAINPARENT 19cf13657 -- . ':!.changeset') → empty once index and @@ offset lines are set aside (MB_OLD b113178de, MAINPARENT c00be39b7) · 2026-11-21T09:35Z

19cf13657 is a merge of main with an empty --remerge-diff, so the PR's own change is byte-identical to the reviewed head and the record carries over (contract-review.md L49). The changeset 35955-list-changes-are-drafts.md is the same 23 lines on both. The only other change on the new head is the PR body's "What changes" line (L2 nit G1), now stating the new reload rule. Check-runs on 19cf13657 are read at landing.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4

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

Head-sha: 19cf136 · read 2026-11-21T09:51Z · merge-only read of fe3589d → 19cf136 (merge of main c00be39), on top of delta ACCEPT 7060466493.

维护者速读

  • 这次只是把主干合进来,没有冲突。合并后,这个 PR 自己的改动和上次审过的版本完全一样。主干也没有新代码再去用这次删掉的旧组件。
  • CI 全绿。

Must-fix / Should-fix

None.

Checked

  • The merge is clean. git merge-tree --write-tree fe3589d6 c00be39b gives be06ca03, which equals 19cf136's tree, so the merge introduced nothing by hand.
  • The net diff is unchanged. The +/− lines of the PR's diff against its merge base at fe3589d and against main c00be39 at 19cf136 are line-for-line identical (zero difference), matching the seat's regen-provenance 7060688006.
  • Nothing in main reaches for what this PR removes. No ListPersonalizedMarker or listPersonalizedParts remains in ui/ at the merged tree.
  • l1-face at 19cf136: CLEAN. 56 success, 12 expected skip, 0 failed, 0 pending. mergeable_state read unknown once, right after the push; it was clean at fe3589d, and the seat reads it at landing.

Owed

  • None from L1. The L1 is final at this green head. The L2 and landing are the seat's.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Regen-provenance: declaration-face record 7060513283 (delta PASS) · 19cf13657 → 1da765f4d · diff <(git diff MB_OLD 19cf13657 -- . ':!.changeset') <(git diff MAINPARENT 1da765f4d -- . ':!.changeset') → empty once index and @@ offset lines are set aside (MB_OLD c00be39b7, MAINPARENT 33d016945) · 2026-11-21T13:03Z

1da765f4d is a second merge of main (K had reached 17 because the seat did not land after L1-b's merge-only ACCEPT 7060856030), with an empty --remerge-diff. The PR's own change, the changeset included, is byte-identical to the reviewed head, so the record carries over (contract-review.md L49). Check-runs on 1da765f4d 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: 1da765f · read 2026-11-21T13:24Z · prior record merge-only ACCEPT 7060856030 @19cf1365 · CI at this head: 54 success · 10 expected skip · 0 failed (per the seat), mergeable clean

维护者速读: 这次只是把最新的 main(含 #36042 颜色方块、#36058 等)合进来,PR 自己的改动一字未变,合并没有手工改动。上次审读结论继续有效。

  • 1da765f is a two-parent merge: 19cf136 (the head read at 7060856030) and main 33d0169. git merge-tree --write-tree 19cf1365 33d01694 gives exactly 1da765f's tree, so nothing was resolved by hand.
  • The PR's net diff is the same before and after: the +/- lines of diff(base, 19cf1365) and diff(33d01694, 1da765f4) are identical, so the PR changes nothing beyond what was read.
  • Files that both main and the PR touch since the last read: ObjectView.tsx, the 11 locale packs and docs/qa/platform-checklist/areas/records-forms.json. All merged automatically. In the checklist, main still holds this PR's toolbar-filter item at revision 12, so the PR's bump to 13 does not collide with a revision main assigned.

L1 final at this head. To the seat for landing.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Seat landing · 2026-11-21T13:26Z · PR 1 of #35955 (b1-L): a change made on a list (columns, sort, filter, row height and the other personal settings) is a draft until the reader presses Save; Discard puts the stored view back, and a reload keeps the draft only when it reloads the same list address. Clause-②: yes (widening). The seat's declaration-face L2 read PASS on cb6774f6 and the delta PASS on fe3589d6 (record 7060513283); 19cf1365 and 1da765f4 (this head) are merges of main with empty --remerge-diffs, and the seat's regen-provenance notes 7060688006 and the one for this head show the PR's own diff and changeset byte-identical, so the record carries over. L1-b delta ACCEPT 7060466493, merge-only ACCEPT 7060856030 on 19cf1365, and merge-only re-check ACCEPT 7063263428 on this head. The second main merge was needed because the seat did not land after the first ACCEPT. check-governed-merges --pr 36026 reads NOT governed (+1490/−732). The seat read K by hand: 6 first-parent commits since the merge base, under 15; main since then touches no translations/ bundle and two skills/ files this PR does not touch. On this head, 54 check-runs are success, 10 are skipped and none failed; mergeable clean. Known edges (L2 G2) and the PR 2 gap lines stay with PR 2 and PR 3 of the card. The seat readies this PR and arms auto-merge in the same step. The PR carries Part of #35955.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 21, 2026 13:26
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit c757e07 Nov 21, 2026
65 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-ac708f branch November 21, 2026 14:18
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…bottom-sheet sort, filter and view panels that apply on ✓ (objectstack-ai#36024)

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

repo:objectstack#1 · os-sales · session_01L6bhgXQEtN6Kp1wRKH6Fde

Fixes objectstack-ai#35883
Fixes objectstack-ai#35884

Clause-②: yes (widening): new optional `BulkActionBar.open`
(`@object-ui/plugin-grid`); new exports `PhonePanelSheet`,
`useListPhonePanels`, `PHONE_CHIP`, `PHONE_CHIP_ACTIVE` (+ types
`PhonePanelSheetProps`, `ListPhonePanels`) from `@object-ui/plugin-list`
and `requestListSelection`, `useListPageSelecting`,
`useListPageSelectable` from `@object-ui/plugin-grid`; new keys in every
`@object-ui/i18n` locale (`listConditions.phone.*`,
`sortBuilder.levelOptions` / `.changeField`,
`console.objectView.select`); nothing removed or renamed.
(`FilterPanel.advancedOffered` is internal to plugin-list: `FilterPanel`
is not a package export.)
Metadata-protocol: none
Flow: card thread builds itself (maintainer 2026-11-20 09:22:50Z rule);
both cards are p1/p2 children of epic objectstack-ai#35880 (Sales 2026-11-20 16:41Z),
one PR as the seat dispatched them.

## 维护者速读
- 手机上打开对象列表(例如「客户」),顶部一行变成:返回、对象图标和名字、「⋮ 更多」;通知和头像不在这一行。
- 下面一行全是胶囊按钮:视图名加条数、排序、筛选、搜索。有排序或筛选时按钮上带数字并高亮。手机上不再单独占一行显示排序筛选标签。
-
点排序、筛选、视图名,都从底部弹出面板。排序和筛选面板里改的是一份副本:点「✓」才生效,点「×」或下滑就丢掉。生效时走的是电脑端同一个写入,没有第二条保存路径。
-
排序面板每一级两行(字段在上、方向在下),可以用手指按住把手拖动排顺序;每级有「⋯」菜单(换字段、升降序、删除)。筛选面板列出每个条件;没有条件时是一句说明加「添加筛选」。视图用的是「或」组合这类高级筛选时,面板只提示「请在电脑上修改」。
- 「视图设置」进了视图名面板的最后一项,打开后内容和电脑端一样。
- 面板里弹出屏幕键盘时,面板会缩到键盘上方,「✓」和正在输入的框都不会被挡。没改任何东西就点「✓」,不会写入。
- 长按一张卡片进入选中状态,这张被选中;「⋮
更多」里的「选择」也能进入。「选择」只在能多选的卡片列表上出现,看板、日历、不可选或只能单选的列表上不显示。选中时点卡片是加选或取消,右下角「+」隐藏;取消到一张不剩就退出。
- 选中时用的是 objectstack-ai#35678(已合并)的底部浮动操作条:「已选 N 条」、×、操作;从「选择」进来还没勾卡片时显示「已选 0 条 ×」,点 ×
就退出。选中期间右下角「+」不显示,不会压住操作条。
- 工具行右边的「保存」按钮和它的菜单(保存、放弃、另存先起名、保存后的提示、临时视图设置)由 objectstack-ai#35955 提供(席位在 objectstack-ai#35883 评论
7061423282、objectstack-ai#35884 评论 7061428301 记下了这一分工;这里已经留好位置,objectstack-ai#35955 的 PR objectstack-ai#36026
合并后会自动出现)。
- 出错时用户在手机上会看到旧的工具行消失但新面板打不开;改动只在界面上,撤回这个 PR 就恢复原样,不动任何已存数据。
- 要你做的:无。

## What changes

Below `sm` (`useBelowSm`, `(max-width: 639.98px)`) the object list keeps
its desktop content and changes only its containers (ruling record
7045325067 on objectstack-ai#35880).

**The page's top row** (app-shell `layout/PhonePageBar.tsx`, new): a
page publishes `{ icon, title, end }` into a small store `ConsoleLayout`
mounts; `AppHeader` draws it in place of the app pill, the phone title,
the search, the bell, the assistant/help group and the avatar while the
page is on screen (phone only, never on a phone tab page). `ObjectView`
publishes 「‹ · object colour tile (`ObjectIconTile`, as objectstack-ai#36042 draws it
on desktop) · object name · ⋮ More」. ⋮ More is `ObjectViewMoreMenu`
(extracted from `ObjectViewPageBarActions`, which now uses it), with
「Select」 first.

**One row of pills** (`PhoneListToolbar`, plugin-list
`phone/PhoneListPanels.tsx`): the host's `toolbarLeading` (the view
switcher's phone face: the view's name, its count, the caret), Sort N,
Filter N, the list's search (now a 44 px pill), then the host's
`conditionRowEnd`. The desktop toolbar row and the condition row are not
drawn below `sm`. A count highlights its pill; with none the pill is the
icon alone. `userActions.sort/filter/search: false` withhold their
pills, as on desktop.

**Bottom sheets** (`PhonePanelSheet`, a vaul `Drawer`, full height less
40 px, swipe-down closes): header 「× · title · ✓」 or 「‹」 on a sub-step.
`100dvh` does not shrink for the on-screen keyboard (iOS Safari; Chrome
on Android's default `resizes-visual`), so the sheet reads
`visualViewport` (`useKeyboardInset`): while the keyboard is up its
bottom is the keyboard's top and its height is the visible area's less
the 40 px strip, so 「✓」 and the focused field stay in view; vaul's own
`repositionInputs`, which would also write the height, is off. 「✓」 on an
untouched copy writes nothing.
- **Sort**: the levels in `PhoneSortLevels` (plugin-list): two lines
each (field over direction), a handle a finger drags (pointer events,
since HTML5 drag does not fire on touch; `touch-none`,
`data-vaul-no-drag`, and the pointer events stop at the handle so the
sheet's swipe never sees them) or ArrowUp / ArrowDown moves (the handle
keeps focus at the level's new place), and a ⋯ menu per level (change
field, direction, remove); 「Add sort」 and 「Change field」 step to
`SortPanel` / `FieldList`. The sheet edits a copy (`useStaged`) and 「✓」
hands it to `applySort`, the write the desktop sort chip calls (which
ends in `onSortChange`); 「×」 drops it.
- **Filter**: the conditions with a ⋯ menu (edit, remove); 「Add filter」
and edit step through `FilterPanel` (`advancedOffered={false}`). 「✓」
hands the copy to `applyPanelFilters`, the desktop chips' write. A
filter that is not a flat AND of conditions (an `or` group, nesting)
shows 「This view uses an advanced filter. Change it on a computer.」 and
edits nothing.
- **Views**: `ObjectViewSwitcherMenu` with `phone` (search at the
bottom, no list height cap) and its footer's last row 「View settings」,
which opens…
- **View settings**: `ViewSettingsContent` with the desktop popover's
own props; it applies each change as on desktop, so it has 「×」 only.

**`@object-ui/components` is not changed** (only a census test row is
deleted). The phone levels started as a `layout="stacked"` in
`SortBuilder`; after main moved, the eager `ui-components` chunk sat at
its 347,000-byte ceiling (`check:eager-closure`: main alone measures
what this head measures, 347,610 gzipped in a local build, which CI
reads about 600 bytes lower), so any phone-only bytes there fail the
gate. The phone face therefore lives in plugin-list, which no per-chunk
ceiling weighs, and the desktop `SortBuilder` is byte-identical to main.
Its touch reorder is not added for desktop (a desktop on a touch screen
keeps mouse, keyboard and HTML5 drag as before).

**Card selection** (`ObjectGrid` card renderer, plugin-grid
`listPageScope.ts`): a 500 ms long press held within 10 px starts
selecting with that card ticked, and the click that ends the press is
swallowed; while selecting a tap ticks or unticks, unticking the last
ends it; `requestListSelection(pageColumn)` (the More menu's 「Select」)
starts it with none ticked. The selection is the grid's one
`selectedRows`, shown in objectstack-ai#35678's floating `BulkActionBar`; its new
optional `open` keeps the bar up at 0 (「0 selected ×」, no actions) while
a selection opened by 「Select」 has nothing ticked, and draws nothing new
for any other host. The 「Select」 request, the "is a selection open" read
and the "would 「Select」 open one" read live in `listPageScope.ts`
(`requestListSelection`, `usePublishListSelecting` /
`useListPageSelecting`, `usePublishListSelectable` /
`useListPageSelectable`); the page hides its 「+」 FAB while one is open,
and draws 「Select」 only while the grid says a request would open one
(cards whose rows take more than one tick; not a kanban, a calendar, or
a list with no or single selection). The grid's `selectionAvailable` in
the action context is not enough for that: it is also true for a
single-select list, where 「Select」 does nothing. The card scroller
carries the grid's root ref, so the cards are inside the list page's
scope too. A card is a keyboard control (`role="button"`,
`tabIndex={0}`, Enter / Space on its own key, `aria-pressed` while
selecting): Enter opens it, and while selecting Enter or Space toggles
it. Every pointer-down clears the long press's swallow flag first, so a
long press the browser ends with no click (a finger that slid off,
Android after its context menu) never eats the next tap.

## Shared with desktop

| Phone part | Shared component | Notes |
|---|---|---|
| Sort sheet levels | the list's `SortItem[]` (what `SortBuilder` edits)
| drawn by `PhoneSortLevels`; see "Separate" |
| Sort sheet 「Add sort」 / 「Change field」 | `SortPanel`, `FieldList` |
unchanged |
| Sort ✓ | `applySort` → `onSortChange` | the desktop chip's write |
| Filter sheet add / edit | `FilterPanel` | `advancedOffered={false}`
(internal prop) only drops its footer link |
| Filter ✓ | `applyPanelFilters` → `onFilterChange` | the desktop chips'
write |
| Views sheet | `ObjectViewSwitcherMenu` | `phone` moves the search
last; `footerEnd` adds View settings |
| View settings sheet | `ViewSettingsContent` | the popover's own props,
spread |
| ⋮ More | `ObjectViewMoreMenu` | extracted from the desktop's
`ObjectViewPageBarActions` |
| Save (from objectstack-ai#35955) | the host's `conditionRowEnd` | drawn at the pill
row's end |
| Selection bar | `BulkActionBar` (objectstack-ai#35678) | `open` added for an empty
open selection |

Separate, and why:
- `PhoneListToolbar`: the desktop bar is two rows of mixed controls; the
phone row is pills only, by the card.
- `PhonePanelSheet` and the staging copy (`useStaged`): the container
and the 「✓」 layer the ruling asks for. It keeps a copy and nothing else.
- `PhonePageBar`: the app bar has no slot a page fills on desktop, and
the desktop draws the object name in the view bar.
- The filter sheet's list of conditions: on desktop each condition is a
chip in the condition row, which the phone does not draw.
- `PhoneSortLevels`: the phone's two-line level face with a touch
handle. It edits the same `SortItem`s through the same `applySort` on
「✓」; it is separate from `SortBuilder` only because the eager components
chunk has no headroom for phone-only bytes (above).

## Scope with objectstack-ai#35955

objectstack-ai#35883's Save, discard, save-as (name first), the toast after saving,
and the temporary-view-settings rows move to objectstack-ai#35955 (seat comment
7061423282 on objectstack-ai#35883, 7061428301 on objectstack-ai#35884): objectstack-ai#36026 draws 「Save ▾」 at
the phone pill row's end through the host's `conditionRowEnd`. Until it
lands, `conditionRowEnd` draws today's 「Personalized · Reset」 there.

## Follow-ups

- A tap on a card's link cell (a URL or lookup link) while selecting
opens the link instead of ticking the card: the cell stops the click
from reaching the card (objectstack#33548's rule). The seat opens a
small card.
- Not taken from the L2 nits: the filter count counts top-level entries
(a nested group counts as one); a card stays a focusable `role="button"`
even on a list whose rows open nothing and take no tick.

## Overlap

`overlap-check.mjs` against main and open PRs: clean. objectstack-ai#36021 (objectstack-ai#35678)
landed first, as the seat ordered; main is merged here (c884e47, again
at 6aef25a): `listPageBarSlot.ts` and `SelectionPageBar` are gone, and
the cards' selection is objectstack-ai#36021's bar.

## Verification

- On bea8fe0 (the L1-b delta S1): `ListView.phonePanels-35884` 12 tests
pass, with a new case: ArrowDown on the first level's handle moves it
and the handle keeps focus at the new place, then ArrowUp from it moves
it back. jsdom keeps focus on a moved node where a browser drops it, so
the case blurs the handle right after each key, as a browser would;
ablated, it fails without the refocus. Type-check and eslint (0 errors)
on plugin-list.
- Unit, on 74cf9d8 (main 7dd1a2f merged at 3fe3dd6, with objectstack-ai#36069,
objectstack-ai#36026, objectstack-ai#36054, objectstack-ai#36093 and objectstack-ai#36097; full `pnpm build`): plugin-grid +
plugin-list + the click census + components `custom/` 483 files / 4,622
tests; the app-shell subset 138 files / 1,240 tests; type-check of
plugin-list and app-shell, eslint (0 errors), `check:i18n-keys` and
overlap-check clean. `check:eager-closure` locally: `ui-components`
347,610 gzipped bytes, the same as main with this branch's components
change removed. e2e `list-*` on chromium: 49 of 51 pass; the 2 that
failed are `list-no-actions-column-35554`'s "side record" cases
(objectstack-ai#35678's), which fail only when the drawer face is a worker's first
mount: the first-mount wait `getByText('商机 1')` then also matches the
side record's heading (strict mode). This branch does not touch them. On
a re-run of the three side-record cases, dark and 375 passed and light
failed again for the same reason.
- Unit, on f6a0264 (the L1-b round, main 1647fb3 merged at 6aef25a,
full `pnpm build`): grid + list 481 files / 4,607 tests; the app-shell
subset 137 files / 1,225 tests; type-check of plugin-grid, plugin-list,
app-shell and components, eslint (0 errors), `check:test-source-alias`,
`check:i18n-keys` and overlap-check (main and 6 open PRs) clean.
- Unit, on 7bea6cb (the L2 round): `pnpm exec vitest run
packages/plugin-grid packages/plugin-list` passes, 481 files and 4,602
tests; app-shell, the 137 files that import `ObjectView`, the phone page
bar, the title switcher or the selection reads pass, 1,224 tests;
type-check of plugin-grid, plugin-list and app-shell, eslint on the
changed files (0 errors), `check:test-source-alias`, `check:i18n-keys`
and overlap-check (main and 7 open PRs) are clean.
- Unit, after the merge: `pnpm exec vitest run packages/plugin-grid
packages/plugin-list packages/i18n` plus the click census pass, 587
files and 6,559 tests. app-shell: the 160 files that import or drive the
changed modules (the switcher, the switcher menu, the page header,
`AppHeader`, `ObjectView`, the FAB, the selection bar, the phone
viewport) pass, 1,259 tests. The whole package (2,357 files) is left to
CI's shards.
- New tests:
- `plugin-list/src/__tests__/ListView.phonePanels-35884.test.tsx` (11):
the pill row and no condition row; `userActions.sort: false`; sort 「✓」
writes once through `onSortChange` and the count turns 1; 「×」 writes
nothing and the sheet reopens from the list's sort; the empty filter
state; the `or` group notice; an untouched 「✓」 writes nothing (sort, and
the advanced-filter notice); with a stand-in `visualViewport` 300 px
short the sheet's bottom is 300 px and its height the visible area less
40 px, and both clear when it grows back (ablated: fails without the
inset style); the levels' two lines, handle and ⋯ name; a finger drags
the second level above the first and 「✓」 writes that order (ablated:
fails without the move).
- `plugin-grid/src/__tests__/cardSelection-35883.test.tsx` (8): a long
press with no click after it, then one tap on another card ticks that
card (ablated: fails with the flag reset after the early return);
「Select」 is offered (`useListPageSelectable`) for `multiple` and not for
`single` or `none` (ablated: fails when it follows `rowsSelectable`);
long press ticks and opens nothing, a tap adds, unticking the last ends;
a press that moves starts nothing; 「Select」 starts with none ticked and
the bar reads 0 with 「×」 alone, which ends it; a long press floats the
bar after the cards reading 1; Enter opens a card and Space toggles it
while selecting; no selection without `selection`.
- Rewritten tests:
- `ListView.phoneSortSearch-28911`: the phone search trigger's size is
now the pill's `h-11 min-w-11`.
- `ListView.phoneWidth-29074`: the same for the phone search trigger;
the Display trigger's assertion is unchanged.
- e2e `list-toolbar-view-name-phone` (objectstack-ai#33833's pin): re-pointed from the
retired phone toolbar row at the pill row. At 375 and 390, 「全部客户」 and
「All Customers」 are whole on one row with three 44 px pills. At 320,
「全部客户」 is whole and a longer name truncates while the pills stay on
screen. A viewport meta is added so the mobile projects lay out at the
viewport's width. `tagClass` also reads `cn(CONSTANT, '…')`.
- `app-shell/src/views/ObjectView.phoneFabSelecting-35883.test.tsx` (3):
the phone 「+」 is drawn, is not drawn while a list publishes an open
selection, and is drawn again after; ⋮ More has no 「Select」 until the
list publishes that one would open, then has it (ablated: the old
`titleSwitcher` gate fails the first).
- `components/src/__tests__/clickableNonControlCensus-13461`: the mobile
card list's BACKLOG row is deleted. The card is repaired (a control with
`role="button"`, `tabIndex={0}`, Enter / Space on its own key,
`aria-pressed` while selecting), as the backlog's deletions-only rule
asks; `cardSelection-35883` pins the keyboard path.
- i18n: `listConditions.phone.sortCount` / `.filterCount` are count
families with every CLDR slot their pack selects and a base key
(objectui#11445), in all packs and the English fallbacks.
- e2e `list-frame-geometry-35548`: the switcher's source-order check
reads the desktop trigger inside `<PopoverTrigger>`, since the phone
pill comes first in the file and draws no type icon.
- e2e, chromium, run locally: `list-toolbar-view-name-phone` (both
chromium projects), `list-frame-geometry-35548`,
`list-condition-row-35549`, `list-no-actions-column-35554`,
`list-left-edge-35663` and `list-header-narrow-35446` all pass; after
the merge every `e2e/list-*` spec passes (50).
- Browser, own backend and console, CRM 「客户」 list, 375 and 390, light
and dark: the top row, the pill row, the sort, filter and views sheets,
⋮ More, and a long press into selection. After the merge, at 375 light
and dark: 「Select」 with none ticked (「0 selected ×」), two ticked (「2
selected × Delete」), the 「+」 gone. Screenshots went to the seat.
- Keyboard, SIMULATED in Chromium at 375, light and dark
(`window.visualViewport` replaced by a stand-in 336 px shorter, a grey
block drawn where a keyboard would be): the filter value step with its
field focused and the views sheet with its search focused. Both sheets
read `data-keyboard-inset=336`, span y 40–476 (the keyboard's top), with
「✓」 at y 73–117 and the focused field above 476 (the filter value at
172–204, the views search at 355–400). Not a real device reading.
「Select」 checked in the same console: offered on the CRM 「客户」 list and
opens the bar.

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(No spec change.)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes (0 errors).
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request. (Two cards, dispatched as one PR.)
- [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: n/a.
- [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_01L6bhgXQEtN6Kp1wRKH6Fde

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
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
…es and publishes it; layout and row colour join the list draft (objectstack-ai#35955 PR 2) (objectstack-ai#36123)

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

repo:objectstack#1 · os-sales · session_01L6bhgWyeXh2Keywo6oK1Nn

Part of objectstack-ai#35955 (PR 2 of three: PR 1 objectstack-ai#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 (objectstack-ai#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 objectstack-ai#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 objectstack-ai#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 objectstack-ai#36114, objectstack-ai#36105, objectstack-ai#36096, objectstack-ai#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.com/claude-code)

https://claude.ai/code/session_01L6bhgWyeXh2Keywo6oK1Nn

---
_Generated by [Claude Code](https://claude.ai/code)_
<!-- signed: repo:objectstack#1 · os-sales ·
session_01L6bhgWyeXh2Keywo6oK1Nn -->

---------

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