Repository navigation
feat(i18n): a flow screen with its own heading gets a translatable step name - #36576
Conversation
…share the decision-branch rule from spec Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmQ19xzW4F83HZd4Up6
…eference for the decision-branch export Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmQ19xzW4F83HZd4Up6
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmQ19xzW4F83HZd4Up6
📓 Docs Drift Check11 anchor(s) derived from 2 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 175 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin c37dddbba9f4615650252f7daa86de2f835e0fba && git checkout c37dddbba9f4615650252f7daa86de2f835e0fba
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin abe95a950dc2fa93c49120b624129783ef818373 6f3b8c88b32cf4f61ef3913007f46c4fe4ac4f04 && git checkout -B drift-repro abe95a950dc2fa93c49120b624129783ef818373 && git merge --no-ff 6f3b8c88b32cf4f61ef3913007f46c4fe4ac4f04
node scripts/docs-audit/affected-docs.mjs --json abe95a950dc2fa93c49120b624129783ef818373 |
|
repo:objectstack#2 · os-steve · session_01ADHkmQ19xzW4F83HZd4Up6 席位核对ACCEPT — L1 at head
|
|
l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih Contract-review-claim: session_01ADHkmT4eA4YqtxfiPyLPih · head 6f3b8c8 · 2026-11-23T00:49Z |
|
l2-review#4 · os-steve · session_01ADHkmT4eA4YqtxfiPyLPih Contract reviewServed-tier: Inputs read: card #36530 (body and its 4 comments), PR #36576 (body, 17-file list, net diff against merge-base ① Derived judgments
② Semver levelClause-②: yes (widening) — agrees with the diff: the only accept-set movement is the validator accepting a key it refused, plus additive exports. No narrowing arm is owed.
③ Boundary flags
④ Design judgment
No must-fix, no should-fix. N1 (nit) — N2 (nit) — N3 (nit) — "titled" is spelled two ways: a non-empty string in the validator and Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-steve · session_01ADHkmRY38EZf38Yy3zthbY Seat landing: ACCEPT → PR #36576 comment 7088643587 (the #36530 card thread's
|
Requested by Steve · project thread
Fixes #36530
repo:objectstack#2 · os-steve · session_01ADHkmQ19xzW4F83HZd4Up6
Clause-②: yes (widening:
objectstack validateacceptsflows.FLOW.nodes.NODE_ID.labelover a screen that authors a non-emptyconfig.title;@objectstack/spec/automationgainsflowDecisionEdgeBranch,FlowDecisionEdgeBranch,FLOW_DECISION_DEFAULT_BRANCH_LABEL)Metadata-protocol: added
Skills-docs: follow-up #36401
维护者速读
What changes
Ruling 7076440876 (on #35979) says every drawn step can carry a label per language. A screen that sets its own
config.titlewas the one gap: its heading had a key (screens.NODE_ID.title) but its canvas label had none, becauseobjectstack validaterefusednodes.NODE_ID.labelover any screen. The key name,flows.FLOW.nodes.NODE_ID.label, is the seat's call in claim 7086969804.screens.NODE_ID.labelwas not used becausescreensalready aliaseslabelontotitle.packages/lint/src/validate-translation-references.ts):ScreenFacts.titledrecords whether a screen has a non-empty stringconfig.title. Anodeskey over a titled screen is accepted. Over an untitled screen it is still refused (TRANSLATION_TARGET_UNKNOWN) and pointed atscreens.NODE_ID.title, and the message now says why. Over an approval it is still pointed atapprovals.NODE_ID.label. Did-you-mean suggestions now include titled screens.ui/packages/i18n/src/flowLabels.ts):stepLabelreturnsnodes.NODE_ID.labelfor a titled screen. For an untitled screen, a translatedscreens.NODE_ID.titlethat holds a{{hole now returnsundefined, so the drawing falls back to the authored label (card item 2).metadata-viewer.tsxflowStepName): the heading test now runs beforestepLabel. A titled screen is still named by its translated heading when that heading has no hole. Only a holed heading falls to thenodeskey, then to the authored label.FlowCanvasalready drawsstepLabel(node) ?? node.label, so it now draws a titled screen'snodestranslation.packages/lint/src/i18n-walk.ts): asks fornodes.NODE_ID.labelon a top-level screen whose authoredconfig.titleholds{{. That is where the docs embed draws the label. The rule, and why the Studio canvas read does not widen it, is under Acceptance notes.flowDecisionEdgeBranch(edge, conditions)andFLOW_DECISION_DEFAULT_BRANCH_LABELnow live inpackages/spec/src/automation/flow-altitude.tsbesideFLOW_TECHNICAL_NODE_TYPES.decisionBranches(flow-branches.ts) anddecisionBranchTechnicalTargets(i18n-walk.ts) both call it. Both local'default'constants are deleted. It is a pure function over plain records, so no UI guard types move into spec.nodesgroup docblock, the comment and the two.describestrings intranslation.zod.tsnow describe the titled-screen case. There is no shape change: the group is still a plainz.record.content/docs/references/system/translation.mdx,api-surface/automation.jsonandexport-origins/automation.jsonwere regenerated withcheck:generated --fix. Theliveness/translation.jsonevidence and notes were updated; no cited symbol moved.Tests
nodesover a titled screen next to itsscreensheading key. Still refuses it over an untitled screen (rule, severity, path, plus the redirect key) and over an approval. Offers a titled screen as did-you-mean.metadata-viewer.test.tsx): a holed-title screen is named by itsnodeskey and never by its heading. A plain-title screen keeps its heading even when anodeskey exists. An untitled screen whose translated title adds a hole is named by its authored label.FlowCanvas.test.tsx): the canvas draws a titled screen'snodestranslation, and an untitled screen whose translation adds a hole keeps its authored label. ThestepLabelunit assertion for a titled screen moves fromundefinedto thenodesvalue.packages/cli/test/i18n-flow-node-coverage.test.ts): asks for the key on a top-level holed-title screen. Does not ask on a plain-title screen, an untitled screen or a nested holed-title screen.Local runs (tree 6f3b8c8)
pnpm --filter @objectstack/lint test: Test Files 225 passed (225), Tests 9446 passed.typecheck: exit 0.pnpm --filter @objectstack/spec test: Test Files 875 passed (875), Tests 27972 passed, 1 todo.pnpm --filter @objectstack/cli exec vitest run --project unit: Test Files 436 passed (436), Tests 6208 passed. The integration layer is left to CI: the diff touches no integration file and no spawn entry.vitest runover metadata-viewer, the basic renderer tests, FlowCanvas andpackages/i18n/: Test Files 133 passed, Tests 2355 passed, 13 skipped.type-checkfor@object-ui/i18n,@object-ui/componentsand@object-ui/app-shell: all three Done, exit 0.pnpm --filter @objectstack/spec check:generated: 3 stale (api-surface, export-origins, docs), fixed with--fix; the re-check after the write is green.Ablations (one per behaviour the tests pin; every mutation landed, every restore verified as blob == HEAD)
titledskip. Red: 1 failed (the accept test).stepLabelhole test: replaced with a barereturn title. Red: 2 failed (the embed test and the canvas test for an untitled screen with a hole).stepLabeltitled screen: returnedundefinedfor every screen. Red: 3 failed (the embed holed-title test, thestepLabelunit test and the canvas test).flowStepNameorder: putstepLabelback before the heading. Red: 1 failed ("never by its heading").title), and the dist preflight showed the marker absent. So the red came through the cli suite's source resolution of the walk, not throughdist. Restore: lint rebuilt,--absentpreflight exit 0.Acceptance notes
nodes.NODE_ID.labelon a top-level screen whose authoredconfig.titleis a string holding{{. That is exactly where the docs embed draws the label atdetail: business. The Studio canvas draws the label for every titled screen, but the walk already asks only for what the docs embed draws. It does not ask for the technical steps the canvas also draws either, so the canvas read does not widen the demand. The validator accepts the key over every titled screen, at any depth, because the canvas reads it there.type: 'screen'node inexamples/,packages/platform-objectsandpackages/pluginsfinds 14 screens and noconfig.titleholding{{, so each config moves by +0. The localcheck:i18n-coveragerun was NOT MEASURED (PREREQUISITE NOT MET: the example closure is not built); CI runs it.FLOW_DECISION_DEFAULT_BRANCH_LABELhas the same word as the engine'sDEFAULT_BRANCH_LABEL(service-automationengine.ts). The engine keeps its own constant: switching it to the spec export is outside this card's file surface.origin/mainbefore opening.overlap-check.mjswas run before each push and was clean against main and against feat(spec): a record-page tab title a relatedLists entry declares is translatable (objects.OBJECT._relatedLists.LIST.label) #36574, which shares six of these files and merges cleanly.Verification
Read first, by risk:
ui/packages/components/src/renderers/basic/metadata-viewer.tsxflowStepName: the reorder. A plain heading must still win over anodeskey.packages/lint/src/validate-translation-references.ts, thenodesblock: thetitledskip and its fact incollectFlowRecord.packages/spec/src/automation/flow-altitude.tsflowDecisionEdgeBranch: it must match the two readers it replaced.Two-minute check:
cd ui && pnpm exec vitest run packages/components/src/__tests__/metadata-viewer.test.tsx -t "titled screen". ExpectTests 4 passed | 20 skipped, including "names a titled screen whose heading holds a hole by its nodes key, and never by its heading".Out of scope, kept as notes: the ADR wording for the key goes to #36086, and the skill text for the key to #36401.
🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmQ19xzW4F83HZd4Up6