Repository navigation
fix(plugin-list): key the list's scroll memory without the record drawer's parameters - #38893
Conversation
…wer's parameters Browser Back from a record opened while the side drawer was open over the list returned to an address carrying ?recordId=, whose scroll key missed the position the list had kept; the record page's close button returns without the drawer's parameters and found it. Claude-Session: https://claude.ai/code/session_01WGufzfcCk7a8bQdgyaxzu7 Co-authored-by: Claude <noreply@anthropic.com>
…s parameters; changeset Claude-Session: https://claude.ai/code/session_01WGufzfcCk7a8bQdgyaxzu7 Co-authored-by: Claude <noreply@anthropic.com>
… overridden by the drawer's open-row scroll Back to a list entry whose record drawer was open restored the loaded rows and the scroll position, then the drawer scrolled its open row into view over it. The list marks a mount that returns to a kept position, and the open-row scroll skips the drawer's first record there; a row click or a step to another record scrolls as before. Claude-Session: https://claude.ai/code/session_01WGufzfcCk7a8bQdgyaxzu7 Co-authored-by: Claude <noreply@anthropic.com>
…he drawer's open-row scroll Claude-Session: https://claude.ai/code/session_01WGufzfcCk7a8bQdgyaxzu7 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzfcCk7a8bQdgyaxzu7 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzfcCk7a8bQdgyaxzu7 Final head for review · 2026-12-01T11:52Z · zone osa-ux: Points to judge: (1) round 1: the scroll key in |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm L1 review · PR #38893 (#37029) · head 2cf4cc5 · 2026-12-01T11:54ZACCEPT. The PR is not governed and is What I checked:
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzfcCk7a8bQdgyaxzu7 Landing · 2026-12-01T11:55Z · zone osa-ux · head
State: ready + auto-merge; |
Requested by Yibo Wang · project thread
Fixes #37029
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
A scroll-loaded list keeps its position, and the number of rows it held, in session storage under
os:list-scroll:plus a key: the object name, then the address bar's path and query, read once when the list mounts. Browser Back failed to return there in two ways, both tied to the record drawer that opens over the list.1. The key carried the drawer's parameters (
ui/packages/plugin-list/src/ListView.tsx, thescrollRestoreKeyinitializer). The drawer adds?recordId=(and?recordObject=) without remounting the list. A record opened while the drawer was open leaves a history entry that carries the drawer. Back returned to that entry and computed a different key, so it missed the kept position: first window, top of the list. ✕ returns to the list's address without the drawer (app-shelllistOriginOf) and found it. A list that first mounted under an open drawer lost its position on every return. The key now dropsrecordIdandrecordObject(app-shell'sRECORD_DRAWER_PARAM/RECORD_DRAWER_OBJECT_PARAM) and keeps every other parameter, because those can change which rows the list shows.2. The drawer's open-row scroll ran over the restored position (
ui/packages/components/src/custom/record-list-face.tsx,useScrollActiveListRecordIntoView). On Back to a drawer-open entry, the grid restored scrollTop 1840, and about 17 ms later the drawer scrolled its record's row into view (scrollTop 72). Now:ListViewmount that returns to a kept position marks its root withdata-list-kept-position.Governing ruling: #30850 letter A, "if it loads on scroll, the PR restores the batch or scroll position too". Zone answer A on the card (claim amendment 7308936914): Back restores what ✕ restores.
Read first (riskiest first):
record-list-face.tsx: the store'sisOnlyRecordOpenedand the guard inuseScrollActiveListRecordIntoView. This changes when the drawer scrolls the list.ListView.tsx: thescrollRestoreKeyinitializer andreturnsToKeptPosition, the root mark.ui/packages/components/src/__tests__/record-list-face-37029.test.tsx: both sides of the guard.Tests
ListView.backScrollKey-37029.test.tsx: 5 cases.record-list-face-37029.test.tsx: 4 cases.scripts/ablation-replace.mjs. Every mutation landed and was restored to the HEAD blob with an emptygit diff HEAD.params.deletelines givesTests 3 failed (3).useScrollActiveListRecordIntoViewgives2 failed | 2 passed; the deep-link and click cases stay green.1 failed | 3 passed(the way back).1 failed | 4 passed.vitest and type-check readings
pnpm --dir ui exec vitest run --maxWorkers=2over the two new files plusListView.infiniteRereadPageCap-35554,record-list-face-27545andnavigation-overlay-drawer-27545:Test Files 5 passed (5),Tests 31 passed (31). The verify lock reads command-exit 0.pnpm --filter @object-ui/components type-check && pnpm --filter @object-ui/plugin-list type-check: command-exit 0. The new components test is in itstsconfig.test.jsonprogram (--listFiles: 1).Acceptance notes
Real app. Setup: showcase backend (
--fresh) and the Vite console, Chromium 1243, 1280x800, a fresh context per run,showcase_inquirywith 133 rows. Each run scrolls to row 60 (scrollTop 1840, 100 rows) and reads[data-table-scroll-box]. Three runs each:Intended uses after both, 3/3 each:
Switching views changes the path and remounts the list, so the key is read again. The lead about a query string that changes after mount does not reproduce for view switches; the drawer's
?recordId=is the query change that does.Two string seams are spelled twice with no pin holding the copies equal: the drawer parameter names (plugin-list vs app-shell) and
data-list-kept-position(plugin-list vs components). The current package barrels do not export them, and the barrels are outside this claim's surface.No shared harness file exists for either component, so the pins are new files named for the card, reusing the existing stub patterns. The components test sits in
src/__tests__/, the package's test directory.Verification
pnpm --dir ui exec vitest run packages/components/src/__tests__/record-list-face-37029.test.tsx packages/plugin-list/src/__tests__/ListView.backScrollKey-37029.test.tsxshould printTests 9 passed (9).Generated by Claude Code