Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

fix(i18n): retire the orphaned report.editor.* namespace, 105 keys across ten packs (#4145) - #4177

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-4145-report-editor-orphan-ns
Aug 10, 2026
Merged

yinlianghui merged 1 commit into
mainfrom
claude/issue-4145-report-editor-orphan-ns

Conversation

@yinlianghui

Copy link
Copy Markdown
Contributor

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 — with report.editor.panelTitle untouched 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 plus panelTitle), exactly five appear anywhere outside the packs, CHANGELOGs and .changeset/:

Key Where Is it a consumer?
panelTitle ReportConfigPanel.tsx:150,154 + its pin test yes — the expected survivor
title one test line, otherwise prose comments no t() call — contrast value
titlePlaceholder prose comment only no
fieldPickerAdd residue-namespaces-3546.test.tsx:516 no t() call — translation-provenance anchor
objectName residue-namespaces-3546.test.tsx:566-567 no t() call — concept-neighbour premise

No t() call site reads any of the 105. No dynamic t(...) template form exists in the namespace (repo-wide search for the report.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 excluded packages/i18n wholesale, because that is where the keys live. That exclusion also hid the two provenance anchors in packages/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.

  1. 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) read en.report.editor.title as the value the panel must not be labelled with. What it guards is a rendered string, not a key, so TITLE_FIELD_LABEL becomes the literal 'Title' and the pin keeps its full force. The premise guard drops its now-tautological half (TITLE_FIELD_LABEL === 'Title') and keeps PANEL_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.

  2. residue-namespaces-3546.test.tsx REUSED row ['detail.add', 'report.editor.fieldPickerAdd'] — dropped, not re-anchored. Measured: after the deletion detail.add is the only key in en whose 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.

  3. residue-namespaces-3546.test.tsx concept neighbour report.editor.objectName — re-anchored to appDesigner.dataSource, which carries the premise unchanged: it is byte-identical to the retired key in all nine non-en packs (differing in en only as "Data Source" vs "Data source"). The premise rests on a ru singular-vs-plural contrast, and appDesigner.dataSource ru is the same Источник данных against the nav's Источники данных. Zero coverage lost.

The survivor

report.editor stays a live namespace holding exactly panelTitle — deliberately unlike #3811's retirement, where the whole root went. en gains a comment saying the single key is by design and that the namespace must not grow back.

Gates as harness

Gate Result
check:i18n-drift exit 0 — "0 en value(s) changed (0 key(s) added, 105 removed)"
check:i18n-keys (all five classes) exit 0 — 3484 call sites, 2306/2306 literal keys resolve, 62 dynamic-key sites (none in this family)
all-locales-key-parity green (inside the i18n run)
vitest run packages/i18n/ 36 files, 638 passed
vitest run packages/app-shell/ packages/plugin-report/ 328 files, 3100 passed, 1 skipped, 0 failed
type-check downstream sweep, prefix '...@object-ui/i18n' = consumers 35 projects in scope, 0 TS errors
lint — i18n + app-shell 0 errors (2268 pre-existing warnings, none in changed files)
check-changeset-presence / -fixed / -no-major, check-control-bytes all exit 0

The drift gate's 105 counts the en key set; the tree change is 1050 pack/key pairs (105 x 10). Both numbers are stated so neither reads as the other.

plugin-report is included because it is the nearest consumer surface — confirmed nothing there reads a retired key.

TranslationKeys narrows — sweep direction and non-vacuity

TranslationKeys = typeof en, exported from @object-ui/i18n and 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/collaboration failed with Cannot find module '@object-ui/types' — a filter-closure artifact, not a regression, because types is 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.ts false green with a temporary probe reading TranslationKeys through a downstream consumer. One error, and it carries both directions at once:

src/__probe__/tk-probe.ts(12,49): error TS2339: Property 'title' does not exist
  on type '{ readonly panelTitle: "Edit report"; }'.

The retired key errors, while the printed type shows the emitted .d.ts is fresh and panelTitle still resolves to its literal (const kept: Kept = 'Edit report' type-checked silently). A stale or empty .d.ts would 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.ts names 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 any t() 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-keys never visits an unreferenced key, all-locales-key-parity is perfectly happy with 105 dead keys present in all ten packs, and check:i18n-drift only fires when an en value 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.title in zh alone:

× zh defines no key that en lacks
    AssertionError: zh has 1 key(s) absent from en:
    expected [ 'report.editor.title' ] to deeply equal []
× no pack defines any retired key, in any of the ten packs
    AssertionError: expected [ 'zh :: report.editor.title' ] to deeply equal []
× the namespace root survives holding exactly the one live key
    AssertionError: zh: expected [ 'panelTitle', 'title' ] to deeply equal [ 'panelTitle' ]

Test Files  2 failed | 1 passed (3)
      Tests  3 failed | 29 passed (32)

Two independent gates, three assertions — and ReportConfigPanel.panelTitle.test.tsx correctly stayed green, because it reads en and the revival was in zh. 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/i18n minor — 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-changeset label is applied (decorative in this repo).


Generated by Claude Code

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
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectui Ignored Ignored Aug 10, 2026 5:25pm

Request Review

@github-actions github-actions Bot added the tests label Aug 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Main entry (gzip) 28.0 KB 350 KB
Entry file index-Bud3Rv6z.js —
Status PASS —

📦 Bundle Size Report

Package Size Gzipped
app-shell (index.js) 8.66KB 3.13KB
app-shell (runtime-config.js) 7.42KB 2.32KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 7.57KB 2.97KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 1.17KB 0.53KB
auth (AuthProvider.js) 22.10KB 4.37KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.13KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.64KB 2.21KB
auth (SocialSignInButtons.js) 9.60KB 3.89KB
auth (UserMenu.js) 3.40KB 1.22KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 35.76KB 9.11KB
auth (createAuthenticatedFetch.js) 4.37KB 1.69KB
auth (index.js) 2.35KB 1.07KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 4.91KB 0.87KB
auth (useIsWorkspaceAdmin.js) 1.61KB 0.85KB
collaboration (CommentThread.js) 26.07KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.65KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 485.06KB 107.21KB
core (index.js) 3.04KB 1.15KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 140.66KB 36.25KB
fields (index.js) 229.40KB 56.93KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (i18n.js) 4.32KB 1.77KB
i18n (index.js) 2.65KB 1.06KB
i18n (pickLocalized.js) 1.70KB 0.83KB
i18n (provider.js) 9.48KB 3.27KB
i18n (useObjectLabel.js) 27.59KB 6.63KB
i18n (useSafeTranslation.js) 4.52KB 1.96KB
layout (index.js) 38.87KB 10.80KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.74KB
mobile (index.js) 1.50KB 0.62KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.71KB 0.42KB
mobile (useResponsiveConfig.js) 1.36KB 0.63KB
mobile (useSpecGesture.js) 4.32KB 1.64KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 8.75KB 3.06KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 3.67KB 1.12KB
permissions (evaluator.js) 4.41KB 1.44KB
permissions (index.js) 0.91KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.52KB
permissions (usePermissions.js) 1.55KB 0.71KB
plugin-ai (index.js) 15.71KB 3.79KB
plugin-calendar (index.js) 45.23KB 12.45KB
plugin-charts (index.js) 61.52KB 17.49KB
plugin-chatbot (index.js) 180.33KB 42.79KB
plugin-dashboard (index.js) 118.52KB 30.68KB
plugin-designer (index.js) 210.51KB 42.51KB
plugin-detail (index.js) 237.80KB 59.48KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 114.58KB 27.68KB
plugin-gantt (index.js) 162.81KB 39.67KB
plugin-grid (index.js) 188.04KB 49.91KB
plugin-kanban (index.js) 48.60KB 13.41KB
plugin-list (index.js) 110.04KB 26.67KB
plugin-map (index.js) 17.00KB 5.32KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 40.58KB 10.58KB
plugin-timeline (index.js) 26.21KB 7.52KB
plugin-tree (index.js) 8.50KB 2.88KB
plugin-view (index.js) 84.03KB 20.55KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.71KB 3.53KB
providers (index.js) 0.44KB 0.22KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.67KB 2.37KB
react (LazyPluginLoader.js) 3.77KB 1.33KB
react (SchemaRenderer.js) 23.71KB 7.95KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 1.23KB 0.66KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 4.09KB 1.74KB
sdui-parser (index.js) 4.47KB 2.03KB
sdui-parser (parse.js) 10.04KB 2.82KB
sdui-parser (types.js) 0.29KB 0.24KB
sdui-parser (validate.js) 4.69KB 1.48KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (data-display.js) 0.20KB 0.18KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.87KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-retry.js) 4.32KB 2.02KB
types (index.js) 2.71KB 1.34KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 2.59KB 1.31KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (spec-report.js) 5.05KB 1.93KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 0.20KB 0.18KB
types (ui-action.js) 3.40KB 1.71KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@yinlianghui
yinlianghui marked this pull request as ready for review August 10, 2026 17:35
@yinlianghui
yinlianghui added this pull request to the merge queue Aug 10, 2026
Merged via the queue into main with commit fa51109 Aug 10, 2026
20 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-4145-report-editor-orphan-ns branch August 10, 2026 17:35
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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

2 participants