Skip to content

lint: validate-translation-references has no flows leg — an authored key naming a flow, screen node or field that does not exist warns nobody #11608

Description

@os-zhuang

Filed unassigned by the domain:cli seat while implementing #11485 (item 3 of that card: "decide whether reference-validation for flows belongs here or as its own card"). The decision, with the evidence below, is its own cardpackages/lint is outside #11485's declared file surface, and the work is not a rider on it.

Measured

packages/lint/src/validate-translation-references.ts walks objects, globalActions, apps and dashboards; an unrecognised top-level namespace is skipped, never reported (its own header says so, about the object-first AppTranslationBundle shape). flows is one of those unrecognised namespaces, so every level of the group goes unchecked.

Probe against the rule's own entry point (validateTranslationReferences), one bundle naming three things that do not exist:

flows: {no_such_flow: {label: 'x',screens: {no_such_node: {title: 'y',fields: {no_such_field: {label: 'z'}}}}}},dashboards: {no_such_dashboard: {label: 'x'}},objects: {no_such_object: {label: 'x'}},
findings: 2
- translation-target-unknown …zh-CN.objects.no_such_object
- translation-target-unknown …zh-CN.dashboards.no_such_dashboard
flows-related findings: 0

The sibling namespaces each report their orphan. The flow, the screen node id and the field name produce nothing.

Why it matters

This is the same failure the rule exists for, one namespace over: the key parses (the schema declares the group), ships, and silently resolves to nothing, so the wizard renders its source-locale string while every other label on the screen is translated. All three levels are exact-match identifiers with a small enumerable universe, so they are resolvable exactly the way dashboardswidgets already is:

levelkeydeclared by
flowFlow.nameflow.zod.ts
screenFlowNode.idflow.zod.ts (type: 'screen' nodes)
fieldScreenFieldConfig.namebuiltin-node-config.zod.ts

Shape of the fix

A flows leg mirroring the dashboardswidgets leg (~50 lines there), plus a universe collector for the three nesting levels, the suggest() / listNames() tables each level needs, and tests. Severity warning, like every other finding in this rule (ADR-0072 D1 — an orphan key is inert, not broken).

Ordering

No dependency in either direction with #11485. That card never authors bundle keys — os i18n extract derives every key it writes from live metadata, so a scaffolded key resolves by construction. This rule is about hand-authored keys, and it becomes worth having precisely once authors have flows keys to hand-edit, which #11485 is what makes possible. So: downstream in value, independent in code.

Refs: #11485 · #11287 (declared the flows group and its resolver) · #7646.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions