This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
fix(i18n): retire the orphaned report.editor.* namespace, 105 keys across ten packs (#4145) - #4177
Merged
Merged
Conversation
The namespace held 106 keys in each of the ten locale packs (~1060 translated strings) labelling the hand-rolled report editor form. That form no longer exists: ReportConfigPanel's body is ReportDefaultInspector, a spec-driven inspector whose labels come from the report spec's own metadata. Until #4137 the namespace had exactly one live reader, and it was the #4118 defect itself -- the panel borrowing `report.editor.title` (the label of the report's Title *field*) to name itself. Moving that slot onto a purpose-built `report.editor.panelTitle` left the other 105 keys with no reader. Re-verified per key before deleting: no t() call site, no dynamic t() template form, no JSON or MDX reference reads any of the 105. 1050 removals (105 keys x 10 packs); `panelTitle` survives in all ten and the deletion sweeps around it. Adds a negative pin naming all 105 retired keys, because every existing i18n gate runs call site -> key and none can see a key with no call site -- which is how the namespace stayed green while dormant. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
yinlianghui
marked this pull request as ready for review
August 10, 2026 17:35
This was referenced Aug 12, 2026
yinlianghui
pushed a commit
that referenced
this pull request
Aug 13, 2026
`generateTimeScaleHeaders` is reachable from the package entry (`index.tsx` does `export * from './renderer'`) and its published declaration grew an optional trailing `locale?: string`. Entry-reachable additive API growth is minor, not patch — patch is for changes with no API-surface movement at all. `dist/index.d.ts` being byte-identical does not argue for patch: the entry re-exports by reference, so the resolved public surface moved even though the entry file's bytes did not. The contrapositive of #4496, which was graded patch precisely because its .d.ts additions were NOT re-exported from the entry; #4403 / #4177 / #4485 / #4495-regrade are the line this follows. Additive and back-compatible is what minor means — no consumer breaks, existing three-argument callers keep compiling and keep producing byte-identical output. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3
akarma-synetal
pushed a commit
to akarma-synetal/objectui
that referenced
this pull request
Aug 17, 2026
…oded en-US (objectstack-ai#4513) (objectstack-ai#4523) * fix(plugin-timeline): dates follow the active locale instead of hardcoded en-US (objectstack-ai#4513) `renderer.tsx` passed a literal 'en-US' to four Intl calls (the hour, day and month gantt headers, and the `long` item date) and passed nothing at all to a fifth (the `short` item date), so a fully Chinese timeline rendered an English axis and English item dates. The bare call is the same defect spelled as an omission: no tag means the MACHINE's locale, which agreed with the other four only by the accident of an en-US runner. All five now resolve through `useDisplayLocale()` (tenant regional default → active UI language → 'en'), the one channel objectui#4468 / PR objectstack-ai#4512 converged `@object-ui/fields` onto. The two date helpers are module-level functions, so the locale is read once in `TimelineRenderer` and threaded down: `generateTimeScaleHeaders` takes an optional trailing `locale` defaulting to 'en' (it is exported and driven directly by the spec-parity test), and the module-private `formatDate` takes it as a required parameter so no future branch can silently reintroduce either wrong channel. English output is byte-identical at every site. The locale-free header vocabularies (`Week n`, `Qn YYYY`, `YYYY`) are untouched — they need the package's translate channel rather than a locale tag, filed as objectui#4520. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3 * chore(changeset): regrade plugin-timeline patch -> minor (objectstack-ai#4513) `generateTimeScaleHeaders` is reachable from the package entry (`index.tsx` does `export * from './renderer'`) and its published declaration grew an optional trailing `locale?: string`. Entry-reachable additive API growth is minor, not patch — patch is for changes with no API-surface movement at all. `dist/index.d.ts` being byte-identical does not argue for patch: the entry re-exports by reference, so the resolved public surface moved even though the entry file's bytes did not. The contrapositive of objectstack-ai#4496, which was graded patch precisely because its .d.ts additions were NOT re-exported from the entry; objectstack-ai#4403 / objectstack-ai#4177 / objectstack-ai#4485 / objectstack-ai#4495-regrade are the line this follows. Additive and back-compatible is what minor means — no consumer breaks, existing three-argument callers keep compiling and keep producing byte-identical output. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3 --------- Co-authored-by: Claude <noreply@anthropic.com>
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 #4145
Retires
report.editor.*down to the one key that has a reader. 105 keys removed from each of the ten locale packs — 1050 removals, ~1050 translated strings — withreport.editor.panelTitleuntouched in all ten.Premise re-verification — the deletion license
Re-measured on this tip (
6eb40b8d7), per key rather than by spot check. Of the namespace's 106 leaf keys (confirmed 106 in all ten packs, not 106 pluspanelTitle), exactly five appear anywhere outside the packs, CHANGELOGs and.changeset/:panelTitleReportConfigPanel.tsx:150,154+ its pin testtitlet()call — contrast valuetitlePlaceholderfieldPickerAddresidue-namespaces-3546.test.tsx:516t()call — translation-provenance anchorobjectNameresidue-namespaces-3546.test.tsx:566-567t()call — concept-neighbour premiseNo
t()call site reads any of the 105. No dynamict(...)template form exists in the namespace (repo-wide search for thereport.editor.${...}construction: zero). No JSON or MDX reference. The premise holds and the license stands.One honest correction to the filing's method
The filing's grep was
grep -rn "report\.editor\." packages/ apps/ examples/ scripts/ | grep -v packages/i18n— it excludedpackages/i18nwholesale, because that is where the keys live. That exclusion also hid the two provenance anchors inpackages/i18n/src/__tests__/residue-namespaces-3546.test.tsx, which the filing therefore never reported. They are not consumers in the rendering sense — nothing renders them — but they are real references that had to be dispositioned, so they are named here rather than left to CI.This is the same collateral class PR #4168 handled when the slice-3546 test referenced its retired namespace; it is expected shape, not an unexpected consumer, so it did not trip the "stop and report" condition.
The three test-side references, dispositioned individually
Not batch-rewritten — each was judged on what it was actually pinning.
ReportConfigPanel.panelTitle.test.tsx(The report config panel is titled "Title" and the empty state says "Object Not Found" — call sites asking for a key whose value is not the copy for that slot #4118's regression pin) readen.report.editor.titleas the value the panel must not be labelled with. What it guards is a rendered string, not a key, soTITLE_FIELD_LABELbecomes the literal'Title'and the pin keeps its full force. The premise guard drops its now-tautological half (TITLE_FIELD_LABEL === 'Title') and keepsPANEL_NAME !== 'Title', which is the half that can still move. A new case asserts the wrong slot is absent rather than merely unused — retiring the key removed the original defect's mechanism.residue-namespaces-3546.test.tsxREUSED row['detail.add', 'report.editor.fieldPickerAdd']— dropped, not re-anchored. Measured: after the deletiondetail.addis the only key inenwhose value is"Add", so the "one English string, two renderings" failure that list guards has no second site left to occur at. Re-anchoring to a key with a different English string would have invented a premise instead of pinning one.residue-namespaces-3546.test.tsxconcept neighbourreport.editor.objectName— re-anchored toappDesigner.dataSource, which carries the premise unchanged: it is byte-identical to the retired key in all nine non-enpacks (differing inenonly as"Data Source"vs"Data source"). The premise rests on a ru singular-vs-plural contrast, andappDesigner.dataSourceru is the sameИсточник данныхagainst the nav'sИсточники данных. Zero coverage lost.The survivor
report.editorstays a live namespace holding exactlypanelTitle— deliberately unlike #3811's retirement, where the whole root went.engains a comment saying the single key is by design and that the namespace must not grow back.Gates as harness
check:i18n-driftcheck:i18n-keys(all five classes)all-locales-key-parityvitest run packages/i18n/vitest run packages/app-shell/ packages/plugin-report/type-checkdownstream sweep, prefix'...@object-ui/i18n'= consumerslint— i18n + app-shellcheck-changeset-presence/-fixed/-no-major,check-control-bytesThe drift gate's
105counts theenkey set; the tree change is 1050 pack/key pairs (105 x 10). Both numbers are stated so neither reads as the other.plugin-reportis included because it is the nearest consumer surface — confirmed nothing there reads a retired key.TranslationKeysnarrows — sweep direction and non-vacuityTranslationKeys = typeof en, exported from@object-ui/i18nand re-exported by@object-ui/react, so removing keys narrows an exported type. The sweep above is the prefix direction on purpose ('...@object-ui/i18n'= the 35 packages that depend on i18n; the suffix form would have swept upstream dependencies, the opposite direction).The full workspace was built before any of it was judged. Worth recording: the first attempt built only
'...@object-ui/i18n'and@object-ui/collaborationfailed withCannot find module '@object-ui/types'— a filter-closure artifact, not a regression, becausetypesis not a dependent of i18n and so was excluded while a genuine downstream consumer needed it. Building the full workspace resolved it.Reverse-verified against a stale-
.d.tsfalse green with a temporary probe readingTranslationKeysthrough a downstream consumer. One error, and it carries both directions at once:The retired key errors, while the printed type shows the emitted
.d.tsis fresh andpanelTitlestill resolves to its literal (const kept: Kept = 'Edit report'type-checked silently). A stale or empty.d.tswould have failed the kept half too. Probe deleted before commit.Negative pin, and the reverse verification
packages/i18n/src/__tests__/report-editor-retired-4145.test.tsnames all 105 retired keys rather than counting them (a count passes when one key returns and another leaves), asserts the root still holds exactly['panelTitle'], checks the survivor is a real translation across writing systems, and scans app-shell / plugin-report / components for anyt()reading a retired key.This has to be a negative pin because every existing i18n gate runs call site to key and none can see a key with no call site:
check:i18n-keysnever visits an unreferenced key,all-locales-key-parityis perfectly happy with 105 dead keys present in all ten packs, andcheck:i18n-driftonly fires when anenvalue changes. That is exactly how the namespace stayed green while dormant.The red set was predicted before the probe ran, and matched exactly. Reviving
report.editor.titleinzhalone:Two independent gates, three assertions — and
ReportConfigPanel.panelTitle.test.tsxcorrectly stayed green, because it readsenand the revival was inzh. That asymmetry was predicted too; it is what shows the pin discriminates by pack rather than firing on any change. Restored, and the i18n suite is 638 green again.One deliberate design note on the reader scan
Comments are not stripped before the scan. A comment stripper that mishandles a
//inside a string literal drops real code from the scan, and a false negative is the one direction a revival gate must not fail in. The cost is a prose constraint, and it is a live one: the panelTitle test's header originally quoted the defect as a spelled-out call and tripped this assertion during development. Documentation now names a key rather than spelling a call around it, and the failure message says so, so the next author gets a diagnosis instead of a puzzle.Changeset
@object-ui/i18nminor — published keys removed, narrowing an exported type. Same shape the #4168 precedent argued. No user-visible string changes: these keys never rendered.Per objectui#3724 no
skip-changesetlabel is applied (decorative in this repo).Generated by Claude Code