Skip to content

fix(console): a related list keyed by a parent lookup no longer blanks the record page - #33780

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-dd4iyn
Nov 15, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-dd4iyn

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread

Closes #33609

Clause-②: no
Metadata-protocol: none

Seat domain:ui#2 · os-project-manager · card thread session_01FEkQ5ogAAW3KBKDyrAs5C7 · claim 6892483975, amendment 6892596732

维护者速读

  • 改了什么:记录详情页一次请求(/page)不再带上「按父记录的非 id 字段关联」的相关列表(例如订单的 selected_plan 关联的方案明细),这类列表改为自己单独读取;同时这类列表按父记录查找字段的存储 id 过滤,而不是按展开后的整条记录。
  • 为什么改:这种页面配置合法(os validate 通过),但一次请求接口只认「子记录字段存的是本记录 id」的列表,遇到别的就整单 400,整个页面显示「无法加载此记录」;下游 CRM 的订单页正中此问题(rest(record page): a record:related_list whose relationshipValueField names a lookup on the parent passes os validate, then the one-request record page refuses it with 400 invalid_relationship and the whole page fails to load #33609)。
  • 风险与回滚:只改控制台两个文件,服务端接口与 spec 均未动;按 id 关联的列表照旧随一次请求返回。代价是这类列表多一次独立读取。回滚即还原本 PR。
  • 先看:ui/packages/app-shell/src/views/recordPagePayload.ts(pageAnswersRelatedList,复用计数预取的同一规则)、ui/packages/plugin-detail/src/renderers/record-related-list.tsx(parentLinkValue 折回存储 id)。
  • 两分钟验证:在订单页放一个 relationshipValueField: 'selected_plan' 的方案明细列表,打开任一订单:页面正常显示,明细列表列出该方案的行;网络面板里 /page 请求不含该列表,另有一条按方案 id 过滤的读取。
  • 需要你做的:无,席位落地。

What changes

  • The fold-in (measured on origin/main a557fa3): recordPageRelatedLists (ui/packages/app-shell/src/views/recordPagePayload.ts, the record:related_list branch of visit) added every list with objectName + relationshipField to the one-request POST /data/{object}/{id}/page, dropping relationshipValueField. The route's contract (RecordPageRelatedRequestSchema, strict) is "the child records whose field holds this record's id", so a list keyed by another parent field made it refuse the whole request (400 VALIDATION_FAILED / invalid_relationship) and the page drew record-load-failed.
  • Fix 1, recordPagePayload.ts. A list now rides the request only when pageAnswersRelatedList says so. That is the count prefetch's own rule (relatedCountTargetOf in plugin-detail useRelatedCounts.ts), not a second copy: plugin-detail's package index does not export relatedCountTargetOf, so it is reached through the exported relatedCountTargetsIn, handed the one node as a bare { type, properties } with its child slots left out, so the walk answers for that node alone. No published export changes. A list it leaves out reads for itself through its block, as before the one-request page. The module docblock's "what the page cannot name" list names it.
  • Accepted deviation (seat, amendment 6892596732). Reusing the rule whole also leaves a list bound to a dataSource or parentDataSource of its own out of /page; those read for themselves, as the count prefetch already treats them. Pinned.
  • Fix 2, record-related-list.tsx (claim amendment 6892596732). With fix 1 alone the page renders, but the card's list still drew "Couldn't load records": the record page (and a parentDataSource parent) reads the parent with every relation $expanded, and parentLinkValue read ctx.data[relationshipValueField] raw, so the list filtered allocation_plan by the expanded { id, name } (client refusal INVALID_FILTER, "Unknown filter operator 'id' for field 'allocation_plan'", no GET sent). The value is now collapsed through core's one rule for a relation's stored value, toPredicateRecord, over the parent's field definitions (ctx.objectSchema.fields, which both the record page and ParentRecordBinding provide). A non-relation value field (name, record_id) passes through unchanged. The read stays un-cast on schema.relationshipValueField (the objectui#9475 pin is green).
  • Not changed (order ⛔): no packages/spec/**, no packages/rest/** route change, no os validate refusal.
  • Changeset .changeset/33609-related-list-parent-lookup-page.md: @object-ui/console (its dist ships the private app-shell) and @object-ui/plugin-detail, patch.

Tests

  • ui/packages/app-shell/src/views/RecordDetailView.nonIdKeyedRelatedList-33609.test.tsx:
    • rendered: the real RecordDetailView over the real ObjectStackAdapter, StrictMode, an authored page with the card's shape (order selected_plan → plan lines, relationshipValueField: 'selected_plan') beside an id-keyed task list. The transport answers /page as the route does (a related entry whose field does not reference the page object refuses the whole request 400 invalid_relationship) and serves the page record with selected_plan expanded. Pins: no record-load-failed, the record drawn; one /page request naming only the id-keyed list; the task row drawn; a GET of the plan lines filtered ["allocation_plan","=","plan-7"] and none carrying [object Object]; both plan lines drawn.
    • builder: recordPageRelatedLists leaves out a relationshipValueField: 'selected_plan' list and keeps an id-keyed one and an explicit 'id' one; leaves out dataSource- and parentDataSource-bound lists (the accepted deviation); keeps an id-keyed list under visibleWhen (as today).
  • Red first on origin/main a557fa3 (the rendered pin): record-load-failed drawn with VALIDATION_FAILED "Invalid record page request".
  • Ablations through scripts/ablation-replace.mjs on the committed fix (ui vitest aliases @object-ui/plugin-detail to src, no rebuild), marker counted on disk, each restored with the blob equal to HEAD and git diff HEAD empty:
    • fix 1 bypassed (String('ABL33609').length > 0 || before the rule): 3 failed / 1 passed (the rendered pin and both leave-out builder pins; the visibleWhen keep pin stays green, as it should);
    • fix 2 reverted to the raw ctx.data read: 1 failed / 3 passed (the rendered pin: no GET with the plan id).

Acceptance notes

  • Reach is wider than the card, by reading (not measured live): plugin-sharing sys-queue.page.ts (relationshipValueField: 'name') and plugin-audit sys-audit-log.page.ts ('record_id') declare non-id-keyed lists on shipped platform pages; fix 1 keeps them out of /page the same way.
  • Cost: one extra GET per such list on open (the pre-one-request shape), for a rare shape.
  • Follow-up, not done here (order: name it, do not do it): any OTHER 400 from /page still blanks the whole page. A cheap local degrade would be for RecordDetailView to treat a VALIDATION_FAILED on the payload as "no payload" and let each reader read for itself, as an adapter without getRecordPage does.

Verification

Gates, type-check and suites
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derives 37 families for this diff (tree 69abddd); all 37 exit 0 on 69abddd, run sequentially (exit codes captured before any pipe, record pm-orders/ui/33609-gates-ran.txt). --ran reconciliation: 37 derived, 37 run, 0 NOT-MEASURED, 0 UNRUN (a derived zero: every line carries its exit code).
  • pnpm --filter @object-ui/plugin-detail run type-check and pnpm --filter @object-ui/app-shell run type-check: exit 0 (after building the @object-ui/app-shell^... closure).
  • ESLint --no-inline-config on the three changed source and test files: exit 0, 0 errors (warnings only: no-explicit-any, the changed parentLinkValue line keeps the base line's one as any). pnpm check:new-line-citations (from ui/): 0 new citations, exit 0.
  • Suites under the lock, from ui/ with --maxWorkers=2, on 69abddd: packages/plugin-detail/ 379 files passed, 1 skipped, 3383 tests passed, 18 skipped; packages/app-shell/src/views/RecordDetailView* + recordPage* + __tests__/recordPage*: 97 files, 711 tests passed. The full app-shell suite and the rest of the farm are CI's.
  • origin/main moved 11 commits past base a557fa3; none touches a changed file, useRelatedCounts.ts, RecordDetailView.tsx or core's predicate-record.ts.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FEkQ5ogAAW3KBKDyrAs5C7


Generated by Claude Code

…id out of the record page request

The one-request record page names a related list by object and field and
answers the child records whose field holds this record's id. A list keyed
by another parent field (relationshipValueField, e.g. a parent lookup) or
bound to a data source of its own is not that question; the route refused
the whole request for it and the page drew its load-failure state.

recordPageRelatedLists now leaves such a list out by the count prefetch's
own rule (relatedCountTargetOf, reached through the exported
relatedCountTargetsIn), and the list reads for itself through its block.

Co-Authored-By: Claude <noreply@anthropic.com>
…s stored id

The record page and a parentDataSource binding read the parent with every
relation expanded, so a related list whose relationshipValueField names a
parent lookup filtered by the related record object: a refused filter and
no rows. The parent value is now collapsed through core's toPredicateRecord
over the parent's field definitions before it keys the list.

Co-Authored-By: Claude <noreply@anthropic.com>
… page

Co-Authored-By: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#2 · os-project-manager · session_01FEkQ5oF8GgTHN2jBZoDwz8

席位核对

Verdict: ACCEPT · head 69abddd7 · 2026-11-15T11:00Z

  1. Shape. Draft → main, Closes #33609. 4 files, +392/−3:

    • ui/packages/app-shell/src/views/recordPagePayload.ts: pageAnswersRelatedList keeps a record:related_list that the /page route cannot answer out of the one-request payload. It reuses the count prefetch's rule through the exported relatedCountTargetsIn, on the bare node, so there is no second copy and no new export.
    • ui/packages/plugin-detail/src/renderers/record-related-list.tsx: the parent link value is read through core's toPredicateRecord, so an $expanded relation collapses to its stored id.
    • One rendered pin file (RecordDetailView, real adapter) and one root changeset (@object-ui/console, @object-ui/plugin-detail, patch).

    All of it is on the claimed surface, as amended (amendment 1, 6892596732).

  2. Premise and fix. Before this, one related list keyed by a parent lookup (relationshipValueField other than id) 400'd the whole /page request, and the page drew 「无法加载此记录」. Measured red on a557fa38. Now:

    • The page renders, and id-keyed lists still ride the one request.
    • The lookup-keyed list reads for itself, filtered by the parent's stored id, and draws its rows.
    • Both ablations went red and were restored.
  3. Declarations. Clause-②: no (no exported symbol changes), Metadata-protocol: none, patch: right. No contract record is owed.

  4. Accepted deviation. Reusing the count rule whole also takes dataSource/parentDataSource-bound lists off /page. They read for themselves as they did before the payload existed. The deviation is pinned and named in the PR body.

  5. Noted, not filed. "Any other /page 400 blanks the whole page" is the card's general clause. The order kept it out of scope, and no second producer of such a 400 has been measured.

  6. Gates on head 69abddd7. All 55 check runs are success (42) or skipped (13). The dev's local run:

    • 37/37 derived gates exit 0;
    • type-check of plugin-detail and app-shell exit 0;
    • the suites are green.
  7. K. 11 first-parent commits since base a557fa38 (< 15): no base sync owed. Path face: not governed; 395 changed lines.

  8. Authority. Landing under the maintainer's standing authorisation 「按照 pm-dispatch 规则复核过的都授权」 (2026-10-25T11:35Z).

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 15, 2026 11:00
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit fbe349f Nov 15, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-dd4iyn branch November 15, 2026 11:50
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…LOG line, and an 18-5 page erratum (objectstack-ai#34042)

<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9EaC9kmPYBDw3v97tMkTaQu)_

Fixes objectstack-ai#33903

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:18.5.0 已发布但发布说明漏记的 11 条变更,补进 14 个包的 CHANGELOG 18.5.0 节(私有包
app-shell 补在它这次发的 18.4.1 节),删掉这 11 个 changeset 文件,并在 18-5 发布页加一节勘误。
- 为什么改:18.5.0 的版本提交 `b914e724` 没有消化这 11 个 changeset,代码已随 18.5.0 发出,但
CHANGELOG 和发布页都没写;其中 objectstack-ai#33637 是破坏性变化(`os audit verify` 遇到被两个 checkpoint
同时列出的行,现在报 `listed_twice` 并失败)。按裁决 6896138728「事后补就可以」只做补记。
- 风险与回滚:纯文字,不发布代码;删掉的 changeset 若留着,下一个版本会把它们当新变化再发一遍。回滚即 revert 本 PR。
- 先看:`content/docs/releases/v18/18-5.mdx`
的勘误节;`packages/plugins/plugin-audit/CHANGELOG.md`(破坏性那条);`packages/spec/CHANGELOG.md`(两条,其中一条进
Minor Changes)。
- 两分钟验证:`git grep -c -E '^-
(ac0b9a5|2e1e3b9|fbe349f|2673f59|0feb5ff|1e65a38|e302d32|f8f35db|e0775f7|4b5024d|81371e1):
' -- '*CHANGELOG.md'` 预期 14 个文件共 18 行;`ls .changeset/*.md | wc -l` 比
main 少 11。
- 需要你做的:无,席位落地(Check Changeset 会按规则保持红色,见下方 DELIBERATE CORRECTION)。

## What changes

`packages/*/CHANGELOG.md` and `content/docs/releases/` are
release-owned. AGENTS.md (Documentation Guardrails) routes a factual
error in a released entry, or on a releases page, to a dedicated
docs-only PR, and the maintainer's ruling on this card (comment
6896138728, verbatim: 「没必要,事后补就可以:让发布流程在版本提交之前还有没消化的 changeset
时,拒绝发正式版。」) keeps only the amendment half. This is that PR. Precedent:
objectstack-ai#33925.

The 18.5.0 version commit `b914e724` (objectstack-ai#33097) consumed 283 of the 294
changesets on its parent. The other 11 landed on `main` after the
Version Packages branch point `b76df9a6` and before the merge; each
one's adding commit is an ancestor of `b914e724`, and its file is
byte-identical on `b914e724` and on this branch's base `bc6b7ffd`.

1. **CHANGELOG entries.** Each changeset's entry is added to the release
section `b914e724` wrote for each package it names, in the stock
generator's form (`- SHA7: ` + the summary, continuation lines indented
two spaces), under the commit that added the changeset, in the `###
Minor Changes` or `### Patch Changes` list its bump names, after the
last changeset entry and before the `Updated dependencies` lines. No
dependents line is invented.
2. **The 11 changeset files are deleted**, so the next version commit
does not present them as new.
3. **The 18-5 page** gains `## Erratum — eleven changes 18.5.0 shipped
with no CHANGELOG line [#erratum]`: objectstack-ai#33637's FROM → TO and what an
operator does, one line for each of the other nine, and a pointer from
the release-facts row that said 284 were consumed. objectstack-ai#33725 is already on
the page (自动迁移, "Announced, not yet at any door"); it is checked, not
repeated.

| Changeset | Package | Added to | Commit | 18-5 page |
| :--- | :--- | :--- | :--- | :--- |
| `31908-p4b2-bounded-checkpoints` | `@objectstack/plugin-audit` | `##
18.5.0` › Patch Changes | `ac0b9a5` (objectstack-ai#33637) | Erratum, breaking: FROM →
TO, what to do, rollback note |
| `33186-managed-add-people-actions` | `@objectstack/platform-objects` |
`## 18.5.0` › Patch Changes | `2e1e3b9` (objectstack-ai#33755) | Erratum, one line |
| `33609-related-list-parent-lookup-page` | `@object-ui/console`,
`@object-ui/plugin-detail` | `## 18.5.0` › Patch Changes | `fbe349f`
(objectstack-ai#33780) | Erratum, one line |
| `33649-messaging-preferences-emitting-organization` |
`@objectstack/service-messaging` | `## 18.5.0` › Patch Changes |
`2673f59` (objectstack-ai#33779) | Erratum, one line |
| `33660-ai-model-picker-cost-multiplier` | `@objectstack/spec`,
`@object-ui/plugin-chatbot`, `@object-ui/i18n`, `@object-ui/console`;
`@object-ui/app-shell` | `## 18.5.0` › Patch Changes; app-shell `##
18.4.1` › Patch Changes | `0feb5ff` (objectstack-ai#33746) | Erratum, one line |
| `33689-ai-action-confirmation-elicited` | `@objectstack/spec` | `##
18.5.0` › Minor Changes | `1e65a38` (objectstack-ai#33725) | Already covered (自动迁移
row), not repeated |
| `33724-install-relaxes-declared-not-null` | `@objectstack/driver-sql`,
`@objectstack/cloud-connection`, `@objectstack/driver-turso` | `##
18.5.0` › Patch Changes | `e302d32` (objectstack-ai#33769) | Erratum, one line |
| `33739-scenario-runner-effort` | `@objectstack/scenarios` | `##
18.5.0` › Patch Changes | `f8f35db` (objectstack-ai#33767) | Erratum, one line |
| `33753-scenario-dates-follow-run-date` | `@objectstack/scenarios` |
`## 18.5.0` › Patch Changes | `e0775f7` (objectstack-ai#33776) | Erratum, one line |
| `33754-scenario-grader-written-date` | `@objectstack/scenarios` | `##
18.5.0` › Patch Changes | `4b5024d` (objectstack-ai#33797) | Erratum, one line |
| `a2-skills-docs-32678-32825` | `@objectstack/skills` | `## 18.5.0` ›
Patch Changes | `81371e1` (objectstack-ai#33355) | Erratum, one line |

**DELIBERATE CORRECTION.** This PR adds no changeset and deletes eleven
(`git diff --name-status` over `.changeset/*.md`: 11 × `D`, 0 × `A`).
Each deleted note is already released: its text now stands, unchanged,
as the entry named in the table above, in the 18.5.0 tarballs' release
section. Under ruling D on objectstack-ai#18375 (the Check Changeset step's route 0)
and `.claude/agents/os-dev.md`, `skip-changeset` is not applied to a PR
that deletes an existing changeset, so `Check Changeset` stays red by
design; it is not a required context. The diff publishes nothing until
the next release republishes the tarballs.

## Tests

No source changes, so no test suite moves. The CHANGELOG lines are
generated, not hand-typed: the summary parse and the stock release-line
format were re-implemented in a script and first checked against
`b914e724^`: for every changeset `b914e724` consumed among the first 60
(103 package entries), the generated text is found verbatim in that
package's CHANGELOG; the only miss is `31908-p4b2-bounded-checkpoints`,
the unconsumed one this PR adds. The script asserts, per changeset, one
adding commit, an identical blob at the tag and at the base, the release
section being the top section of the version `b914e724` gave the
package, and the entry not already present. The diff of every CHANGELOG
is insertions only.

## Acceptance notes

1. `@object-ui/app-shell` is private and `b914e724` versioned it
`18.4.1`, not `18.5.0` (the 18-5 page's release facts say so too), so
its entry goes into its `## 18.4.1` section.
2. The 18-5 page still opens with "Release status: 18.4.0 is released,
and 18.5.0 is not yet." and its release facts say no 18.5.0 tag or npm
version exists. Both are stale since the publish. Outside this card's
file surface; left for the seat (noted, not filed).
3. The changeset of objectstack-ai#33649 has no summary line, so its entry opens `-
2673f59: Clause-②: no`, as the stock generator would have written it.

## Verification

<details><summary>Premise readings, at base bc6b7ff and the 18.5.0 spec
tag = b914e72</summary>

- `git ls-tree --name-only b914e72 .changeset/` minus `README.md` and
`config.json`: 11 files, the card's list. `b914e724^` holds 294;
`b914e724` deletes 283.
- For each of the 11: `git rev-parse b914e72:PATH` equals `git
rev-parse bc6b7ff:PATH`; the adding commit (`git log --diff-filter=A`,
one per file) is an ancestor of `b914e724` (`merge-base --is-ancestor`
exit 0, after deepening the shallow clone by 800 commits). The adding
commits all fall between `b76df9a6` (the Version Packages branch point
the 18-5 page names) and `b914e724`.
- Before this PR: `listed_twice`, `ac0b9a5`, `objectstack-ai#33637` each 0 hits on
`content/docs/releases/v18/18-5.mdx`.
- The erratum's wording is read from the changeset text and
`packages/plugins/plugin-audit/src/audit-seal/verifier.ts`
(`listed_twice` fault: `checkpoint N: lists row(s) … that another
checkpoint already lists`), `content/docs/deployment/cli.mdx` § `os
audit verify` (exit 1 when two checkpoints list the same row), and the
18.5.0 entry `f4cafd5` (a late checkpoint leaves out every row a
checkpoint stored in between already lists).
</details>

<details><summary>Gates</summary>

Head `f5754612`. Derived with `node scripts/pm/dispatch-gates.mjs
--commands --repo objectstack-ai/objectstack` (no paths): 99 commands,
each run with stdin from `/dev/null` and its exit captured before any
pipe; `--ran` reconciliation: 99 derived, 99 run, 0 NOT-MEASURED, 0
UNRUN.

- 98 exit 0. Eleven of them first exited 3 (PREREQUISITE NOT MET, no
`dist/` in a fresh worktree) and were re-run exit 0 after the builds
they name, each under `scripts/pm/os-verify-lock.sh` with VERDICT
command-exit 0: the `@objectstack/lint...` closure plus the `check:i18n`
extract closure (64/64 tasks), `@objectstack/client` and `client-react`
(43/43), then `pnpm build` (119/119). Re-run:
`check:doc-formula-expressions`, `check:doc-security-posture`, spec
`check:docs`, spec `check:skill-examples`,
`check:docs-transcript-drift`, `check:i18n`, `check:dts-closure`,
`check:dual-build-cjs-loads`, `check:lean-entry-closure`,
`check:sourcemap-no-sources-content`; and `pnpm --dir ui exec vitest run
scripts/`, which first failed 22 files only on the missing
`@objectstack/spec` `dist/` and then passed (171 files passed, 2
skipped; 5,065 tests passed).
- 1 exit 1, by design: `node scripts/check-empty-changeset.mjs --base
origin/main` refuses the eleven deletions as edits of existing notes
(one `::error` per file). This is the DELIBERATE CORRECTION class
declared above; it stays red, and so does `Check Changeset`.
- Release-text gates all exit 0 on the amended tree:
`check-release-section-coverage` (plain and `--strict`),
`check:release-notes`, `check:release-page-status`,
`check-affected-docs`, `check:doc-authoring`, `check:doc-anchors`,
`check:nul-bytes`, `check-adr-0087-registration --base origin/main`.

`origin/main` moved to `159757ab` while the gates ran; the commits since
the base `bc6b7ffd` touch none of this PR's paths (they add four other
changesets), so no merge was taken.
</details>

---
_Generated by [Claude
Code](https://claude.ai/code/session_01ADHkmPfCRZtZTTC4KzLjJR)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01ADHkmPfCRZtZTTC4KzLjJR

<!-- signed: domain:devx#2 · os-steve · session_01ADHkmQTVjryTSkqydKVS6z
-->

Co-authored-by: Claude <noreply@anthropic.com>
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

1 participant