Repository navigation
feat(grid): a lookup chip in a list cell opens its record in the side drawer; lookup cells draw an edit button (#36015) - #36128
Conversation
… drawer; lookup cells draw an edit button (#36015) On the console's list page a single click on a lookup chip opens the record it names in the list's side drawer (`?recordId=&recordObject=`), the list and its selection kept; a click beside the chip only selects. A lookup cell draws a pencil on hover and while selected, through the same edit gate as a double-click. Person chips (lookups to sys_user) keep #36033's behaviour. Also corrects #36033's pending changeset and the plugin-grid docs, which said every lookup chip only selects. Claude-Session: https://claude.ai/code/session_01L6bhgWkLah49N6UoD4CS3S Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4 席位核对 — ACCEPT (L1-b)Head-sha b59bf99 · read 2026-11-21T15:33Z · first L1 record on this PR, full read · base 维护者速读您改卡要的三件事都按卡做到了:在列表里单击关联记录的小标签,右侧抽屉打开那条记录(另一个对象的也可以),列表不动;关联格悬停或选中时出现铅笔,点了进入编辑;人员标签仍然只选中。抽屉的地址里带上了记录和它的对象,所以刷新后抽屉还在,按后退会关上。只有一处建议落地前修:在小标签上双击,会把同一个地址连着记两次,之后要按两次后退抽屉才关,和发版说明里「按后退关掉」不符。修起来只要一两行。#36033 那份还没发版的说明里,补了一句关于关联标签的话,正好是我上次提的那处措辞,其他都没动。 Must-fixNone. Should-fix
Nits
Checked
Owed
|
…one Back closes the drawer (#36015) Both clicks of a double-click reached the select-first click capture, so the host's openRecord ran twice and the console's router pushed the same URL twice. The grid now opens a chip on a click's first press only, and the list page does not push the record its drawer already shows (a fast repeat click too). Claude-Session: https://claude.ai/code/session_01L6bhgWkLah49N6UoD4CS3S Co-authored-by: Claude <noreply@anthropic.com>
…note says what it changes for lookup chips (#36015) Claude-Session: https://claude.ai/code/session_01L6bhgWkLah49N6UoD4CS3S Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Posted 2026-11-21T22:49Z. The brief handed to the isolated declaration-face reviewer for PR #36128 (owed by Contract review brief — PR #36128 @
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4 席位核对 — delta ACCEPT (L1-b)Head-sha: 维护者速读
Must-fixNone. Should-fixNone. Prior S1 is closed. NitsNone new. For the record, a double-click on a chip now opens the drawer once and does not open the cell's editor. The pencil, Enter and the double-click beside the chip still edit. The new changeset sentence says the chip behaviour replaces the earlier "click only selects" one; this is consistent with it. Checked
Owed
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Contract reviewServed-tier: Declaration face, PR #36128 (card #36015, PR 2 of 2; PR 1 #36033 merged with ① Derived judgmentsEvery public-surface and accept-set change the diff implies:
② Semver level
③ Boundary flags
Findings:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Seat landing · 2026-11-21T22:55Z · #36015 PR 2: in a list, a single click on a lookup chip opens that record in the side drawer (any object the user can read; person chips stay as they are), and a hovered or selected lookup cell draws a pencil that opens the cell editor. Back closes the drawer once; a double click no longer pushes the record twice. This replaces #36033's "lookup chips only select" in the same release. Reviews:
Gates on this head (
The seat readies this PR and arms auto-merge in the same step. The PR carries |
…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>
…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>
…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>
Requested by Sales · project thread
repo:objectstack#1 · os-sales · session_01L6bhgWkLah49N6UoD4CS3S
Fixes #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. #36033 landed the rest of the card with
Refs #36015; this PR is the lookup-cell part and closes the card.Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
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_detailortreetype whosereferenceis notsys_user.@object-ui/fields:index.tsxReferencedRecordLink's anchor carriesdata-record-objectanddata-record-id, the record the chip names. Nothing else changes in its markup or its click.@object-ui/components:context/gridCellSelection.tsx,index.tsGridCellSelectiongains an optionalreferenceCells?: GridReferenceCells | null.GridReferenceCells(exported as a type) isisReferenceColumn(columnKey)(asked per column on every render, so it answers from the column alone) andopenRecord(objectName, recordId).@object-ui/components:renderers/complex/data-table.tsx,dataTableCellSelection.tsrecordChipAt/firstRecordChip: the record a chip (a[data-record-link][data-record-object][data-record-id]) at or around the target names.onClickCapturethat fix(grid): in a list cell a single click only selects; no copy buttons (#36015) #36033 added still cancels a plain click on the chip and selects the cell, and then callsreferenceCells.openRecordfor 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.referenceCells.openRecord; every other cell keeps fix(grid): in a list cell a single click only selects; no copy buttons (#36015) #36033's behaviour.CellEditButtonin every reference cell while no editor is open: a pencil at the cell's right edge, labelled with the existingtable.editkey, shown on cell hover (group-hover/cell) and while the cell is selected. Its click callsattemptEdit, the same gate double-click and Enter pass through. It is drawn only whenreadOnlyReasonOf(row, col)isnull; that is asked when the pointer enters the cell and when the cell becomes selected, never per render (thedescribeCellcontract). It takes no focus. A reference cell does not draw fix(grid): in a list cell a single click only selects; no copy buttons (#36015) #36033'sCellOpenButton.@object-ui/plugin-grid:ObjectGrid.tsxopenReferencedRecord?: (objectName, recordId) => void. WithcellSelectionand this prop, the grid'sGridCellSelectioncarriesreferenceCells:isReferenceColumnreads the column's field (opensReferenceInPlace: lookup / master_detail / tree, reference notsys_user),openRecordis the prop.@object-ui/plugin-list:ListView.tsxopenReferencedRecord, handed to the grid only (object-gridviews), asrecordLinkAdornmentis.@object-ui/app-shell:urlParams.ts,views/objectViewRecordNavigation.ts,ObjectView.tsx,objectViewListRenderer.tsx,objectViewRecordOverlay.tsx,recordDrawerStack.tsxRECORD_DRAWER_OBJECT_PARAM(recordObject), listed inRESERVED_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.drawerRootis 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.?recordObject=with?recordId=.expandedRecordPath); the listed object's root keeps its list-relative route and origin.?recordObject=link answers with that record's own page, as?recordId=does for the listed object.RecordStackDrawertakeslistObjectName; the list marks the root's row as active only when the root is a record of the listed object.ObjectViewpasseshandleOpenReferencedRecordonly when its list has the drawer (navOverlay.mode === 'drawer', not a phone), the same condition asopenInPanel. A list whose rows open nothing (none, a list-only object) keeps fix(grid): in a list cell a single click only selects; no copy buttons (#36015) #36033's behaviour: the chip only selects.Field types this reaches:
lookup,master_detail,treedrawn throughLookupCellRenderer/ReferencedRecordLink, when the referenced object is routable from the list (the chip is an anchor only then). Auserfield (UserCellRenderer, avatars) draws no link and is untouched.Readings (claim A–G):
openReferencedRecord(the console's object list). Every other host keeps fix(grid): in a list cell a single click only selects; no copy buttons (#36015) #36033's behaviour.sys_user) draw no pencil and keep fix(grid): in a list cell a single click only selects; no copy buttons (#36015) #36033's open button.?recordId=alone.?recordId=does (uiAGENTS.mdConvert to monorepo with scoped packages #8).Docs:
content/docs/frontend/plugins/plugin-grid.mdx§ On an object's list page (new bullet after the click bullet; the click bullet #36033 wrote now leaves out the lookup chip a host opens in place). #36033's changeset is untouched; this PR's own changeset says it (Notes, below).Notes
.changeset/36015-list-cell-click-only-selects.md, restored from the base in87d42cbd; headb59bf991..9c225b51had added a sentence to it as a declared correction, which keptCheck Changesetred). 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 inplugin-grid.mdxkeeps the L1-b N1 rewording.Tests
Added, each a top-level
describein 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 callsopenRecordwith 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 noreferenceCellsthe 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": throughObjectGridwith a routing host, the account chip carriesdata-record-object/data-record-idand a single click callsopenReferencedRecord('crm_account', 'a7')without following the link; the lookup cell's edit button opens its editor and theowner_id(lookup tosys_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,drawerRootfor 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 > 1opens nothing), andhandleOpenReferencedRecordreturns 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;openRecordis called once and no editor opens.objectViewRecordNavigation.listRows-27524.test.tsx, "the record the drawer already shows is not pushed again": nosetSearchParamsfor the record already shown, of another object or of the listed one; the same id under another object still opens.MemoryRouter(it pushes on every navigate, the same URL included); after two opens the URL names the record, and onenavigate(-1)returns to?view=all.No existing test was rewritten or dropped.
Local runs. First on main
8145424bmerged with #36033's headcefd3e31, a fullpnpm 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.dc10b3b4as one commit (conflicts only inobjectViewListRenderer.tsx's memo dependencies and the two appended describes ofObjectGrid.cellSelection-35684.test.tsx, both sides kept), then a fullpnpm buildandvitest runofcomponents/src/__tests__/data-table*,plugin-grid/src/__tests__/ObjectGrid.cellSelection*,app-shell/src/views/objectViewRecordNavigation*,app-shell/src/views/__tests__/recordDrawer*andfields/src/: 348 files passed (2 skipped).type-checkincomponents,fields,plugin-grid,plugin-list,app-shell: exit 0 (on both bases).eslinton the changed files: 0 errors.overlap-checkon the pushed headb59bf991: clean againstorigin/main(dc10b3b4, fix(grid): in a list cell a single click only selects; no copy buttons (#36015) #36033 merged) and the four open PRs sharing a file (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).87d42cbd:main6c7c6db2merged in (clean).check-empty-changesetandcheck-changeset-no-major: pass.overlap-check: clean againstmainand 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; feat(console): keep list column widths, row height and tab order in this browser only #36133 (draft) conflicts only on the one-lineuseMemodependency list inobjectViewListRenderer.tsx, which each PR extends by one name; the second to land mergesmain.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 folderbuild-seat1/36015/PR2/(after-*,after-journey.log). The before state is #36033's after state (build-seat1/36015/after-*): a chip only selected its cell.?recordId=…&recordObject=crm_account), the list stays, the cell is selectedsys_user)Acceptance notes
sys_user).Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgWkLah49N6UoD4CS3S