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

refactor(i18n): retire the dead dashboard.noRows and dashboard.noDataAvailable keys - #7573

Merged
os-project-manager merged 1 commit into
mainfrom
claude/issue-7125-dashboard-dead-keys
Sep 4, 2026
Merged

os-project-manager merged 1 commit into
mainfrom
claude/issue-7125-dashboard-dead-keys

Conversation

@os-project-manager

Copy link
Copy Markdown
Collaborator

Fixes #7125

Clause-②: no — argued from this diff below, not adopted. One measured fact cuts the other way and is stated there rather than omitted.

Two rows removed from each of the ten locale packs (20 entries), plus the retirement pin and a changeset. packages/i18n/src/locales/* only; no widget, no call site, no comment outside the packs was touched.

The gate that owns "all ten packs move together"

packages/i18n/src/__tests__/all-locales-key-parity.test.ts — every pack defines every en key and no pack defines a key en lacks. Found before editing, named here, run after, and shown discriminating below. en-zh-key-parity.test.ts is the second, narrower one; both are green.

Deadness re-measured on this branch, by fully-qualified key, with lit controls

Triage's zero was not adopted. Three independent instruments, each with a control so a zero reads as a measurement:

  1. Text sweep by fully-qualified key over packages/ + apps/ + scripts/, locale packs excluded. dashboard.noRows → 4 hits, dashboard.noDataAvailable → 6 hits, and every one is a comment (WidgetEmptyState.tsx:19,25,26, DatasetWidget.tsx:731, ObjectDataTable.tsx:619,969, PivotTable.tsx:306, and the Dashboard/analytics widgets render a bare 「暂无数据行」 that is indistinguishable from a load failure — make the DEFAULT empty state self-explaining, platform-wide #7063 pin test's docblock). Lit controls in the same query shape: dashboard.empty.title → 2 live tt() call sites, dashboard.total → 3. The query finds live call sites when they exist.
  2. pnpm check:i18n-keys (the repo's AST call-site gate) stays green across the deletion, with the en pack going 2,964 → 2,962 keys and "every in-scope call-site key resolves against the en pack". A live t() asking for either key would land red here.
  3. scripts/check-i18n-dead-keys.mjs (the reverse sweep) listed both as candidates before and lists neither after; the dashboard namespace goes 4-confirmed/3-needs-review → 4-confirmed/1-needs-review. The lit controls never appear in its candidate list at all.

Also checked, because a fully-qualified sweep alone can miss them: no i18next keyPrefix / namespaced useTranslation('ns') call sites exist in this repo (so no bare-name resolution channel), and the only dashboard.${...} template in the tree is an assertion message in a test, not a key. The package's one dynamic key family is dashboard.trend., whose prefix covers neither key.

Deleted by fully-qualified key, never by bare name

Three keys in this repo are spelled noRows. The deletion was done positionally — inside each pack's dashboard: { block, asserted to be exactly one block with exactly one matching row per key — so the other two are untouched and are now pinned as untouched:

key what it is this PR
table.noRows (en.ts:396) different namespace kept, pinned
dashboard.noRows this card's key removed
engine.form.noRows (app-shell/.../metadata-admin/i18n.ts, read at widgets.tsx) module-local table, live untouched

The rationale stayed; only the keys went

WidgetEmptyState.tsx:19-26 and the comments in DatasetWidget.tsx, ObjectDataTable.tsx and PivotTable.tsx are not in this diff.

The one comment that is edited is the packs' own #7063 block, which said "noRows above is the terse fragment it replaces" — a sentence that points at a row this PR removes. It keeps every clause of its rationale and now names the retirement instead of a row that is gone. Byte-identical in all ten packs before and after.

The pin, and why a green parity gate is not enough

packages/i18n/src/__tests__/dashboard-emptyState-keys-retired-7125.test.ts — sixth in the retirement-pin series (#4145, #4392, #4730, #5504, #6310), same shape. Every i18n gate in this repo runs call site → key, so none of them can see a dead key come back: the reverse sweep is report-only by design, check:i18n-drift fires only when a value changes, and ten packs agreeing on a dead key is exactly what the parity gate wants.

Verification

Union re-run after the final commit, on 2b343c226:

  • pnpm exec vitest run packages/i18n/ packages/plugin-dashboard/ → Test Files 150 passed (150) / Tests 1781 passed (1781), exit 0
  • pnpm check:i18n-keys → exit 0, "Every in-scope call-site key resolves against the en pack (2962 keys) …"
  • pnpm check:i18n-drift → exit 0, "0 en value(s) changed (0 key(s) added, 2 removed — those are all-locales-key-parity's)"
  • node scripts/check-changeset-presence.mjs → exit 0, "11 source file(s) of 1 released package(s) changed, and this change declares 1 changeset(s)"
  • node scripts/check-changeset-no-major.mjs → exit 0, "No changeset declares a major bump"
  • node scripts/check-control-bytes.mjs → exit 0, "scanned 6240 tracked text file(s)"
  • pnpm --filter @object-ui/i18n run type-check → exit 0 (both legs; tsc -p tsconfig.test.json --listFiles confirms the new test file is IN that project, so the green covers it)
  • pnpm --filter @object-ui/i18n run lint → exit 0, 33 pre-existing warnings, none in a file this PR touches

Exit codes were captured by redirect-then-read, never through a pipe.

The parity gate shown discriminating, and the pin shown to catch what it cannot

Run from the committed implementation, restore under trap ... EXIT INT TERM with absolute paths via git checkout HEAD -- ABSOLUTE_PATH, each mutation proven on disk before any result was read.

Leg 1 — nine packs deleted, de left behind (the failure mode the card warns about). Mutation proven by de.ts blob equal to the base blob e063401cd…. Result: exit 1,

AssertionError: de has 2 key(s) absent from en: expected [ 'dashboard.noDataAvailable', …(1) ] to deeply equal []

— red, naming the tenth pack, plus the pin red on de :: dashboard.noRows / de :: dashboard.noDataAvailable.

Leg 2 — the deletion fully reverted in all ten packs. Parity: Test Files 1 passed (1) / Tests 32 passed (32) — green, because ten packs agreeing on a dead key satisfies it. Pin: exit 1, red, naming all 20 pack::key pairs. That contrast is the whole reason the pin exists.

Both legs restored and proven by state: git diff HEAD empty and all ten pack blobs equal to their HEAD blobs (an empty hash would have been read as failure, not as "nothing to compare").

One honest correction: leg 1's on-disk probe printed 3 where the script's inline annotation said "expect 2" — the regex ^ (noRows|noDataAvailable): also matches table.noRows in the same file, which is the very key this PR keeps. The mutation itself is proven by the blob hash and by the parity failure naming exactly the two dashboard.* keys; the annotation was wrong, not the leg.

Clause-②: no

The removal moves no accept/reject behaviour on any contract, and it is not on a governed surface: GOVERNED_SURFACES in scripts/check-governed-queue-guard.mjs is docs/adr/, .claude/, skills/, none of which this diff touches, and the changeset gate reports "0 of them a manifest whose published contract moved". No signature changes: I18nConfig.resources is Record<string, Record<string, unknown>> and t/tt/useSafeTranslate take key: string, so nothing accepts or rejects on the pack's member set. Five prior retirements of exactly this shape shipped as patch on @object-ui/i18n with a pin test and no contract review.

The fact that cuts the other way, stated rather than omitted: TranslationKeys = typeof en is exported from @object-ui/i18n and re-exported by @object-ui/react, so the removal does narrow a published structural type. Measured with tsc, not asserted — reading the retired member now fails, and the surviving control compiles:

type-probe-retired.ts(3,43): error TS2339: Property 'noRows' does not exist on type '{ readonly addWidget: …
type-probe-control.ts  → exit 0    (TranslationKeys['dashboard']['total'])

I still read that as no: the narrowed thing is a snapshot type of a data catalogue that no API consumes as a constraint — its six occurrences in this repo are import/export lines only — and a review commissioned on it would have no design question to answer. If the maintainer reads a shipped catalogue entry as contract surface regardless of whether anything constrains on it, the datum above is the one to overrule me with, and needs:contract-review belongs on this PR.

Narrowings declared

  • vitest scoped to packages/i18n/ + packages/plugin-dashboard/, not the whole farm. Could have caught: a test in another package asserting a retired value, or type-depending on the removed members. Why the subset still covers it: the repo-wide AST gate (check:i18n-keys) is green over all of packages/ + apps/; a repo-wide text sweep for the retired values outside the packs returns only comments plus one hardcoded title="No rows" prop in an app-shell preview that never reads the pack; and plugin-dashboard is the only runtime consumer of dashboard.* — its one assertion on the old copy is a negative one (not.toContain('暂无数据行')), which deletion can only strengthen. CI runs the full farm regardless.
  • eslint scoped to packages/i18n. That package owns every changed file, so this is the exact per-package command turbo runs for them. It could not catch a rule violation raised in another package by this change — none is possible: no exported symbol, import or call site moved.
  • Typecheck scoped to @object-ui/i18n (both legs). Downstream type-check not run locally; the probe above is the direct measurement of the only cross-package type surface involved, and TranslationKeys is a constraint nowhere.
  • check:eager-closure not run. It needs a full apps/console vite build to produce dist/eager-closure.json. Direction argument: this diff only removes catalogue entries, so the measured i18n-locales bytes move DOWN, away from the ceiling; at the script's own ~147 gzipped bytes per short key across ten packs, ~294 bytes against 8,924 of recorded headroom moves the blind-gauge ratio by ~0.003x from 0.10x, nowhere near the 1.00x that errors. CI runs it.
  • Report status: filed at draft-PR time; CI convergence is the PM's half.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EMrWaQw3XS5DxTHxp4yRyC


Generated by Claude Code

…ataAvailable` keys

objectui#7063 routed the three dashboard empty-state renders (DatasetWidget,
ObjectDataTable, PivotTable) through one shared `WidgetEmptyState`, which
resolves its own copy from `dashboard.empty.*`. The two keys the old per-widget
placeholders used outlived their call sites in all ten locale packs — 20 entries.

Re-measured on this branch rather than inherited from the card, and by FULLY
QUALIFIED key: zero `t()`/`tt()` call sites for either, no dynamic `dashboard.`
head a substitution could resolve onto them, and every surviving textual
occurrence under `packages/` is a comment recording the consolidation. The same
query shape returns live call sites for the lit controls `dashboard.empty.title`
and `dashboard.total`, so the zero is a measurement rather than a broken query.
`check:i18n-keys` stays green across the deletion with the en pack going
2,964 -> 2,962 keys and every in-scope call-site key still resolving.

Not touched: `table.noRows` and `engine.form.noRows` — two different, same-named
keys in other namespaces — nor the comments in the dashboard widgets that record
why three strings became one shared empty state. The packs' own comment keeps
that rationale and now names the retirement instead of a row that is gone.

The pin follows the five prior retirements (objectui#4145, objectui#4392,
objectui#4730, objectui#5504, objectui#6310): every i18n gate here runs call
site -> key, so none of them can see a dead key come BACK into the packs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EMrWaQw3XS5DxTHxp4yRyC
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 50 chunks) 3182.4 KB 3191.4 KB
Main entry chunk (gzip) 143.2 KB 350 KB
Entry file index-DaJjiLQB.js —
Status PASS —

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

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 15.67KB 5.75KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
auth (invitation-status.js) 1.22KB 0.70KB
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) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 5.13KB 2.35KB
collaboration (CommentThread.js) 26.08KB 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.68KB 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) 516.21KB 117.82KB
core (index.js) 6.12KB 2.42KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 180.00KB 50.20KB
fields (index.js) 242.40KB 61.26KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 4.28KB 1.75KB
i18n (index.js) 3.65KB 1.47KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 26.89KB 9.04KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.98KB 10.98KB
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.75KB
mobile (index.js) 1.55KB 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.72KB 0.42KB
mobile (useResponsiveConfig.js) 1.37KB 0.63KB
mobile (useSpecGesture.js) 4.32KB 1.64KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 11.71KB 4.29KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 5.12KB 1.74KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 15.75KB 3.80KB
plugin-calendar (index.js) 48.15KB 13.35KB
plugin-charts (index.js) 70.92KB 19.75KB
plugin-chatbot (index.js) 196.19KB 46.43KB
plugin-dashboard (index.js) 132.89KB 34.68KB
plugin-designer (index.js) 212.87KB 43.19KB
plugin-detail (index.js) 250.93KB 64.09KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 132.87KB 32.66KB
plugin-gantt (index.js) 167.44KB 41.05KB
plugin-grid (index.js) 209.25KB 56.71KB
plugin-kanban (index.js) 52.71KB 14.55KB
plugin-list (index.js) 113.28KB 27.59KB
plugin-map (index.js) 20.55KB 6.80KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 43.57KB 11.96KB
plugin-timeline (index.js) 30.84KB 8.85KB
plugin-tree (index.js) 9.38KB 3.22KB
plugin-view (index.js) 85.24KB 20.94KB
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.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 81.07KB 26.86KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 5.41KB 2.34KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 4.93KB 2.24KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 20.57KB 5.88KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 10.35KB 3.60KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.74KB 1.41KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 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-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 4.58KB 2.23KB
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 (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
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

@os-project-manager
os-project-manager marked this pull request as ready for review September 4, 2026 00:11
@os-project-manager
os-project-manager added this pull request to the merge queue Sep 4, 2026
Merged via the queue into main with commit 1490691 Sep 4, 2026
33 checks passed
@os-project-manager
os-project-manager deleted the claude/issue-7125-dashboard-dead-keys branch September 4, 2026 00:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

finding(i18n): dashboard.noRows and dashboard.noDataAvailable become dead keys once #7063 lands — 10 packs, zero call sites

2 participants