Skip to content

Name all 66 form section headings and gate the blind spot - #1105

Merged
huangyiirene merged 1 commit into
mainfrom
claude/issue-1100-section-names
Aug 11, 2026
Merged

Name all 66 form section headings and gate the blind spot#1105
huangyiirene merged 1 commit into
mainfrom
claude/issue-1100-section-names

Conversation

@huangyiirene

@huangyiirene huangyiirene commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Fixes #1100

What

67 form/detail section headings across 13 objects declared a label with no
name, so the heading resolved through nothing and rendered raw English in
every locale. objectstack lint's translation-section-name-missing count
on this branch's base (083e7d23, current origin/main at dispatch) is
66, 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 was
dispatched. Measured, not assumed — see gate counts below.

This PR:

  1. Adds a name string (a slug matching the section's semantic role) to all
    66 remaining sections[] entries (13 objects: account, case, contact,
    contract, event, event_attendee, forecast, knowledge_article, lead,
    opportunity, product, quote, task) and adds the matching _sections entry
    for that name in all four locale packs (en, zh-CN, es-ES, ja-JP).

    • Where a section's chosen name would collide with an existing
      different-meaning fieldGroup key on the same object (sla,
      contact_info, preferences, terms ×2), it gets a distinct name
      instead (sla_overview, contact_details, comm_preferences,
      contract_terms / quote_terms) — each is commented at the call site
      explaining 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 duplicating
      an identical translation under a second name.
  2. Closes the gate blind spot — the actual deliverable per the PM's
    triage comment. test/i18n-references.test.ts gains a new assertion,
    "every section with a label carries a name", that walks the page/view
    tree directly (independent of the existing sectionsByObject derivation,
    which requires a name before it records anything — that is precisely
    why 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).

  3. Verified the gate actually goes red: temporarily deleted the name
    from crm_account's profile section, re-ran the suite, confirmed only
    the new assertion failed (20/21 other tests in the file stayed green),
    then restored it. Output:

    FAIL  test/i18n-references.test.ts > every locale is complete on every authored surface
      > every section with a label carries a name — otherwise it is invisible to the i18n gate (#1100)
    AssertionError: sections with a label but no name — invisible to every i18n gate:
      view:crm_account.form.sections[0] label="Profile": expected [ Array(1) ] to deeply equal []
    Test Files  1 failed (1)
         Tests  1 failed | 20 passed (21)
    

    Restored, reran — 21/21 green again.

  4. 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:

before: 66
after:   0

Total lint warnings: 149 -> 83 (exactly the 66 fixed; no other rule family
touched — absolute-colspan-discouraged / component-props-* warnings are
pre-existing and out of this card's scope, left untouched).

pnpm lint:i18n-gate (the #1098 zero-tolerance gate): green before and
after — 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-discouraged and component-props-* lint
warnings 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, zero translation-section-name-missing
    warnings remaining.
  • pnpm hygiene — clean (no raw control bytes, no oversized files).
  • pnpm lint:i18n-gate — green (0 i18n/missing-* issues).

Changeset

skip-changeset does not apply — this is user-visible (non-English
locale users previously saw English section headings). Added
.changeset/section-heading-name-gate.md.


Generated by Claude Code

…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.
@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hotcrm Ignored Ignored Aug 11, 2026 9:56pm

Request Review

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

Labels

ci/cd CI plumbing and the verification pipeline metadata Declarative metadata — schema, security posture, UI surfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

67 form/detail section headings have no name, so they render in English in every locale

2 participants