refactor(i18n): retire the dead appDesigner.fieldDesigner.formula key - #6411
Merged
Merged
Conversation
objectui#6043 retired the Field Designer's formula-expression textarea, the
key's only call site. The value outlived it in eleven places: the ten locale
packs and `DESIGNER_DEFAULT_TRANSLATIONS`.
Re-measured on this branch rather than inherited from the card: zero `t()`/
`tt()` call sites, no dynamic template head that could reach it
(`appDesigner.fieldDesigner.typeCategory.` is the namespace's only one), and
its sole textual occurrence anywhere in the repo was the defaults-map row
removed here with it.
Map and packs move in one commit so `defaults-maps-mirror-en-pack` stays
green — that gate fails a map row whose key the `en` pack lacks, and
`all-locales-key-parity` fails a pack left behind.
`designer.field.formula` ('Formula (CEL)') is untouched: a different, live key
belonging to metadata-admin's `ObjectFieldInspector`.
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
|
Fifth in the retirement-pin series (objectui#4145, objectui#4392, objectui#4730, objectui#5504), same shape: the retired leaf asserted absent from all ten packs, plus surviving-sibling assertions so a green cannot be bought by deleting the neighbourhood. Every i18n gate in this repo runs call site -> key, so none of them can see a dead key come BACK into the packs: the reverse sweep that found this one is report-only by design, `all-locales-key-parity` is fully satisfied by ten packs agreeing on a dead key, and `check:i18n-drift` only fires when a value changes. Reverse-verified rather than asserted: reviving the row in all ten packs turns exactly the one case red, naming each pack, while `all-locales-key-parity` and `defaults-maps-mirror-en-pack` stay green — which is the whole reason the pin exists. The surviving list deliberately excludes the eight `appDesigner.fieldDesigner.*` keys the reverse sweep still lists as NEEDS-REVIEW (`options`, `addOption`, `addRule`, `noFields`, `searchPlaceholder`, `systemBadge`, `ungrouped`, `validationRules`) — pinning "these survive" against keys that may themselves be dead would bake an unverified claim into the guard. Every key it does list was confirmed live by call site in `FieldDesigner.tsx`.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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 #6310
One key, eleven lines, zero readers: the
appDesigner > fieldDesigner > formulaleaf of allten locale packs plus its
DESIGNER_DEFAULT_TRANSLATIONSrow — and, since the PM's rulingbelow, a pin so it cannot come back unnoticed.
Premise re-derived on this branch, not inherited from the card
objectui#6043 retired the Field Designer's formula-expression textarea, which held the key's
only call site (the
{ name: 'formula', label: t('appDesigner.fieldDesigner.formula') }fielddescriptor in
FieldDesigner.tsx). Re-measured at merge-base062943f86:t()/tt()call sites for the dotted keygrep -rn 'appDesigner\.fieldDesigner\.formula'→ 1 hit, the defaults-map row itself)t(`appDesigner.fieldDesigner.typeCategory.${cat}`)is the namespace's only one, andformulais not under it'…fieldDesigner.' + 'formula')grep -rln fieldDesigner --include='*.test.ts*' --include='*.snap'returns nothingSo the key's sole textual occurrence anywhere in the repo was the defaults-map row this PR
removes with it. That is why the reverse sweep tiered it NEEDS-REVIEW rather than CONFIRMED —
the footprint it found was the other half of the same deletion.
The card's fence held
designer.field.formula('Formula (CEL)',packages/app-shell/src/views/metadata-admin/i18n.ts)is a different, live key belonging to metadata-admin's
ObjectFieldInspector— the surfacethat still authors formula expressions. It is untouched;
app-shellis not in this diff at all.Every grep in this PR was run on the full dotted path, never the
formulaleaf. The pin'sfailure message points a future reader at that key by name, so the next person to meet the two
spellings meets them together.
Map and packs move together
defaults-maps-mirror-en-packfails a map row whose key theenpack lacks ("not an exception,a finding"), and
all-locales-key-parityfails a pack left behind. One commit moves all eleven,so neither can go red — verified below rather than asserted.
The retirement pin — asked for, then ruled on
This PR originally shipped without a test, because the dispatch order held that a deletion
adds no behaviour to pin and that inventing an assertion would be theatre. That conflicted with
a four-instance convention in this repo, so the conflict was reported rather than silently
resolved either way. The PM ruled the dispatch clause wrong for this case and asked for the
pin, and the reasoning is worth keeping next to the code: every i18n gate here runs call
site → key, so a dead key coming back into the packs is invisible to all of them. That is an
unguarded direction, not a ritual.
packages/i18n/src/__tests__/appDesigner-fieldDesigner-formula-retired-6310.test.tsis thefifth in the series (objectui#4145, objectui#4392, objectui#4730, objectui#5504) and matches
their shape: the retired leaf absent from all ten packs, plus surviving-sibling assertions so a
green cannot be bought by deleting the neighbourhood.
retired one —
options— is deliberately excluded, along withaddOption,addRule,noFields,searchPlaceholder,systemBadge,ungroupedandvalidationRules: all eight areNEEDS-REVIEW candidates of the same reverse sweep, with the same defaults-map-only footprint the
retired key had, and none has been individually confirmed either way. Pinning "these survive"
against keys that may themselves be dead would bake an unverified claim into the guard. Every
key the list does name was confirmed live by call site in
FieldDesigner.tsx. A fourth casepins the
typeCategory.*family, whose members are reached only by substitution and aretherefore exactly what a future literal-argument sweep would mistake for dead.
Reverse-verified, direction predicted before running. Reviving the row in all ten packs
(mutation proven on disk first: 10 revived rows,
10 files changed, 10 insertions(+)):Exactly one case red, naming each pack;
all-locales-key-parityanddefaults-maps-mirror-en-packboth stayed green through the revival — which is the wholeargument for the pin, demonstrated instead of claimed. Restore was proven by bytes, not by an
exit code: all ten packs hash-equal to their
HEADblobs,git diff HEADempty for the localesdirectory, and every measurement quoted below ran after that restore.
Before / after, and a positive control on the measuring tool
node scripts/check-i18n-dead-keys.mjs --strict:Exactly one key left the pack and one candidate left the report; the CONFIRMED tier and every⚠️
other namespace are unchanged, and re-running it at the final commit confirms the new test file
adds no textual footprint that would move another key's tier.
--strictexits 1 bothbefore and after — that exit code is about the 150 CONFIRMED keys of the standing backlog
(#4730), not about this change. It is quoted here so nobody later reads a
1as a regressionthis PR introduced.
Positive control — the tool still names a key I know is live, when asked. Ablation on
appDesigner.fieldDesigner.allTypes(live: one call site atFieldDesigner.tsx:402, onedefaults-map row, absent from the report at HEAD), each leg proven on disk by occurrence count
before reading any output:
Leg A reproduces, on a key that was live thirty seconds earlier, the exact report signature
formulacarried before this PR — NEEDS-REVIEW whose only footprint is the defaults map. Leg Bshows the tier promoting to CONFIRMED once that last footprint goes. The tool is measuring, not
idling.
The backlog this key came from is NOT swept here
The dispatch asked for the size before landing a large deletion. Measured:
That is a hundred-key sweep across 55 namespaces — a different review from this card, and it is
already tracked, open and unassigned, by #4730 ("Reverse i18n sweep: ~384 confirmed-dead locale
keys across 58 namespaces"). Sweeping it inside this PR would take a queued card's scope without
a claim, so this PR is the one key #6310 names. The backlog has shrunk since that card was
filed: 626/384/58 there, 389/150/55 today.
Verification — all at
ccacdc43b, the final commitLint was narrowed, and the narrowing is measured rather than assumed.
eslint --no-inline-configover the changed
.tsfiles: 11 files for the deletion commit and 1 for the pin, counts readfrom
--format jsonrather than from my own list, 0 errors, 0 warnings, exit 0 both times. Thenarrowing excludes nothing: the flat config's base block matches
**/*.{ts,tsx}and every changedfile resolved into the result set (none ignored), and
eslint.config.jsextendstseslint.configs.recommendedwith noparserOptions.projectorprojectService— notype-aware rules exist, so a change inside these files cannot move a verdict on a file it does not
touch. The repo-wide
pnpm lintfarm is CI's run, as always.CI convergence is not waited on here — this report is delivered at draft-PR time by the dispatch
contract. Draft on purpose: the PM lands this, it is not self-merged and not marked ready.
Changeset:
patchfor@object-ui/i18nand@object-ui/plugin-designer, the two packages whosepublished source changed.
Generated by Claude Code
Generated by Claude Code