Name all 66 form section headings and gate the blind spot - #1105
Merged
Conversation
…1100) Adds `name` to every `sections[]` entry across 13 objects' view modules that declared only a `label`, so section headings resolve through each object's `_sections.<name>.label` translation entry instead of rendering raw English in every locale. Translates all new/renamed section names in all four locale packs. Also closes the gate blind spot the card calls out as the real deliverable: `test/i18n-references.test.ts` gains a structural assertion — every section with a `label` must carry a `name` — that walks the page/view tree directly, independent of the existing translation-completeness checks, which cannot see a nameless section at all (there is no key to check). Verified the gate actually goes red by deliberately deleting one section's `name`, confirming the new test failed while all 20 others stayed green, then restoring it. `objectstack lint`'s `translation-section-name-missing` count: 66 -> 0 (measured today; the issue's original 67 count predates PRs #1099/#1103, which each fixed part of it before this card was dispatched). Refs #1100, #1018.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
huangyiirene
marked this pull request as ready for review
August 11, 2026 21:58
This was referenced Aug 11, 2026
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 #1100
What
67 form/detail section headings across 13 objects declared a
labelwith noname, so the heading resolved through nothing and rendered raw English inevery locale.
objectstack lint'stranslation-section-name-missingcounton this branch's base (
083e7d23, currentorigin/mainat dispatch) is66, not 67 — the issue's original count predates PRs #1099 and #1103,
each of which incidentally fixed part of it (
crm_campaign's four,crm_knowledge_article's Engagement section) before this card wasdispatched. Measured, not assumed — see gate counts below.
This PR:
Adds a
namestring (a slug matching the section's semantic role) to all66 remaining
sections[]entries (13 objects: account, case, contact,contract, event, event_attendee, forecast, knowledge_article, lead,
opportunity, product, quote, task) and adds the matching
_sectionsentryfor that name in all four locale packs (
en,zh-CN,es-ES,ja-JP).different-meaning fieldGroup key on the same object (
sla,contact_info,preferences,terms×2), it gets a distinct nameinstead (
sla_overview,contact_details,comm_preferences,contract_terms/quote_terms) — each is commented at the call siteexplaining why. Where the section's label is an exact match for an
existing fieldGroup's label (
financials,resolution,identity,parties,schedule,outcome,amounts,content,address,qualification), the section reuses that key rather than duplicatingan identical translation under a second name.
Closes the gate blind spot — the actual deliverable per the PM's
triage comment.
test/i18n-references.test.tsgains a new assertion,"every section with a label carries a name", that walks the page/view
tree directly (independent of the existing
sectionsByObjectderivation,which requires a
namebefore it records anything — that is preciselywhy a nameless section was invisible to every existing check, including
today's ci: gate objectstack lint's i18n/missing-* warnings to zero #1098 zero-tolerance i18n gate, which never sees these because
they never become an
i18n/missing-*finding).Verified the gate actually goes red: temporarily deleted the
namefrom
crm_account'sprofilesection, re-ran the suite, confirmed onlythe new assertion failed (20/21 other tests in the file stayed green),
then restored it. Output:
Restored, reran — 21/21 green again.
Fixed the issue's own truncated body (it was cut mid-sentence at "Section
headings resolve through `objects." on filing) using the PM's own
reconstruction from its second triage comment, so the card no longer
depends on a comment to be readable.
Rule hit counts (before / after)
translation-section-name-missing,pnpm exec objectstack lint:Total lint warnings: 149 -> 83 (exactly the 66 fixed; no other rule family
touched —
absolute-colspan-discouraged/component-props-*warnings arepre-existing and out of this card's scope, left untouched).
pnpm lint:i18n-gate(the #1098 zero-tolerance gate): green before andafter — as expected, since these findings never reached it either way. Per
the card's mechanism assumption, naming a section makes it visible to this
gate for the first time; if any of the 66 new/renamed names had a missing
translation, this gate would now catch it. It stayed green because every one
was translated in this PR.
Out of scope
Pre-existing
absolute-colspan-discouragedandcomponent-props-*lintwarnings are untouched, per the card's explicit instruction not to widen
this into a general cleanup.
Tests
pnpm typecheck— clean.pnpm exec vitest run test/i18n-references.test.ts— 21/21 passed(20 pre-existing + 1 new).
pnpm exec vitest run(full suite,--maxWorkers=2, capped heap) —96 files, 2356 passed, 1 skipped, 0 failed.
pnpm validate— exit 0, zerotranslation-section-name-missingwarnings remaining.
pnpm hygiene— clean (no raw control bytes, no oversized files).pnpm lint:i18n-gate— green (0 i18n/missing-* issues).Changeset
skip-changesetdoes not apply — this is user-visible (non-Englishlocale users previously saw English section headings). Added
.changeset/section-heading-name-gate.md.Generated by Claude Code