Skip to content

finding(i18n): home.recentApps.itemType.report and .metadata are missing from all ten packs — the first members the #4964 exact check measured #6023

Description

@yinlianghui-tw

Measured by the exact-member check added for #4964 (its first run over main). Filed unassigned; not fixed there — that card's dispatch rules it out ("do not add missing keys to the packs to make the gate pass; a missing translation is a real gap the gate exists to surface").

The gap

RecentItem['type'] (packages/app-shell/src/context/RecentItemsProvider.tsx:47) is a six-member union:

type: 'object'|'dashboard'|'page'|'report'|'record'|'metadata';

packages/i18n/src/locales/en.ts defines four of the six under home.recentApps.itemTypeobject, dashboard, page, record. report and metadata are absent from all ten packs, which is why no gate saw it: pack-vs-pack parity reads ten packs agreeing, and the prefix rule only ever asked whether home.recentApps.itemType resolved (it does, sixteen members deep in the sibling case that opened #4964).

Both missing members are live, not dead vocabulary

packages/app-shell/src/hooks/useTrackRouteAsRecent.ts writes both:

  • type: 'metadata' at :105 — any /metadata/<type>/<name> route visit
  • type: 'report' at :148 — any /report/<name> route visit

What the user sees

Not a raw key — all three consumers pass a defaultValue, which is what kept this quiet:

consumerfallback
console/home/HomeRail.tsx:251defaultValue: it.type → the bare lowercase word report / metadata
console/home/RecentApps.tsx:55defaultValue: capitalizeFirst(item.type)Report / Metadata
console/home/StarredApps.tsx:61defaultValue: capitalizeFirst(item.type)Report / Metadata

So English readers see a plausible-looking label (lowercase in the rail, which is its own small inconsistency against the four defined members) and the other nine locales see English. This is precisely the shape objectui#3517 established as the mechanism that hides a missing key for months.

Fix

Add both keys to packages/i18n/src/locales/en.ts under home.recentApps.itemType, which makes packages/i18n/src/__tests__/all-locales-key-parity.test.ts demand them in the other nine packs — the correct order. Then delete the two entries from missingMembers in scripts/i18n-call-site-key-baseline.json (the check is a ratchet; a baselined entry whose defect is gone fails the build too).

Copy is a decision for whoever picks this up: the four existing members are single title-case nouns (Object, Dashboard, Page, Record), so Report and Metadata are the obvious shape, but the nine translations are the real work.

Note the alternative resolution the gate also accepts and this issue does not recommend: narrowing RecentItem['type'] by deleting the two members. That is wrong here — both are written at runtime, so narrowing the union would be a lie about the data rather than a fix.

Metadata

Metadata

Labels

domain:devxobjectui devx stream: fix lands on .github/, scripts/ or release pipeline — devx lane cross-repofindingpm:dispatched

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions