Skip to content

fix(plugin-detail): the record strip is the declared highlights only; the path's stage and the owner show once - #28907

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-jl2pal
Nov 2, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-jl2pal

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

Fixes #28868

Clause-②: no
Metadata-protocol: none

维护者速读

What changes

  • No guessed strip. deriveHighlightFields (@object-ui/plugin-detail) returns the object's declared highlightFields minus the title field (the one resolveTitleField names), at most max, or []. The preferred-name walk (owner / owner_id first, then amount, rating, industry, …), the type filter, the system-field skip list, the gated-group skip and the retired-type gate on that walk are deleted, not kept behind a flag. The export and its signature stay. statusField is accepted and no longer read; the docblock says so.

  • The three readers follow it.

    • The default page (buildDefaultHighlights, and the body's hideFields) asks it as before. An undeclared object now gets no record:highlights node and an empty hide list.
    • The phone header (recordPhoneHeader.ts) uses declared ?? []: no strip and no subtitle when nothing is declared, as on any width.
    • The hover card (RecordPreviewCard.tsx) asks deriveHighlightFields(def, null), so an undeclared object shows the title alone. With no key field it now sends no $expand. buildExpandFields reads an empty column list as "every reference field", which the card would never draw. The new card test caught this.
  • The stage once. buildDefaultPageSchema reads the strip it actually placed: the default one, or an authored highlights slot. When that strip holds a record:path, its statusField joins the Details body's hideFields. buildDefaultTabs on its own hides what the default strip for the same options draws. Two private helpers do this, drawnPathField and headerDrawnFields. No public type moves: the exported buildDefaultTabs keeps its options type, and the page builder calls a private synthTabs with the computed list.

  • The body's hide list is cut at six too (a bounded in-place fix, same defect class). The strip has always drawn at most six, but buildDefaultTabs hid the whole list RecordDetailView passes in. So a declared seventh or eighth entry was drawn by neither the strip nor the body. headerDrawnFields cuts at RECORD_HIGHLIGHTS_MAX. The fix is pinned, and its ablation goes red.

  • The owner once. RecordMetaFooter leaves the owner out of the meta line when deriveHighlightFields(objectSchema, null) holds owner_id. Otherwise it keeps it.

  • One word for the owner. The ui key detail.owner and the spec's system-field label of owner_id (SYSTEM_FIELD_LABELS in packages/spec/src/system/i18n-resolver.ts) now say the same word in every language both declare:

    Language detail.owner (ui pack) owner_id (spec) Change
    en Owner Owner none
    zh-CN 负责人 负责人 (was 所有者) spec value
    ja-JP 所有者 所有者 none
    es-ES Propietario Propietario none
    ko, de, fr, pt, ru, ar 소유자, Inhaber, Propriétaire, Proprietário, Владелец, المالك (no spec row) none

    The seat chose 「负责人」 for zh: the person who follows the record up. Every other language keeps the word its ui pack already uses. None of them is wrong for a record's owner. "Inhaber" is the common German CRM term (Datensatzinhaber). No ui pack value changes. A label an author wrote is still never overridden.

Tests

  • New: synth/__tests__/highlights-declaredOnly-28868.test.ts, 11 cases, rules 1–3.
    • The card's account (industry, revenue, website, owner, no declared list) gets no strip and an empty body hide list.
    • A declared list is drawn exactly, minus the title, and the body hides exactly those fields. A declared entry past the sixth stays in the body.
    • An opportunity with a path hides stage from the body. Controls: stageField: false, and a status field with no stages. An authored highlights slot with a path hides the stage, and one without a path does not. buildDefaultTabs on its own follows the same rule.
  • New: __tests__/RecordMetaFooter.ownerOnce-28868.test.tsx, 8 cases, rules 3 (owner) and 4 (one word). A declared strip naming owner_id drops the owner from the meta line. With no owner_id in the strip, or no strip at all, the owner stays. For en / zh-CN / ja-JP / es-ES, translateObject's owner_id label equals the matching ui pack's detail.owner. 负责人 and Owner are pinned by name.
  • Hover card and phone header. RecordPreviewCard.test.tsx gains "an object that declares no highlightFields shows the title alone". It asserts no guessed field and a bare findOne with no $expand. In recordPagePush-27058.test.tsx, the "no declared highlights" case now asserts { subtitle: '', highlightFields: [] } instead of "derived, at most four".
  • Tests that pinned today's guess, changed:
    • __tests__/buildDefaultPageSchema.retiredFieldType.test.ts is deleted. It pinned the retired-type gate on the two selection passes, and both passes are gone. A retired type is still refused loudly by the form, inline edit and the body (InlineFieldInput.retiredFieldType.test.tsx and the field widgets).
    • deriveHighlightFields.groupGate-12720.test.ts is rewritten. An undeclared object has no strip at all, a declared gated entry is left as written, and the page body hides nothing and draws the gated group.
    • buildDefaultPageSchema.test.ts: the four heuristic cases become one "nothing is guessed" case, and the title-skip case now uses a declared list. The retired compactLayout case now expects []. Three page and sub-builder cases use a declaredLeadDef, and the unused getRecordDisplayName import is dropped.
    • In buildDefaultPageSchema.strictPayload.test.ts and record-highlights.groupGate-12720.test.tsx, the fixtures declare the strip they render.
    • In resolveTitleField.sharedLadder-7287.test.ts, three strip cases declare their fields, so the title skip still decides.
  • The label pins move from 所有者 to 负责人: spec i18n-resolver.test.ts (the custom-label case now uses 客户经理, so it still proves an author's label wins), rest meta-object-injected-column-i18n.test.ts, and the app-shell DraftChangesPanel.generatedGroup-25890.test.tsx fixture that mirrors the read.

Acceptance notes

Verification

All readings are on this branch. The final head is f8e75710, a merge of main (11 commits, none touching this diff's files except an unrelated cancelText hunk in i18n-resolver.ts), unless a block names another head.

plugin-detail · 362 of 362 files

Run at d57d0f80 + fixture commits (208ff9bd, 68776a00) under os-verify-lock, --maxWorkers=2, in four batches:

  • src/synth + src/renderers: 126 files. First run 3 files / 7 tests red, all fixtures that relied on the guess to draw a strip: strictPayload coverage, three buildDefaultPageSchema.test.ts page cases, and the three record-highlights.groupGate-12720 legs. After the fixtures declare their strip: 17/17 re-run, 204 tests.
  • src/__tests__ first half: 113 passed, 835 tests.
  • src/__tests__ second half: 112 passed, 1 skipped, 982 tests.
  • The package root files plus the new footer test: 11 passed, 83 tests.
app-shell and console · every test naming the record page, the strip, the hover card, the phone header or the footer · 265 files

git grep -l over packages/app-shell/src/**/*.test.ts* and apps/console/src/**/*.test.ts* for the touched modules, record:highlights, highlightFields, RecordMetaFooter and 所有者 gave 265 files. Two batches at --maxWorkers=3: 138/138 files (1380 tests), then 127 files with 1 red. The red was the new hover-card pin: an undeclared object sent $expand: ['account']. Fixed in d4833e5a, and record-preview/ re-ran 3/3 files, 43 tests. This is a declared narrowing; CI's Test UI runs the rest of app-shell.

At the merged head: plugin-detail synth/, the new footer test, recordPageV3Face-27055, record-highlights.groupGate-12720 and the 20 app-shell files naming phoneRecordHeader / RecordPreviewCard / RecordMetaFooter / highlightFields / the phone record page: 39/39 files, 421 tests.

spec and rest label pins

pnpm --filter @objectstack/spec exec vitest run src/system/i18n-resolver.test.ts src/system/i18n-resolver.object-validations.test.ts: 2/2 files, 386 tests. pnpm --filter @objectstack/rest exec vitest run src/meta-object-injected-column-i18n.test.ts: 1/1, 4 tests. pnpm --filter @objectstack/spec check:generated at the merged head: exit 0, every generated artifact up to date (a label value moves none).

Ablations · 7 legs, all red as predicted

Each leg went through scripts/ablation-replace.mjs against the committed fix. Each restore read blob == HEAD with git diff HEAD empty.

  1. The guess put back (undeclared → the first fields): 8 of 11 cases in highlights-declaredOnly-28868 red.
  2. The path's stage not pushed into the hide list: 3 red (path page, authored slot, buildDefaultTabs).
  3. The hide list not cut at six: 1 red (the past-sixth case).
  4. The footer ignoring the strip: 1 red (strip naming owner_id).
  5. The hover card expanding with no key field: 1 red (the new card case).
  6. The phone header guessing again: 1 red (the no-declared case).
  7. The spec label back to 所有者: 4 red in spec i18n-resolver.test.ts.

The ui cross-package pin (detail.owner equals the spec label) reads @objectstack/spec's dist, so leg 7 was run on the spec's own suite, which reads source.

Type check

pnpm --filter @object-ui/plugin-detail run type-check && pnpm --filter @object-ui/app-shell run type-check (each tsc --noEmit plus tsc -p tsconfig.test.json): exit 0, both before and after the merge. Each run followed turbo run build --filter='@object-ui/app-shell^...' (64 tasks).

Derived gates · 83 commands

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 83 commands at d4833e5a:

  • 81 exited 0.
  • check-plugin-teardown-shape.mjs --self-test exited 3 because a shallow clone could not read its pinned fixture. After git fetch --depth=1 origin 621a4876… it exited 0 (48 cases).
  • pnpm check:dual-build-cjs-loads exited 3, "Run pnpm build first … nothing was measured", because 30 packages outside this diff's closure have no dist. NOT MEASURED locally; CI's Lint & Repo Gates runs it.
  • pnpm --dir ui exec vitest run scripts/ ran after a spec rebuild: 169 files passed, 2 skipped; 4900 tests.

Re-run at the merged head, each exit 0: check-sdui-manifest.mjs, check:nul-bytes, check:cross-package-test-inputs, check:test-source-alias, check-empty-changeset.mjs --base origin/main, check:issue-citations and check:doc-authoring. pnpm --dir ui run check:new-line-citations found 0 new citations.

PR-body gates

Run with this body as GITHUB_EVENT_PATH (or PR_BODY), before the create, each exit 0:

  • check-changeset-no-major.mjs --base origin/main, which reads Metadata-protocol: none and a patch changeset;
  • check-adr-0087-registration.mjs --base origin/main, which found 1 non-breaking changeset;
  • check-closing-keyword-parity.mjs;
  • check-partof-closing-keyword.mjs.

Diff: 19 files, about 1,000 changed lines, under the 3,000-line line.


Generated by Claude Code

… the path's stage and the owner show once

An object that declares no highlightFields gets no strip on the default
page, the phone header or the hover card, so every field stays in the body.
The stage field leaves the body when the page draws record:path for it, the
meta line leaves the owner out when the strip carries it, and owner_id reads
负责人 in zh-CN, the word the ui pack already uses.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jU8qzB9Vbw2NdbFxiG
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation protocol:system tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/spec, touching 1 documentable anchor(s).

33 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 5e1b9b0a7748b81083c873c8a05c7505bb6000c4.

⛔ 3 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • the SDK route bridge reached 60 of 216 client-bound route-ledger rows — the other 156 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 156: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 101 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 168 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 5e1b9b0a7748b81083c873c8a05c7505bb6000c4 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from af80c4bf9f7022eb5f3b949ba208e2c31a93044d — the merge of head f8e75710a5a8abd827e32a4da390af79f12be121 into base 5e1b9b0a7748b81083c873c8a05c7505bb6000c4, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin af80c4bf9f7022eb5f3b949ba208e2c31a93044d && git checkout af80c4bf9f7022eb5f3b949ba208e2c31a93044d
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 5e1b9b0a7748b81083c873c8a05c7505bb6000c4 f8e75710a5a8abd827e32a4da390af79f12be121 && git checkout -B drift-repro 5e1b9b0a7748b81083c873c8a05c7505bb6000c4 && git merge --no-ff f8e75710a5a8abd827e32a4da390af79f12be121

node scripts/docs-audit/affected-docs.mjs --json 5e1b9b0a7748b81083c873c8a05c7505bb6000c4

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 5e1b9b0a7748b81083c873c8a05c7505bb6000c4 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#4 · zhuangjianguo · session_01QsR2jR7ZFkpqmm4U8S1f9y

席位核对 · ACCEPT · 2026-11-02T04:25Z

Head-sha: f8e75710a5a8abd827e32a4da390af79f12be121

  • Shape: draft → main, first content line Fixes #28868, no other card number beside a closing keyword. 19 files, +493 / −502 (995 lines ≤ 3000). No governed path: check-governed-merges --pr 28907 hit 0 of 19 paths. Author objectstack-fleet[bot]. Clause-②: no and Metadata-protocol: none are line-initial in the body and the changeset, as claimed.
  • File surface: inside the claim. The source changes are buildDefaultPageSchema.ts, RecordMetaFooter.tsx, recordPhoneHeader.ts, RecordPreviewCard.tsx and the owner_id zh-CN value in i18n-resolver.ts. Every other file is a test that pins the old guess or the old label (the spec and rest label tests are among them), or the changeset. buildDefaultPageSchema.retiredFieldType.test.ts is deleted, because it pinned the retired-type gate on the two guess passes and both passes are gone. A retired type is still refused by the form, inline edit and the body. No ui pack value moved: en, ja and es already matched, and zh detail.owner was 负责人 already.
  • Wanted, read in the diff:
    1. No guessed strip. deriveHighlightFields keeps its export and signature, and returns the declared list minus the title field (max 6) or []. The preferred-name walk is deleted, not flagged. The default page, the phone header (declared ?? []) and the hover card follow it. The hover card no longer asks $expand when it has no key field.
    2. Stage once. When the page draws record:path, its statusField joins the body's hideFields. In-place fix: the hide list is cut at 6, so a declared 7th or 8th entry is no longer hidden from the body while the strip doesn't draw it.
    3. Owner once. The meta line leaves the owner out when the declared strip holds owner_id.
    4. One word. The spec owner_id label in zh-CN is now 负责人, the same as the ui key. No new metadata key and no new gate.
  • Finding, filed by the seat: on a phone, an owner_id declared 5th or 6th is named in neither the phone header nor the meta line. That is now Record page on a phone: an owner_id declared 5th or 6th in highlightFields is shown neither in the phone header nor in the meta line #28909 (p3, pm:queue). Its fix needs RecordDetailView.tsx, which domain:ui#1 holds for console phone record page: two bars stacked (app bar + record top bar) and the app bar repeats the record name — where do the app menu, search, notifications and account go? #28483.
  • Gates (check-runs on this head): 56 success, 8 skipped, 0 failed or pending. All ten required contexts succeeded.
  • Tests: new highlights-declaredOnly-28868 (11) and RecordMetaFooter.ownerOnce-28868 (8). Seven ablations, each red as predicted, then restored. Locally: plugin-detail 362/362 files, the app-shell and console set 265 files, spec 386 tests and rest 4 tests passed. At the merged head, 39 files / 421 tests passed and check:generated exited 0. Derived gates: 82 of 83 ran with exit 0; check:dual-build-cjs-loads was NOT MEASURED locally and is covered by CI.
  • Consequence named by the card: app-crm would lose its strip, but examples/app-crm: metadata hygiene on the accepted preview surface — zh-CN translations, pluralLabels without 「列表」, declared highlightFields, contact nameField full_name, assigned_to as a user lookup, seed and dashboard copy #28870 (PR fix(example-crm): full-name contact titles, a complete zh-CN bundle, declared highlight strips and a user-typed lead owner #28886, 9a9823d9) has already landed its declarations, so app-crm keeps a declared strip.
  • Landing: ordinary queue landing, pr_ready then automerge_enable. Fixes #28868 closes the card on merge.

Generated by Claude Code

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 protocol:system size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

1 participant