…ecord (objectui#7190) (objectstack-ai#10255)
Fixes objectstack-ai#7190
Clause-②: yes
## What was wrong
A `dependsOn` field edited inline on a record's detail page could never
be filled. A lookup declaring `dependsOn: ['region']` rendered
`lookup-trigger-gated`, disabled, reading "Select region first", while
the `region` it asked for was on screen, filled, in the same edit
session. A `select` / multi `select` whose field declares `dependsOn`
(options carrying per-option `visibleWhen`) was withheld the same way.
Both the details body and the highlights strip were affected. This was
measured in the real host and pinned on 2026-09-01 (PR objectstack-ai#7207), and
re-measured on this branch's base before any change (report comment
5814656189 on the card).
The widgets in `@object-ui/fields` read the record they cascade on from
one channel, the `dependentValues` prop their host passes: `LookupField`
and `useCascadingOptions` both read `dependentValues ?? {}`, with no
context fallback since objectui#7206 (ruling C). `InlineFieldInput`, the
one inline editor both record-page surfaces share, passed none.
## The change
Route A of the round-2 claim (card comment 5814689653): the call sites
pass the record, the shape the objectui#7206 ruling names.
- `packages/plugin-detail/src/InlineFieldInput.tsx` takes an optional
`dependentValues` prop (typed as a Record of string to unknown, the same
spelling and shape as the widgets' own prop). It forwards it to the
`LookupField` / `UserField` branch, to both `SelectField` branches, and
to `FieldEditWidget`, which hands it on to the option widgets it
renders.
- `packages/plugin-detail/src/DetailSection.tsx` passes its `data`.
`DetailView` already hands every section the saved record merged with
the inline draft.
- `packages/plugin-detail/src/HeaderHighlight.tsx` receives the saved
record, so it overlays `inline.draft` with the same spread `DetailView`
uses and passes that.
The record is the **staged** one. This matches the grid inline editor's
`pendingRow ?? row` (objectui#7188) and the form's live watched record.
A parent edited in the session re-scopes the child before anything is
saved, and clearing the parent re-gates the child.
`Clause-②: yes`: `InlineFieldInputProps` is exported from
`@object-ui/plugin-detail`, and gaining an optional member widens the
published surface. The seat owes a review-tier contract review before
this is enqueued. Hence the `minor` changeset.
Also in this PR:
- The real-host pin
`packages/app-shell/src/views/RecordDetailView.lookupDependsOn-7190.test.tsx`
flips from the gated reading to the enabled one. It adds the
staged-draft cases and the select / multiselect cascade, each at both
call sites, each with a live control.
- `.changeset/7190-detail-dependson-lookup-probe.md` is rewritten. Its
sentence claiming a host could populate `ctx.data` has been false since
objectui#7206. The frontmatter stays empty.
- `.changeset/7190-detail-inline-dependent-values.md` declares
`'@object-ui/plugin-detail': minor`.
## Evidence (all at HEAD `cfd1f8c5`, run from the repo root, heavy runs
through the shared verify lock)
**Pins first, on the unfixed tree** (test file edited, source
unchanged): `Tests 8 failed (8)`.
- The lookup cases failed at `expect(gated).toBeNull()`, because the
gated trigger was present.
- The staged cases failed waiting for the declared trigger.
- The option cases got past both control assertions
(`select-trigger-tier_any` present, the `tags_any` chips `gold, silver`)
and failed at `select-empty-tier` being present.
That last reading is the select cascade's render measurement: it was
gated the same way, at both call sites, beside live controls. So the
same prop is forwarded to `SelectField`.
**After the change:** `Tests 8 passed (8)`, 4 cases × 2 call sites.
- **Lookup:** the declared lookup is enabled and its query carries
`$filter {region: emea}`. The control is enabled.
- **Staged lookup:** clearing `region` in the draft re-gates the lookup
("Select region first"), and the control stays enabled. Staging `apac`
unlocks it and it queries `{region: apac}`. `update` is never called.
- **Options:** the declared single select is ungated. The declared multi
select offers only `gold`, the region's option. The controls offer both
values.
- **Staged options:** staging `apac` re-scopes the multi select to
`silver`. Clearing `region` re-gates both declared selects. The controls
are unchanged.
**Ablation, one leg per call site, on the committed fix.** Each mutation
goes through `ablation-replace` with the anchor count verified and the
blob change verified. Each restore is proven by state: blob equals HEAD,
`git diff HEAD` is 0 bytes, `git status --porcelain` is empty. Package
resolution is source-aliased in `vitest.config.mts` and no `dist/` was
present, so no rebuild legs were needed.
| leg | mutation | predicted | observed |
|---|---|---|---|
| A | delete `DetailSection`'s `dependentValues={data}` | 4 BODY fail, 4
STRIP pass | `4 failed, 4 passed`, exactly the BODY four |
| B | delete `HeaderHighlight`'s `dependentValues={stagedRecord}` | 4
STRIP fail, 4 BODY pass | `4 failed, 4 passed`, exactly the STRIP four |
| C | `SelectField` forwards (both branches) set to `undefined` | 4
option fail, 4 lookup pass | `4 failed, 4 passed`, exactly the option
four |
| D | `HeaderHighlight` passes the saved `data` instead of the draft
overlay | 2 STRIP staged fail | `2 failed, 6 passed`, exactly the two
STRIP staged cases |
Leg C's first spelling was refused by `ablation-replace` and ran
nothing. Its replacement text also occurs at the `BooleanField` branch,
so the planted-count check could not move. It was re-run with a distinct
replacement, and that run is the one in the table.
**Type-check:** the dependency closure was built first (`turbo run build
--filter=@object-ui/app-shell^...`, 28/28 tasks). Then `pnpm --filter
@object-ui/plugin-detail run type-check` and `pnpm --filter
@object-ui/app-shell run type-check` were both run, each `tsc --noEmit
&& tsc -p tsconfig.test.json`, exit 0, no `error TS`.
- The test program of `tsc --listFiles` names the pin (1 hit; control:
15 sibling `RecordDetailView` tests) and the three edited sources (3).
- Reverse check from the consumer side: a scratch app-shell file passing
`dependentValues={42}` was refused with `TS2322: Type 'number' is not
assignable to type 'Record...'`, and a record-shaped value was accepted.
So app-shell reads the rebuilt declaration. The scratch file was removed
and the tree is clean.
**Suites:**
- `pnpm exec vitest run packages/plugin-detail/`: `Test Files 197 passed
(197)`, `Tests 1982 passed (1982)`.
- The record-page, lookup and cascade consumers: `Test Files 53 passed
(53)`, `Tests 597 passed (597)`. These are all 27 `RecordDetailView*`
tests, the fields `LookupField*` / `SelectField*` / `MultiSelectField*`
/ `UserField*` widget tests, and every test outside plugin-detail that
names `InlineFieldInput` / `HeaderHighlight` / `DetailSection`.
**Gates, exit captured before any pipe:**
- `pnpm check:control-bytes`: OK, 8256 files.
- `pnpm check:new-line-citations`: `0 new citation(s)`.
- `node scripts/check-changeset-presence.mjs`: OK, 1 changeset declared.
- `node scripts/check-changeset-overwrite.mjs`: exit 0, report-only. It
reports the intended rewrite of `7190-detail-dependson-lookup-probe.md`,
declared-at-base nothing / declares-now nothing, which is its case 2.
- `pnpm check:changeset-claims`: exit 0. It asked for a read of
`8394-record-page-emptiness-authority.md`, which names
`DetailSection.tsx`. I read it and it is still true: `hasCellValue`
still comes from `./emptiness`.
- `pnpm changeset:check`: OK.
- `pnpm check:vi-mock-inherit`, `check:vi-mock-specifiers`,
`check:test-path-roots` and `check:pending-changeset-literals`: all OK.
**Lint, narrowed and declared as a narrowing:** `eslint.config.js`
enables no type-aware linting (no `projectService`, no
`parserOptions.project`), so this diff cannot move the verdict on any
untouched file. On the 4 touched files (count from `--format json`)
there are 0 errors. The three source files have the same warning counts
as at the base (39 / 12 / 8). The pin goes from 8 to 11
`no-explicit-any` warnings in its test harness. The repo-wide `turbo run
lint` is CI's.
## Round 3 (head `ed7398f1`): the strip value read
- **Pin: 13 cases.** It adds a strip inadmissible case (exactly one
prune per field; settles empty), a strip admissible control (zero
prunes), a body inadmissible case (exactly one prune per field), and a
radio through the `FieldEditWidget` forward at both call sites. A probe
counts `onChange(undefined)` prunes and stops forwarding past 20, so a
regression reads as a count, not a hung runner.
- **Red first**, sources at `cfd1f8c5`: `1 failed | 12 passed`,
`expected 21 to be 1` (the loop, measured and bounded). **Fixed:** `13
passed (13)`.
- **Ablation on `ed7398f1`**, restore proven after every leg:
- **F**, revert only the strip value read: `1 failed | 12 passed`,
exactly the strip inadmissible case.
- **E**, `FieldEditWidget` forward set to `undefined`: `4 failed | 9
passed`.
- **A**, delete the `DetailSection` prop: `6 | 7`.
- **D**, the strip passes saved data: `3 | 10`.
- **B / C**: `7 | 6`, observed against a prediction of `6 | 7`. The
extra failure is the admissible control's readiness wait: with the
record withheld, the declared select is gated and renders no trigger.
- **`stagedRecord`** is memoised on `[data, inline?.draft]` as a
render-cost hint only. Leg F shows termination does not rest on it.
- **Suites:** plugin-detail `197 passed (197)` files / `1982` tests; the
consumer set `54 passed (54)` / `608`. `type-check` exit 0 for
plugin-detail and app-shell. All gates exit 0.
## Acceptance notes
- `packages/plugin-detail/src/DetailView.tsx` is untouched (fenced by
objectui#8941); the route does not need it. Nothing in `packages/fields`
or `packages/react` moves.
- **Round 3 correction.** Entering inline edit can now stage a cascade
prune. A single select or radio whose stored value the current parent no
longer offers is emptied, and a multi select or checkboxes keeps only
its still-offered values. The next record-level Save carries it: a
pruned multi select / checkboxes array is written, while a single select
/ radio pruned to `undefined` is dropped by a JSON transport, so its
stored value survives Save and reappears on refresh (filed as
objectui#10291). Cancel discards it (round 4, head `cad44d9f`). This is
pinned as exactly one prune per field at both call sites, with an
admissible control.
- **Round 3 correction.** The strip now reads each field's own live
value from the same staged record it passes as `dependentValues`, so an
own draft key wins even when its value is `undefined` (commit
`99d6ae96`). The round-2 divergence is gone: at `cfd1f8c5` it closed
into an infinite render loop on the highlights strip (contract review
`5815969556`).
- A host that renders `InlineFieldInput` directly and omits
`dependentValues` keeps today's gated behaviour. That is the visible
failure objectui#7206's ruling chose over a context fallback.
<sub>Body refreshed by `domain:ui` seat objectstack-ai#1 with the round-3 corrections
and the round-4 Save clause · 2026-09-24T16:39Z</sub>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
Part of #7190. ⛔ No closing keyword anywhere in this body: #7190 is a measurement card and whether the measurement retires it is the PM's call, not this PR's.
The probe ran in the REAL HOST —
RecordDetailView, the app-shell record page — not a bare mount. Every reading below depends on that sentence.Verdict
It gates. A
dependsOnlookup on a detail page renders a permanently gated, disabled picker —data-testid="lookup-trigger-gated", title "Select region first" — while theregionfield it names is on screen, in the same inline-edit session, two fields away, carryingemea.That is outcome ① of the card: a genuine second instance of #7165's defect. Recommended regrade of #7190:
finding⇒bug.Why a bare mount could not have answered this
#7190 graded itself a
findingon an explicit boundary: a detail page renders one record, which is exactly the "record scope" thatLookupField'sctx.datachannel exists to carry, so a host populatingctx.datawould make the cascade resolve and there would be no defect at all. A bare mount of the widget has no provider settingctx.data, so it reports a gated trigger trivially and always — an answer about the harness, not the product. So the new test mounts the whole record page and drives it as a user does: the record loads, a field is double-clicked to enter inline edit (#2401), and the picker's own trigger is read out of the resulting DOM.The measurement
packages/app-shell/src/views/RecordDetailView.lookupDependsOn-7190.test.tsx, 2 tests, both green against the current tree atdc7a48d02.dependsOn: ['region'])dependsOn)lookup-trigger-gatedlookup-trigger-ownerdisabledtruefalseThe control is asserted enabled, not observed: same reference, same record, same render, differing only in the declared key. A gated reading would mean nothing if the picker path were broken for both.
Both of the widget's call sites are covered, and both gate.
InlineFieldInputhas exactly two non-test call sites —DetailSection(details body) andHeaderHighlight(highlights strip). The canonical page routes a field to exactly one of them, becausebuildDefaultTabshands the strip's field list tobuildDefaultDetailsashideFields; declaringhighlightFieldstherefore selects the call site with no classname coupling and no double render, asserted as an exact trigger count of 2.Ablation — direction and counts predicted before running
Predicted: teaching only
DetailSectionto passdependentValuesturns the details-body test red and leaves the highlights-strip test green ⇒ 1 failed, 1 passed.Observed, exactly that:
Mutation proven on disk before the run — marker lines
InlineFieldInput=3,DetailSection=1, both blob hashes moved off their HEAD blobs. Restore proven by state, not by exit code:git diff HEAD,git diff --cachedandgit status --shortall empty, both blobs hash-identical to HEAD again, marker count back to 0 in both files. The mutation was visible without a rebuild, which is itself the proof that this suite resolves the package through source rather than a staledist.The ablation earns three things at once: the probe measures the
dependentValueschannel specifically and not an incidental fixture; the repair shape works; and the two tests really do drive different call sites, which is the surface claim the file makes without asserting on classnames.Is the repair the same shape as #7165's?
Same shape, different — and better — supply. The channel is identical: hand the widget the rendered record as
dependentValues. What differs is which record is available. #7188 records that the grid can only reach the saved row, becauserenderCellEditor's context is{ column, row, value, stage, commit, cancel }and carrying the pending record across that seam is the open half. The detail page has no such gap:InlineEditProvider/useInlineEdit()is already a live staged-value channel that both call sites hold —HeaderHighlightwrites throughinline.setField,DetailSectionreadsuseInlineEdit()?.fieldErrors. So a detail-page repair can feed the in-flight values #2215's form change chose, with the saved record beneath them, and would not need #7188's seam work.⭐ The residue is bigger than this card, and it changes the repair question
#7190's A2.3 anticipated that a
ctx.datarescue would be an implicit host contract nothing pins. The measurement says something stronger: no host can populate it.SchemaRendererContextTypedeclares exactly four members —dataSource,debug,debugFlags,apiFetch. There is nodataand noformValues.packages/react/src/context/SchemaRendererContext.tsx:46, whose value is{ dataSource, debug, debugFlags, apiFetch }. Control: 96 total matches for that provider including tests, so the "exactly one" is a reading, not a dead grep.⇒
dependentValues ?? ctx.formValues ?? ctx.data ?? {}has an unconditionally empty tail in production. Two widgets read that chain —LookupFieldanduseCascadingOptions(which drives the select / radio / checkboxes / multiselect cascades) — and at least three comments describe the tail as live, one of them naming it "the OUTER page's record". So this is not a detail-page gap: it is repo-wide, and #7165 is another instance of the same root.That reframes the repair as a genuine fork — per-call-site prop drilling, or making the context channel real, or retiring the dead tail. Filed separately as objectui#7206 rather than ridden here.
Verification
pnpm exec vitest run packages/app-shell/src/views/RecordDetailView.lookupDependsOn-7190.test.tsx—Test Files 1 passed (1),Tests 2 passed (2), atdc7a48d02.pnpm exec turbo run lint --concurrency=2— whole repo,Tasks: 47 successful, 47 total, 0 errors.pnpm --filter @object-ui/app-shell run type-check— green. Verified the new file is genuinely in that program:tsc -p tsconfig.test.json --listFilesnames it (1 hit), against a known existing test file as the control (1 hit).check:control-bytes,check:vi-mock-inherit,check:vi-mock-specifiers,check:entry-guard,check-changeset-presence— all green atdc7a48d02, each quoting its own verdict line with a non-zero population.Changeset
Empty frontmatter — measurement only, no behaviour change.
check-changeset-presencenames that the explicit exemption.Generated by Claude Code