Repository navigation
fix(lint): demand flows.FLOW.label for every named flow, the docs flow embed titles any flow by it - #36826
Conversation
…w embed titles any flow by it Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziH9MVhWYLVCiw5eXB
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziH9MVhWYLVCiw5eXB
… and the changeset Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziH9MVhWYLVCiw5eXB
📓 Docs Drift Check2 anchor(s) derived from 2 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 42 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 cf993619cdf3f733d470683e3f89e75fd643f01f && git checkout cf993619cdf3f733d470683e3f89e75fd643f01f
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin f77d078da5f88caf4615f45775172b49310c07c9 b77896a251cdea32aa08d83f57e399154f3a5d45 && git checkout -B drift-repro f77d078da5f88caf4615f45775172b49310c07c9 && git merge --no-ff b77896a251cdea32aa08d83f57e399154f3a5d45
node scripts/docs-audit/affected-docs.mjs --json f77d078da5f88caf4615f45775172b49310c07c9 |
|
repo:objectstack#3 · os-support-ai · session_01WGufziwMkZG34d69p8BHb4 席位核对 — REWORK · repo:objectstack#3 · head 385ed2b · 2026-11-24T03:20ZL1: REWORK Checklist
Findings
Must-fix: none. No nits. NextPush the one-line changeset fix. I re-read on the new head (delta: changeset only) and give ACCEPT if nothing else moved. |
…the every-flow label demand Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziH9MVhWYLVCiw5eXB
|
repo:objectstack#3 · os-support-ai · session_01WGufziwMkZG34d69p8BHb4 席位核对 — ACCEPT · repo:objectstack#3 · head b77896a · 2026-11-24T03:25ZL1: ACCEPT (delta, after REWORK 7121005088 at 385ed2b) Delta read
FindingsMust-fix: none. Should-fix: none. Nits: none new. Landing notesNot governed (138 lines). The area lands on this ACCEPT once CI is green; |
|
repo:objectstack#3 · os-support-ai · session_01WGufziH9MVhWYLVCiw5eXB CI red judged not this PR's · 2026-11-24T03:41Z · head b77896a ·
|
|
repo:objectstack#3 · os-support-ai · session_01WGufziH9MVhWYLVCiw5eXB Landing · 2026-11-24T04:16Z · ACCEPT 7121085713 (L1-b, delta after REWORK 7121005088) at head b77896a
State: ready + auto-merge (area ux-D, not governed, ≤3000 lines). |
Requested by Yibo Wang · project thread
Fixes #36400
Clause-②: no
Metadata-protocol: none
repo:objectstack#3 · os-support-ai · session_01WGufziH9MVhWYLVCiw5eXB
维护者速读
What changes
Landing point:
packages/lint/src/i18n-walk.ts,walkScreenFlows, as the dispatch expected.flows.FLOW_NAME.labelis now demanded for every flow with aname, instead of only a flow holding ascreenorapprovalnode. The comment over the demand now names the key's three readers and says why the third draws any flow.Why every declared flow is "drawn" (the card's rule: "a string nobody reads is not demanded"). The docs viewer's
type: flowembed titles its card bytranslated?.flowLabelfor whichever flow a page names, whatever its nodes (metadata-viewer.tsx:572). The walk already treats that embed as drawing every declared flow: since #36383 it asks every flow's drawn steps forflows.FLOW_NAME.nodes.NODE_ID.label, with no screen/approval predicate (ruling 7076440876, item 1: "A flow node gets a translatable label key under the flow's translation bundle (spec, validation and the business-view reader), so every drawn step (start, end, decision, notify, approval) can carry a label per language."). A card whose steps are demanded and whose title is not is the exact symptom the card describes. So this does not turn on a new product reading: the population is the one thenodesdemand already uses. Independently, the Studio flow designer's rail names every flow of the package by the same key (StudioDesignSurface.tsx:8508, objectstack#35319), though the walk does not use the Studio as a demand basis (its own comment: "the walk asks only for what the docs embed draws").The card's "embedded flow" premise, measured. The card reads "embedded" as an object's or an app's bundled flows. No such declaration site exists: the spec refuses both (tables below). PR #36383's acceptance note 1 used "embedded flow" for a flow drawn by the docs
type: flowembed, and that is what this PR covers. The acceptance arm "a flow nobody draws is not" therefore has one real member: a flow with noname, which no bundle entry can address (pinned).Unchanged on purpose.
successMessagestays demanded only for a flow with a screen (its one reader is the screen runner); thenodes,screens,approvals,refusals,noticesandrecordsfamilies are untouched.packages/cli/src/utils/i18n-coverage.tschanges one comment word ("Screen-flow copy" to "Flow copy, every flow's label").Census 1: readers that draw a flow's label
ui/packages/app-shell/src/views/FlowRunner.tsx:434-445(translateFlow(...).label); hosts pass the served label in atFlowRunsPage.tsx:408,RecordDetailView.tsx:2300,useConsoleActionRuntime.tsx:814packages/plugins/plugin-approvals/src/reader-locale-labels.ts:129(flowLabelKey),:356-358approvalnode opened a requesttype: flowembed, card titleui/packages/components/src/renderers/basic/metadata-viewer.tsx:556(useFlowLabelTranslations),:572(title)ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx:8508(rail),:8632/:9965(header), viametadata-admin/previews/flow-label-translations.tsx:43-45andui/packages/i18n/src/flowLabels.ts:67-77Census 2: where a flow can be declared
flowspackages/spec/src/stack.zod.ts:965(flows: z.array(FlowSchema))config.flowscomposeStacksconcatenatesflows(stack.zod.ts:1677), last wins by name (:3396); each contributed flow is a top-level flow of its own stack, and the ten bundle packages run the walk on their own extract configspackages/spec/src/data/object.zod.ts:1887-1895refusesworkflows/workflowand points at a top-level flowpackages/spec/src/ui/app.zod.ts:1895-1897, "flowsis not an App field — flows are top-level stack metadata"system/app-install.zod.ts:52,system/deploy-bundle.zod.ts:201,229: names or serialized copies of the same top-level flows, not authoring sitesRead first (by risk)
packages/lint/src/i18n-walk.ts, theflows.FLOW_NAME.labelblock at the top ofwalkScreenFlows: the predicate is gone,hasScreensurvives only forsuccessMessage.scripts/i18n-coverage-baseline.json: two rows rise, nothing else moves.packages/cli/test/i18n-flow-screen-coverage.test.ts, the renamed describe "the flow label is demanded for every named flow".Two-minute check:
pnpm --filter @objectstack/cli exec vitest run --project unit test/i18n-flow-screen-coverage.test.ts test/i18n-flow-approval-coverage.test.ts(after building the cli dependency closure); expect 39 passed, including the schedulednightly_digestasked for its label and a nameless flow asked for nothing.Tests
Pins changed (the five that pinned the narrow predicate, rewritten to the new rule)
packages/cli/test/i18n-flow-screen-coverage.test.ts: the describe is now "the flow label is demanded for every named flow": a scheduled flow with no screen emitsflows.nightly_digest.labelseeded with its label; a flow withnameabsent or empty emits nothing; the coverage gate lists both flows' labels in one tree and goes quiet for the one translated. The region-table pin'shttppayload flow now expects its label and still no screen key.packages/cli/test/i18n-flow-approval-coverage.test.ts: the scheduled flow emits only its label (no approval or screen key), and the gate asks the scheduled flow for its label alone.Runs (head 385ed2b)
Test Files 2 failed | 58 passed (60),Tests 5 failed | 652 passed (657); the five failures were exactly the narrow-predicate pins above.Test Files 4 passed (4),Tests 55 passed (55).@objectstack/lintwhole suite:Test Files 229 passed (229),Tests 9513 passed (9513).pnpm --filter @objectstack/lint typecheckandpnpm --filter @objectstack/cli typecheck: exit 0.dist/in the cli suite, so each leg rebuilt@objectstack/lint): the old predicate put back under a marker that survives the build,ablation-dist-preflight"marker present in 2 built files", the two pin filesTests 5 failed | 34 passed (39); restored (blob == HEAD,git diff HEADempty), rebuilt, preflight--absentgreen,Tests 39 passed (39). A first attempt used a comment marker the build strips, so its preflight failed and its reading was discarded.node scripts/check-i18n-coverage.mjsbefore--update:app-showcase 425 -> 449,app-todo 130 -> 136; the newos lintfindings are exactly 24 showcase flow labels (one locale each) and 3 todo flow labels (two locales each). After--update: OK.pnpm check:i18n: all ten bundle packages in sync.dispatch-gates --commandsat 385ed2b: 75 commands, 73 exit 0, 2 NOT MEASURED (exit 3, prerequisite refusals unrelated to this diff:check-plugin-teardown-shape.mjs --self-testneeds an unshallow clone for its pinned fixture,check:dual-build-cjs-loadsneeds a fullpnpm build; both left to CI).dispatch-gates --ranwith recorded exit codes: "75 derived famil(ies) accounted for — 73 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)". Inside the sweep:check:i18n-coverage"OK (14 config(s), 585 baselined untranslated string(s), none new)",check:i18n-walk-parity"17 declared group(s), 15 walked, 2 exempted",check:nul-bytesexit 0.overlap-check.mjs: merges cleanly withorigin/main, no open PR shares a file.Acceptance notes
ruling,maintaineror ⛔ line in the two edited files sits inside the edited block; the nearest cited record is cli(i18n): the extractor and coverage ask forflows.FLOW.labelonly on flows with a screen node, soi18n/missing-flownever asks an app to translate an approval flow or its steps (split from #24863) #24916 (the approvals door), kept as the second reader.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufziH9MVhWYLVCiw5eXB