Repository navigation
fix(console): the /data page keeps its list's search, sort, grouping and Filter panel in the address - #36571
Merged
objectstack-fleet[bot] merged 3 commits intoNov 23, 2026
Conversation
…ng and Filter panel in the address Claude-Session: https://claude.ai/code/session_01ADHkmRGDrq6JSytBsNFabU Co-authored-by: Claude <noreply@anthropic.com>
…a record's open and close, a reload and a Reset Claude-Session: https://claude.ai/code/session_01ADHkmRGDrq6JSytBsNFabU Co-authored-by: Claude <noreply@anthropic.com>
…ta-page-list-state
Contributor
Author
|
repo:objectstack#2 · os-steve · session_01ADHkmRGDrq6JSytBsNFabU 席位核对ACCEPT — PR #36571 @
|
This was referenced Nov 23, 2026
objectstack-fleet
Bot
deleted the
claude/issue-36408-data-page-list-state
branch
November 23, 2026 00:35
This was referenced Nov 23, 2026
247257110
pushed a commit
to 247257110/objectstack
that referenced
this pull request
Nov 23, 2026
…s opens the new address's list (objectstack-ai#36599) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9GPJ8pmbK219Pay95x25Uno)_ Fixes objectstack-ai#36577 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:在数据页(某个对象的 /data 页)直接跳到另一个对象的数据页时,新列表按新地址里的搜索、筛选、排序、分组和快捷筛选打开,不再沿用上一个对象的搜索。 - 为什么做:刚合入的「数据页把列表状态写进地址」留下的缺口,替从一个对象数据页直接跳到另一个对象数据页的用户补上。 - 出错会怎样:最坏是换对象时列表多重新加载一次,或换对象后列表状态读错;只影响数据页,可直接撤回本改动。 - 要你做什么:无 ## What changes `ObjectDataPage` (the bare data page, `/apps/APP/OBJECT/data`) stays mounted when the router moves from one object's data page to another's: the route element carries no key, and `AppContent` keeps the route tree up whenever the new object's metadata is already in scope (the same app's bundle). Its `ListView` was keyed on `listGeneration` alone, and `ListView` takes its search, Filter panel and `uf_FIELD` chip selections once, at mount. So the seed the page already re-read per `OBJECT~GENERATION` was written back into the address, but the list on screen kept the previous object's search and ignored the new address's. - `ListView` is now keyed on the seed key (`OBJECT~GENERATION`), the pair the seed is already read for: a new object remounts the list on the new address's seed; 「Reset」 to the source still moves the generation and remounts on an empty seed, exactly as before. - The `uf_FIELD` quick-filter chip selections (ADR-0047) are read with the seed, from the router's address, instead of once per page mount from `window.location.search` (which also handed a later object the first object's chips). A 「Reset」 seed still carries none. No props, exports or address keys change. `objectViewListUrlState.ts` and `userFilterUrlState.ts` are untouched. ## Tests New top-level `describe` in the shared harness `ObjectDataPage.openRule-35875.test.tsx` (`objectstack#36577 — moving straight from one object's data page to another's …`), driving the real page and `ListView` under a `MemoryRouter`, navigating with `useNavigate` (no reload): 1. `/data/demo_account?uf__search=Acm` → `/data/demo_contact?uf__search=Glo&uf_stage=won`: the contact list queries `$search: "Glo"` with the `stage = won` chip in `$filter`, the toolbar keyword is `Glo`, and the address keeps both. 2. `/data/demo_account?uf__search=Acm` → `/data/demo_contact`: no contact query carries a search, no keyword is drawn, no `uf__search` is written. No existing test was changed. ## Acceptance notes - Measured on `origin/main` c0eecb1 (after PR objectstack-ai#36571), before the fix, in the harness above: after the switch the address read `?uf__search=Glo&uf_stage=won`, while both `demo_contact` list queries carried `$search: "Acm"` and no `stage` condition, and the toolbar keyword read `Acm`. The card's premise holds. - In the running console the page stays mounted only when the new object is already in the route's object scope (no metadata wait between the two routes); when `AppContent` shows the route skeleton in between, the page remounted and read the address anyway. The harness reading is the mounted case; no browser run was made. - `ui/packages/app-shell` has 2414 test files; the full package suite is far beyond one foreground run here and is left to CI (`Test UI`). Run locally: every `ObjectDataPage*.test.tsx` and every app-shell test file naming `ObjectDataPage`. ## Verification <details><summary>Measurement before the fix (origin/main c0eecb1)</summary> ``` READING {"pathname":"/apps/sales/demo_contact/data","search":"?uf__search=Glo&uf_stage=won","contactQueries":[{"$search":"Acm"},{"$search":"Acm"}],"keyword":"Acm"} ``` </details> <details><summary>Tests after the fix (HEAD b79c0e9)</summary> ``` ObjectDataPage.openRule-35875.test.tsx Test Files 1 passed (1) · Tests 17 passed (17) ObjectDataPage*.test.tsx Test Files 9 passed (9) · Tests 98 passed (98) app-shell tests naming ObjectDataPage Test Files 24 passed (24) · Tests 305 passed (305) pnpm --filter @object-ui/app-shell type-check exit 0 ``` </details> <details><summary>Ablation: key the list on the generation again</summary> `scripts/ablation-replace.mjs`, anchor `key={listSeedKey}` → `key={listGeneration}` (anchor 1 → 0, replacement 0 → 1, blob 31d1f7d → 3a349549): ``` × a search and a chip on the new address … — expected 'Acm' to be 'Glo' × a new address with no list state … — expected 'Acm' to be undefined Tests 2 failed | 15 skipped (17) ``` Restored: blob after restore 31d1f7d == HEAD, `git diff HEAD` empty. </details> <details><summary>Derived gates (HEAD b79c0e9)</summary> ``` node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0 node scripts/check-adr-0087-registration.mjs --self-test :: exit 0 node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0 node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/check-empty-changeset.mjs --base origin/main :: exit 0 node scripts/check-empty-changeset.mjs --self-test :: exit 0 node scripts/check-sdui-manifest.mjs :: exit 0 node scripts/check-sdui-manifest.mjs --self-test :: exit 0 node scripts/ci/snapshot-next.mjs --self-test :: exit 0 node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0 node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0 node scripts/release-pending-publish.mjs --self-test :: exit 0 pnpm --dir ui exec vitest run scripts/ :: exit 0 pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit 0 pnpm check:adr-anchors :: exit 0 pnpm check:changeset-gate-self-tests :: exit 0 pnpm check:closed-ceremony-text :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:dispatcher-error-vocabulary :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:engine-double-contract :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:published-files :: exit 0 pnpm check:query-options-erasure :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:registry-log-declared :: exit 0 pnpm check:rest-log-spy-declared :: exit 0 pnpm check:skill-identifier-liveness :: exit 0 pnpm check:test-source-alias :: exit 0 pnpm check:tier-file-adoption :: exit 0 pnpm check:type-check-coverage :: exit 0 pnpm check:type-check-debt :: exit 0 pnpm check:undeclared-dep-imports :: exit 0 pnpm check:watch-hint-literal :: exit 0 pnpm check:where-matcher :: exit 0 node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran … :: exit 0 Run reconciliation — 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN. node scripts/pm/overlap-check.mjs --branch=claude/issue-36577-data-page-object-switch :: VERDICT clean exit 0 ``` </details> Read first: `ObjectDataPage.tsx` — the `ListView` `key` and the seed's `userFilterSelections` (risk: a remount loop if the key changed on every render; it changes only with the object or a 「Reset」). Two-minute check: `cd ui && pnpm exec vitest run packages/app-shell/src/views/ObjectDataPage.openRule-35875.test.tsx -t 36577` — two passing cases. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steve · project thread
Fixes #36408
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
ObjectDataPage(/apps/APP/OBJECT/data) now keeps its list's own state in the address, under the keysObjectViewalready uses and through the same reader and writer (parseListStateParams/applyListStateParamsfromuserFilterUrlState.ts, reused unchanged;objectViewListUrlState.tsis not touched):uf__searchinitialSearchTermonSearchChange, replaceuf__sortschema.sortonSortChange, replace; an emptied sort deletes the param (no sort is this page's default)uf__groupschema.groupingonGroupingChange, replaceuf__filterinitialFiltersonFilterChange, replaceOpening a record already carried the page's address as the record page's origin (
listOriginOf), so its close, a reload and a copied link now open the list as the reader left it./datahas no pager (measured in #36299's report), souf__pageis not wired.The design point, as settled in the claim (two layers, no new spelling).
filter[...]stays the page's own address conditions: the removable 「Filtered by」 tags, what 「Reset」 puts back to the source, and what "Save as view" saves (unchanged here).uf__filteris the Filter panel on top of them, exactly asObjectViewkeeps its panel on top of the view's filter.ListViewapplies both (the conditions AND the panel); nothing writes one from the other. No case was measured where the two layers conflict: a panel condition on the same field as afilter[...]tag simply narrows further (AND), the same as a panel condition over a view filter on the object list.Seed. The state is read from the address once per object and list generation (the
ListViewprops it feeds are one-shot), throughObjectView's field gate (a field the object does not declare, or one the reader cannot read once permissions are loaded, is dropped), and auf__filterthat loses any condition to the checks is refused whole withObjectView's notice (console.objectView.linkFilterRefused, objectstack#31869's posture). The seed is then written back (replace) so the address shows what the list shows. UnlikeObjectView(objectstack#35955), a reload is not a reset here:/datahas no view to return to and no draft store, and the card's acceptance asks for reload survival.viewDefaults.schema.sort/schema.groupingnow carry the address's state, so the page handsListViewits own defaults apart (DATA_PAGE_LIST_DEFAULTS: no sort, no grouping; hidden fields and row height left unset, which is what the page's schema already had). The list therefore still draws no 「Reset to default」 for a sort nobody declared, and judges a reader-added grouping level as the reader's.resetToSource(the PM's mechanism assumption, measured).resetToSourceandconditionsAreSourcedmatch theuf_prefix, so theuf__*keys are cleared by 「Reset」 and counted by its enabled state, as the claim assumed. That is the wanted behaviour (back to the list as the related list opened it), but clearing the address alone was not enough:ListViewtakes its search and panel once, at mount, so the list kept applying a search the address no longer carried. 「Reset」 now also moves a list generation (keyonListView), so the list remounts on an empty seed with no search, sort, grouping, panel or quick-filter selection. That seed deliberately writes nothing back: the router commits the reset's navigation in a transition, and a write-back from the render that still read the old location put the removedfilter[status]back (caught by the Reset pin below before the fix).The L567 comment. Its intent was #2251's "nothing here writes back to any saved view": the schema-level
onSortChange/onFilterChangehooks are the onesObjectView's relay uses to persist a view. That stays true; the comment now says the list's own changes go to the address only, throughListView's host callbacks.Files to read first, by risk:
ui/packages/app-shell/src/views/ObjectDataPage.tsx— the seed block (listSeedRef, the write-back effect and its reset skip), thenresetToSource.ui/packages/app-shell/src/views/ObjectDataPage.tsx— theListViewprops (key,viewDefaults, the four callbacks) and the schema'ssort/groupingrungs.ui/packages/app-shell/src/views/ObjectDataPage.openRule-35875.test.tsx— the new top-leveldescribe.Tests
The pins go into the page's existing open/close harness (
ObjectDataPage.openRule-35875.test.tsx) as one new top-leveldescribe, driven through the realObjectDataPage,ListViewgrid andMePermissionsProvider:uf__search, the list the close returns to still sends$searchand shows the term;filter[status],uf__search,uf__sortanduf__filter: the query carries the search, the sort, and both layers' conditions; the address keeps both layers as they came; the panel condition draws no 「Filtered by」 tag; all of it survives an open and close;uf__group: the grid asks for its groups by that field, the address keeps it;uf__filternaming an undeclared field is refused whole and leaves the address,filter[...]untouched;uf__searchleaves the address and the list stops searching;No existing test was changed.
Runs
cd ui && pnpm exec vitest run --maxWorkers=2 packages/app-shell/src/views/ObjectDataPage(underos-verify-lock, after theorigin/mainmerge, head1a95ac7a):Test Files 9 passed (9),Tests 96 passed (96)(89 before this PR, all still green).onSearchChange={(search: string) => writeListUrlState({ search })}replaced byonSearchChange={() => undefined}throughscripts/ablation-replace.mjs(anchor x1 -> x0, blob b524303191dd -> d168962bdeb0):× a search, then a record opened and closed: the search is still applied,Tests 1 failed | 6 passed | 8 skipped; restored, blob == HEAD,git diff HEADempty. The test imports the page from source, so no build stands between the mutation and the run.pnpm run type-checkinui/packages/app-shell(bothtsc --noEmitandtsconfig.test.json, whoseincludeissrc/**/*.test.ts(x), so the new pins are compiled), after building the@object-ui/app-shell^...closure (68/68): exit 0, underos-verify-lock(VERDICT command-exit 0).Acceptance notes
ObjectView's string, which says the list "shows the view without it"; on/datathere is no saved view. Not a new key, to keep this PR off the locale packs.filter[...]conditions only, as ruled; a Filter panel condition, search, sort or grouping on/datais not carried into the new view./datapage straight to another's, the page stays mounted andListViewis not remounted (unchanged here: it carries no object key), so its one-shot search and panel are not re-read from the new address; the seed for the new object's sort and grouping is. The quick-filter selections (uf_FIELD) were already captured once per page mount the same way. Console navigation reaches/datafrom a list or a related list, which mounts the page afresh.ListViewcallbacks, so they write the same params.Verification
Two minutes: open
/apps/APP/OBJECT/datain the console, type a term in the list's search, open a record by its name, press ✕ — the list comes back still searching for it, and the address bar showsuf__search=TERM; reload — still searching.Local gates at 1a95ac7
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 38 families for this diff; each was run after the last commit and every one exited 0 (check:*without the lock,pnpm --dir ui exec vitest run scripts/under it:Test Files 172 passed | 2 skipped,Tests 5127 passed | 2 skipped).--ranreconciliation:38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED.node scripts/pm/overlap-check.mjs --branch=claude/issue-36408-data-page-list-state:VERDICT clean exit 0. Every other family is CI's.https://claude.ai/code/session_01ADHkmRGDrq6JSytBsNFabU
🤖 Generated with Claude Code