This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
fix(app-shell): ask the adapter which params degraded, so a targetless master_detail gets the #3405 hints - #5882
Merged
Conversation
…s master_detail gets the #3405 hints `ActionParamDialog` decided whether to show the "paste a record id" placeholder and help text with its own literal over RAW param spellings (`param.type === 'lookup' || param.type === 'reference'`), while the degradation it was reacting to is performed by `paramToField` over RESOLVED widget keys (`LOOKUP_WIDGET_TYPES`). The two sets overlapped without either containing the other: `master_detail` degraded to a plain text box and got no hints at all (an unexplained empty field asking for a bare UUID), and `reference` was a hand-copy of a `PARAM_TYPE_ALIASES` row the adapter folds away before it tests membership. `paramToField` now exports `paramDegradesWithoutTarget(param)` — the one answer to "did this param fall back for want of a declared target?" — and both the adapter's own fallback branch and the dialog's two hint readers ask it. One membership table remains in this surface. Deliberate behaviour change: a targetless `master_detail` param now receives `actionDialog.lookupPlaceholder` and `actionDialog.lookupHelpText`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EuPCi56cnGyykygi3z9w4m
…5654) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EuPCi56cnGyykygi3z9w4m
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #5654
ActionParamDialogdecided who gets the #3405 "paste a record id" hints with its own literal over raw param spellings, while the degradation it was reacting to is performed byparamToFieldover resolved widget keys. Neither set contained the other, so the dialog was wrong in both directions.paramToFieldnow exports one predicate,paramDegradesWithoutTarget(param), and both its own fallback branch and the dialog's two hint readers ask it. One membership table (LOOKUP_WIDGET_TYPES) remains on this surface, read from one place.master_detailwas not hand-added to the dialog line — that third copy is the defect this card exists to end.Deliberate behaviour change
A
master_detailaction param with noreferenceTonow receivesactionDialog.lookupPlaceholderandactionDialog.lookupHelpText. It already degraded to a plain text input and already warned in dev; it just arrived at the user as an unexplained empty box wanting a bare UUID. Declared in.changeset/action-param-degrade-predicate-5654.md.Measured before/after — the card's table, driven through the real dialog
Rows 1-2 are the change. Rows 3-6 are controls: a probe that cannot fail is not evidence, so each of these must stay put while row 1 moves.
master_detail, no targetmaster_detail,referenceTo: 'accounts'lookup-trigger-parent)lookup, no targetreference, no targetlookup,referenceTo: 'sys_user'no-such-typeThe last row is why the dialog now asks the predicate instead of
field.type === 'text': the old conjunct was a proxy for "did this degrade?", and the predicate answers that exactly. The equivalence (predicate(param)⇔paramToField(param)replaced the param's own widget with the text fallback) is swept over everyFORM_FIELD_TYPESmember plus every alias inparamToField.test.ts, with the degrading rows named —['lookup', 'master_detail', 'reference']— so the sweep cannot pass vacuously.Verification — all at
67d6d8af1Every command below was run from the repo root, path-filtered, heavy legs through the shared verify lock (verdict lines quoted, never a bare
$?).Tests —
pnpm exec vitest run packages/app-shell/src/utils/paramToField.test.ts packages/app-shell/src/views/ActionParamDialog.test.tsx --maxWorkers=2Reverse verification — the leg that discriminates. Only the consumer hunk was reverted (
git checkout HEAD~1 -- packages/app-shell/src/views/ActionParamDialog.tsx), leaving the exported predicate in place, so the failure is an assertion and not a missing-export module error. Revert confirmed on disk before running (grep -c degradedPicker→0; the retired literal back at line 351):Exactly one test moved. Restored with
git checkout HEAD -- <file>;git diff HEAD --statempty andgit status --porcelainempty, then green again at HEAD.Legs that do NOT discriminate, stated rather than staged:
paramToField.test.tspredicate cases also stay green under it (the producer is untouched). Reverting the producer instead would take the export the dialog imports with it, so that leg fails as a module error rather than a behaviour signal — it discriminates nothing about the hints, so it was not run as evidence.Type-check —
pnpm --filter @object-ui/app-shell type-check, dependency closure built first (pnpm --workspace-concurrency=2 --filter "@object-ui/app-shell^..." build,VERDICT command-exit 0) so unbuilt-dependency noise could not be misread as errors. Script name echoed, so this is not a zero-match silent pass:Repo gates whose inputs this change touches:
(No new i18n keys: both hint keys already exist in all ten packs.)
Lint — narrowing DECLARED.
eslintwas run over the four changed source files, not the repo. Soundness:eslint.config.jsdeclares noproject/projectService, so no rule in this repo is type-aware and no verdict on an untouched file can move because of this diff; the repo'sratchetrules are per-file AST rules, so a per-file run is a complete measurement of this diff. Population and count read from eslint's own--format jsonoutput, not from a guess: 4 files linted, 0 errors. The 22 warnings are all pre-existingno-explicit-any/react-refresh/react-hooksfindings — 0 of them land on a line this branch added (checked by intersecting the reporter's line numbers with the added-line set ofgit diff -U0 $(git merge-base HEAD origin/main) HEAD). The full farm runs in CI.Scope
paramToField.ts,ActionParamDialog.tsx, their two test files, one changeset. No doc touch:paramToFieldis internal to@object-ui/app-shell(not re-exported from itsindex.ts), so the new export changes no documented surface.Filed rather than repaired in this PR: #5880 — the same degrade set is stated once per package (
app-shellandplugin-grid'sbulkParamToField) with nothing tying the two. Members are identical today, so no live defect; the two predicates key on different fields, so merging them is a decision rather than a mechanical convergence.Note for whoever lands #5875 (prose-only, same two files): this PR adds prose to
paramToField.tsandparamToField.test.tsbut does not touch the "fourth and last private copy" sentences that card is about — expect a textual merge, not a contradiction.Generated by Claude Code
Generated by Claude Code