chore(platform-objects): drop four dead apps.setup.navigation translation keys (#6660) - #6767
Merged
Merged
Conversation
…lation keys (#6660) `nav_approval_processes`, `nav_verifications`, `nav_device_codes` and `nav_metadata` each kept a Setup nav label long after the nav item that declared them was removed. No composition renders them; a translated key with no declaring nav item is dead weight that reads as coverage — the same shape `app-nav-translation-parity.test.ts` already refuses for Studio. 14 key/label pairs across the four hand-written locale files (zh-CN never carried `nav_verifications` / `nav_device_codes`), plus a tombstone test that pins the four ids so they cannot drift back without their nav item. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6bLax4KMrSfnE1ydFU8Dw
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 2 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
marked this pull request as ready for review
August 8, 2026 15:06
This was referenced Aug 8, 2026
Merged
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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 #6660
Four ids kept a Setup nav label in the hand-written locale bundles long after the nav item that declared them was removed. Nothing renders them, so nothing is broken today — but a translated key with no declaring nav item is dead weight that reads as coverage, which is the exact shape
app-nav-translation-parity.test.tsalready refuses for Studio ("nav_workflowsoutlived its menu entry in all four locales and nothing said so").Premise re-check on a fresh base
Re-measured on
origin/main61282f906(which already contains #6700, so no overlap with its*.objects.generated.tsdiff).A repo-wide grep for a declaring
id: 'KEY'literal, run once per key, against a control probe:nav_approval_processesnav_metadatanav_verificationsnav_device_codesnav_webhooks(control)The broader scan (bare id, whole repo,
node_modules/distexcluded) returns the translation files and nothing else for all four.nav_metadata_directoryis a different id and is live instudio.app.ts— it is untouched.../objectuireturns zero hits for all four as well.Per-locale presence, matching the card's table exactly — 14 key/label pairs, not 16:
nav_approval_processesnav_metadatanav_verificationsnav_device_codeszh-CNnever carriednav_verifications/nav_device_codes, so only what exists was deleted: en 4, zh-CN 2, ja-JP 4, es-ES 4.Each one also has a recorded reason to be gone, traced through
git log -S:nav_approval_processesnav_verificationssys_verificationomitslistfromapiMethodsnav_device_codessys_device_codelikewise — both hold sensitive, ephemeral secrets, so a browse entry could only ever render "failed to load" (#2266, and the comment recording it insetup-nav.contributions.ts)nav_metadatanav_metadata_directorywhen the Studio app was split out (482eb67cc)What this PR does not do
It does not add the union-aware reverse gate — that fork is #6659.
pnpm check:app-nav-i18nstill refuses the reverse direction on purpose: from a single booted composition a dead key and a conditionally-contributed one are indistinguishable (plugin-authcontributesnav_sso_providersonly when an external IdP is wired). These four are safe because each was checked individually against a repo-wide grep, not against one boot.Tombstone
packages/platform-objects/src/apps/translations/setup-nav-dead-key-tombstone.test.ts— a new file rather than a Setup case insideapp-nav-translation-parity.test.ts, because that file's header says a Setup case there "has to boot something", and a tombstone needs no walk. Two assertions:apps.setup.navigation;SETUP_NAV_CONTRIBUTIONSdeclares none of them — with anav_userscontrol inside the same test so the walk cannot pass by vacuity.Both go red together if one of the four returns, which is the point: the declaring nav item comes back first, the label second, and the id's line leaves
DEAD_SETUP_NAV_IDSin that same commit. Re-addingnav_verifications/nav_device_codesremains a security decision (it means enablingliston the object first).Reverse verification
Predicted direction before running: red, and red in the per-locale counts rather than uniformly, since
zh-CNcarries two of the four.Took the four locale files back to
origin/mainwithgit checkout origin/main --followed by the four<locale>.tspaths spelled out (no stash), and re-ran the tombstone:The 4-vs-2 split is the measured per-locale table reproduced by the pin. The fifth case (
SETUP_NAV_CONTRIBUTIONS) stayed green, correctly: that file was never part of the deletion, and itsnav_userscontrol proves it was still reading a populated array.Gates
Enumerated from
.github/workflows/lint.yml, run one by one in the foreground under the shared verification lock:pnpm lintgreen; allcheck:*steps green (check:slot-lookup,check:query-options-erasure,check:verify-stand-in,check:nul-bytes,check:doc-authoring,check:docs-audit-scope,check:role-word,check:quick-reference-counts,check:adr-anchors,check:org-identifier,check:authz-resolver,check:service-providers,check:route-envelope,check:error-code-casing,check:wildcard-fallthrough,check:meta-type-normalized,check:init-service-contract,check:durability-log-level,check:startup-registry-verdict,check:objectui-changeset,check:release-notes,check:release-body,check:node-version,check:workflow-status-functions,check:shard-attestation,check:published-files,check:engine-double-contract,check:kernel-hook-pairs,check:resume-authority-declared,check:driver-memory-census,check:merge-driver,check:spec-parsed-alias).check:app-nav-i18n:OK (10 contributor(s), 53 merged setup nav id(s), 4 locale(s), every id labelled in every locale)— the forward direction is unaffected by deleting undeclared keys, which is the thing worth proving.check:i18n:OK (9 package(s) — all bundles in sync, no undeclared authoring keys).check:i18n-coverage:OK (12 config(s), 660 baselined untranslated string(s), none new)—platform-objectsstays at 0.pnpm --filter @objectstack/platform-objects test— 11 files / 285 tests passed;typecheckclean.pnpm --filter @objectstack/cli exec vitest run test/platform-page-i18n-parity.test.ts— 5 passed (the only other consumer of these bundles).A changeset is included (
@objectstack/platform-objects: patch), so noskip-changesetlabel applies.中文摘要
Setup 应用的四个导航翻译键(
nav_approval_processes、nav_metadata、nav_verifications、nav_device_codes)在对应的导航项被删除后仍留在四个手写语言包里。在新基线61282f906上逐键复测:全仓按id: 'KEY'字面量 grep 均为 0,而对照键nav_webhooks命中 5 处,说明这四个零是真的。按各语言实际存在的键删除,共 14 条(zh-CN 本来就没有nav_verifications/nav_device_codes),并新增一个墓碑测试把这四个 id 钉死——只有在导航项先回来时才允许把标签加回来。未耦合 #6659 的通用反向门禁。