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

Dead locale strings: console.objectView.striped/bordered/virtualScroll and appDesigner.stripedRows/bordered have no call site in any of the ten packs #4658

Closed

Description

@yinlianghui

Observation-class finding, recorded while unwinding the objectstack#7176 retirement chain (#4649 / PR #4657). Not fixed there — different package, and the dormancy predates that change. Unassigned, no pm:queue; grade it in triage.

What was measured

packages/i18n/src/locales/*.ts defines five labels, in all ten packs, that nothing asks for:

Key en value
console.objectView.striped Striped rows
console.objectView.bordered Bordered cells
console.objectView.virtualScroll Virtual scroll
appDesigner.stripedRows Striped Rows
appDesigner.bordered Bordered

A repo-wide search over packages/*/src, apps/*/src, examples/ and e2e/ returns no t() call site for any of them — literal or template-built. ViewConfigPanel.tsx (the view configure panel, the plausible consumer) never mentions the three; app-shell builds no console.objectView.* key dynamically. So these are labels for a control that no longer exists on any screen.

The appDesigner pair is unrelated to the retirement by name only — the same measurement applies, which is why they are on one card rather than two.

Why no gate sees it

The three i18n gates each read the direction that cannot catch this, and the division is deliberate and documented in their headers:

  • all-locales-key-parity.test.ts — pack vs pack. Ten packs identically defining a dead key is full parity.
  • check-i18n-call-site-keys.mjs — call site to en. It asks whether a key a component wants exists, never whether a key that exists is wanted.
  • check-i18n-en-drift.mjs — en value changes to the other nine. A value that never changes never registers.

So the class "key defined by every pack, referenced by nobody" is invisible by construction, and these five are unlikely to be the only members. The generalisable half of this card is a reverse sweep (pack key set minus referenced key set), which is why it may be worth more than deleting five strings.

Extra context after objectstack#7176

The three console.objectView.* labels can no longer acquire a consumer: the keys they described are retired upstream, and objectui stopped declaring and forwarding them in PR #4657. Whatever the verdict on the general sweep, that subset is dead permanently rather than merely dormant.

Suggested scope

Delete the five keys from all ten packs (en plus the nine translations, so key parity stays green), or — if the reverse sweep is judged worth having — add it as a gate and let it produce the full list first.

Activity

  1. self-assigned this
    on Aug 15, 2026
  2. yinlianghui commented on Aug 15, 2026

    @yinlianghui
    ContributorAuthor

    Findings triage + claim (first grade and dispatch in one round, PM session session_01RnQd8iMMUwXQEV1crFmQiQ): PROMOTED and dispatched (M). Branch: claude/issue-4658-dead-locale-keys.

    Graded scope, taking the card's own "gate-first" suggestion in its measured form: build the reverse sweep as a report-only script (pack key set minus referenced key set, reusing the call-site gate's existing key-resolution machinery, with the dynamic-key namespaces it already understands treated as live) — not a red gate yet, because template-built keys make false positives structurally possible and a gate that cries wolf gets deleted. Let the report produce the full dead-key list, sample-verify hits, delete the confirmed-dead set across all ten packs (the five named here at minimum — the three console.objectView.* keys are permanently dead post-retirement, not merely dormant), and record the measured false-positive rate in the PR body as the input to a future enforce decision. PR will be Fixes #4658.


    Generated by Claude Code

  3. yinlianghui commented on Aug 15, 2026

    @yinlianghui
    ContributorAuthor
    {
      "issue": 4658,
      "status": "done",
      "branch": "claude/issue-4658-dead-locale-keys",
      "pr": "https://github.com/objectstack-ai/objectui/pull/4731",
      "premise_still_valid": true,
      "summary": "Deleted the five dead locale keys (console.objectView.striped/bordered/virtualScroll, appDesigner.stripedRows/bordered) from all ten packs, verified independently via AST call-site analysis, a whole-repo text grep, and the objectstack#7176/#4649 retirement-chain evidence. Built scripts/check-i18n-dead-keys.mjs, a report-only reverse sweep (pack keys minus referenced keys) that extends check-i18n-call-site-keys.mjs's own analyze() with referencedKeys/referencedBranches/dynamicHeads tracking rather than duplicating its parser, plus a text safety net that demotes indirectly-referenced keys to a NEEDS-REVIEW tier instead of false-confirming them dead. The sweep found 626 total candidates repo-wide (384 confirmed, 242 needs-review); filed the broader surface as a new unassigned finding (#4730) rather than expanding this PR's scope.",
      "tests": "At commit d3d028631 (git rev-parse --short HEAD, run after the final commit): `NODE_OPTIONS=--max-old-space-size=4096 pnpm exec vitest run packages/i18n/ scripts/__tests__/ --maxWorkers=2` -> 89 test files / 1787 tests passed (includes the new scripts/__tests__/check-i18n-dead-keys.test.ts, 16 tests, and the pre-existing check-i18n-call-site-keys.test.ts unmodified, 97 tests, still green after analyze() was extended). `pnpm run type-check:scripts` (tsc -p tsconfig.scripts.json) clean. `node scripts/check-i18n-call-site-keys.mjs` -> every in-scope call-site key resolves against the en pack (2927 keys). `node scripts/check-i18n-en-drift.mjs` -> 0 en values changed, 5 removed (parity's business), no drift finding. `pnpm run check:control-bytes` clean (4255 files scanned). `node scripts/check-changeset-presence.mjs` -> 10 source files under the released i18n package declare 1 changeset. `node scripts/check-changeset-no-major.mjs` clean. `node_modules/.bin/eslint` on the three new/changed script files: clean. Self-scanned changed files for raw control bytes: none found.",
      "open_questions": [],
      "out_of_scope_findings": [
        "filed as #4730: reverse sweep found ~384 confirmed-dead locale keys across 58 namespaces beyond this card's five; largest instances are workflow.* (54/58 confirmed -- ProcessDesigner.tsx hardcodes English and imports no translation hook at all) and console.objectView.* (116/154 confirmed, including currently-active ListViewSchema fields like rowActions/inlineEdit with no i18n-labelled UI control anywhere)"
      ]
    }

    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions