Skip to content

fix(console): moving straight from one object's data page to another's opens the new address's list - #36599

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-36577-data-page-object-switch
Nov 23, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-36577-data-page-object-switch

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
Fixes #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 fix(console): the /data page keeps its list's search, sort, grouping and Filter panel in the address #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

Measurement before the fix (origin/main c0eecb1)
READING {"pathname":"/apps/sales/demo_contact/data","search":"?uf__search=Glo&uf_stage=won","contactQueries":[{"$search":"Acm"},{"$search":"Acm"}],"keyword":"Acm"}
Tests after the fix (HEAD b79c0e9)
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
Ablation: key the list on the generation again

scripts/ablation-replace.mjs, anchor key={listSeedKey} → key={listGeneration} (anchor 1 → 0, replacement 0 → 1, blob 31d1f7d5 → 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 31d1f7d5 == HEAD, git diff HEAD empty.

Derived gates (HEAD b79c0e9)
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

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

… the object changes

The /data page keyed its ListView on the list generation alone, and ListView
reads its search, Filter panel and chips once at mount; a move straight from
one object's data page to another's keeps the page mounted, so the new
object's list kept the previous one's search and ignored its own address.
Key the list on the seed (object + generation) and read the uf_ chips with
the seed, from the router's address.

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRGDrq6JSytBsNFabU

席位核对

ACCEPT — PR #36599 @ b79c0e9adf71aaf0fcff85e73803a0c29940fc9a · card #36577 · L1 read by area s2-D itself (seat area order item 9), at 2026-11-23T02:16Z

  • Shape: draft → main; first line Fixes #36577 (measured, reproduced, keyed on the object, pinned with an object switch); no closing keyword on another card; Clause-②: no · Metadata-protocol: none in body and changeset (l1-face.mjs --pr 36599: CLEAN).
  • Premise measured first (card item 1) on origin/main c0eecb1f, in the shared harness with MemoryRouter and useNavigate, no reload: /data of demo_account?uf__search=Acm → demo_contact?uf__search=Glo&uf_stage=won left the address at the new search while both demo_contact list queries carried $search: "Acm" and no stage condition, toolbar keyword Acm. Reproduces.
  • Diff read (3 files, +128/−14): ListView is keyed on the existing seed key (OBJECT~GENERATION) instead of the generation alone, so a move to another object remounts the list on the new address's seed; the uf_<field> chip selections are read with the seed from the router's searchParams instead of once per page mount from window.location.search. 「Reset」 to source (generation bump, empty seed, no chips) is unchanged. objectViewListUrlState.ts / userFilterUrlState.ts untouched.
  • Tests: a new top-level describe (two cases) in the shared harness ObjectDataPage.openRule-35875.test.tsx; no existing test changed; all 9 ObjectDataPage* files 98/98 and 24 other app-shell files naming the page 305/305 locally. Ablation (key={listSeedKey} back to key={listGeneration}) ⇒ both new cases red, restored blob == HEAD.
  • Gates: check-runs at b79c0e9a: 39 success, 13 expected skip, 0 failed (pr-state.mjs --pr 36599); 38 derived families reconciled 0 NOT-MEASURED (/mnt/project-files/objectstack-seat2/36577-gates-ran.txt); overlap-check clean.
  • Noted, not filed: in the real console the page stays mounted only when the new object is in the route's object scope (read from AppContent, not measured in a browser); the harness reading covers that case.
  • Landing: check-governed-merges.mjs --pr 36599 ⇒ NOT governed, 142 lines ≤ 3000; no contract face ⇒ no L2 owed; K = 10 < 15 ⇒ area lands it.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 23, 2026 02:17
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit e7399fc Nov 23, 2026
53 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-36577-data-page-object-switch branch November 23, 2026 02:36
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/m 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.

/data page: switching straight from one object's /data to another's keeps the mounted list, so the new address's list state is not read

2 participants