You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a5a5312
Browse filesBrowse the repository at this point in the historyBrowse files
feat(console): keep list column widths, row height and tab order in this browser only (#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 #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 #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 #36110. Sign-out still clears them, as today.
- Related-tab column widths (`ui.record.<object>.relatedLists`): #35892.
- The spec `columnState` retirement.
## Why
Card #35955 (epic #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` (#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 #36123 (PR2
of the same card) and #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>
feat(console): a list's column widths, row height and tab order are kept in this browser only
9
+
10
+
Clause-②: no
11
+
Metadata-protocol: none
12
+
13
+
On a Console object list, the column widths a reader drags, the row height they pick and the order they give the view tabs are now kept in their own browser only, per signed-in user and object (localStorage `list-layout:<user id>:<object>`). Nothing is sent to the server: the Console no longer reads or writes the per-user list preference row `sys_user_preference``ui.list.<object>`, and its boot read of the reader's preferences no longer asks for that key family. A list opens at once, without waiting for that read.
14
+
15
+
- Another browser or device opens the list on its view's own widths, row height and tab order until the reader changes them there.
16
+
- Signing out clears these entries with the rest of this browser's Console state, as before.
17
+
- With nobody signed in, nothing is kept.
18
+
- The record page's "show empty fields" choice (`ui.record.<object>`) is unchanged and still follows the reader.
19
+
20
+
Upgrade note: what an earlier Console kept for a reader's lists is not carried over. The `ui.list.<object>` rows are no longer read, so every reader's lists open on their views' own widths, row height and tab order until they change them again. This browser's old copies (`list-state:*`, `list-filters:*` and `viewOrder:*` in localStorage) are removed on the first list the Console opens. The server rows stay where they are, unread; leaving them does no harm.
21
+
22
+
`@object-ui/data-objectstack`, `@object-ui/react` and `@objectstack/platform-objects` change only comments and a README example that named the retired key. No metadata key, value or default changes.
describe('a user\'s list state under a walled posture (objectui#12418)',()=>{
198
-
it('a header sort and a drag-reorder write no metadata and raise no error; the drag lands as one preference write, the sort as the draft',async()=>{
205
+
it('a header sort and a drag-reorder write nothing to the server and raise no error; the drag is kept in this browser, the sort as the draft',async()=>{
it('a density toggle and a Hide Fields change write no metadata and raise no error; the density lands as one preference write, the hide as the draft (objectui#12474)',async()=>{
229
+
it('a density toggle and a Hide Fields change write nothing to the server and raise no error; the density is kept in this browser, the hide as the draft (objectui#12474)',async()=>{
0 commit comments