Repository navigation
fix(components): the docs flow embed names the flow and its approval steps in the reader's language - #36335
Conversation
…approval steps in the reader's language The flow-label resolution the Studio designer and FlowRunner read moves from app-shell into @object-ui/i18n, so the docs viewer's FlowView reads the same flows.FLOW.label and flows.FLOW.approvals.STEP.label, falling back to the authored text. Claude-Session: https://claude.ai/code/session_01FEkQ5okniknzVVR3KTSVr1 Co-Authored-By: Claude <noreply@anthropic.com>
…tep labels and their authored fallback Claude-Session: https://claude.ai/code/session_01FEkQ5okniknzVVR3KTSVr1 Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5okniknzVVR3KTSVr1 Co-Authored-By: Claude <noreply@anthropic.com>
…low-label helpers The flows-bundle reader moves into @object-ui/i18n as flowsBundle.ts, kept whole, and flowLabels.ts imports it, so the Studio test's import and the package entry match the parallel move of the same reader. Claude-Session: https://claude.ai/code/session_01FEkQ5okniknzVVR3KTSVr1 Co-Authored-By: Claude <noreply@anthropic.com>
main already moved activeFlowsBundle into @object-ui/i18n; keep main's flowsBundle.ts and drop this branch's duplicate move. This branch keeps flowLabels.ts, its index export and the docs viewer's two label reads. Claude-Session: https://claude.ai/code/session_01QsR2jV3scu6UYPb42n5okQ Co-authored-by: Claude <noreply@anthropic.com>
…helpers this PR adds Claude-Session: https://claude.ai/code/session_01QsR2jV3scu6UYPb42n5okQ Co-authored-by: Claude <noreply@anthropic.com>
…embed-labels Keeps main's FlowView branches and entry condition and this branch's two label reads. The branch list main added names each target step, so it takes the same translated step label: an approval step a decision leads to is named in the reader's language there too, pinned in the label translations describe. Claude-Session: https://claude.ai/code/session_01QsR2jV3scu6UYPb42n5okQ Co-authored-by: Claude <noreply@anthropic.com>
…translated step label Claude-Session: https://claude.ai/code/session_01QsR2jV3scu6UYPb42n5okQ Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jV3scu6UYPb42n5okQ Final head for L1 · area f7-shell · 2026-11-22T15:06Z
|
…ject-ui/i18n's public exports Claude-Session: https://claude.ai/code/session_01QsR2jV3scu6UYPb42n5okQ Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf L1 ACCEPT · head 维护者速读
席位核对
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jV3scu6UYPb42n5okQ Final head for delta L1 + L2 · area f7-shell · 2026-11-22T15:31Z
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: The face is the declaration face. The diff touches no published schema and no governed path, and the PR body and the changeset both carry ① Derived judgments
② Semver levelThe changeset Clause-②: yes (widening) is right. The commit 38fa51f respelled it from ③ Boundary flags
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jV3scu6UYPb42n5okQ Landing · area f7-shell · 2026-11-22T15:36Z
State: ready + auto-merge into the merge queue. |
objectstack-ai#35928) (objectstack-ai#36316) <!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XTRdLmK9YYgMSCJ7NH2PuUY)_ repo:objectstack#7 · zhuangjianguo · session_01QsR2jVTYADzVWfarACx5j3 Fixes objectstack-ai#35928 Clause-②: yes (widening: one new public read, `POST /api/v1/automation/_record-starts`, and the UI exports that read it) Metadata-protocol: added Skills-docs: none — no skill under `skills/**` teaches the console's stage confirms; `content/docs/automation/flows.mdx` and `content/docs/frontend/plugins/plugin-grid.mdx` document the read and the list in this change. Ruling-ref: 7073655354 ## 维护者速读 - 用户在列表单元格或记录页改阶段时,确认框在原来那句话下面列出这次改动会启动的流程名称(按用户语言显示),带审批的流程标「发起审批」;以前只写「可能触发相关自动化」。 - 属于行内编辑专题,按维护者的裁定「能改这条记录的人都看到流程名称」,让用户确认前就知道保存后会发生什么。 - 出错时最多是清单少列或不显示,确认框退回今天那句话,保存本身不受影响;整个改动可以直接撤回。 - 无。 ## What changes **Server (one new read).** - `@objectstack/spec/api`: `RecordUpdateStartsRequestSchema` (`{ object, recordId, changes }`, strict), `RecordUpdateStartSchema` (`{ name, label, startsApproval }`), `RecordUpdateStartsResponseSchema`, and the contract entry `listRecordUpdateStarts` (`POST /api/v1/automation/_record-starts`). `_record-starts` joins the `/automation` domain's reserved position literals (underscore-led, so the package-namespace install gate is not narrowed). - `@objectstack/spec/contracts`: `RecordUpdateStartsInput` and the optional `IAutomationService.listRecordUpdateStarts`. - `@objectstack/spec/automation`: `recordChangeTriggerHookEvents` / `recordChangeTriggerFiresOnUpdate`, the record-change token grammar MOVED out of `@objectstack/trigger-record-change` (whose `triggerTypeToHookEvents` now delegates to it), so the trigger and the preview read one rule. - `@objectstack/service-automation`: `AutomationEngine.listRecordUpdateStarts` (`record-update-starts.ts`). A flow is asked only when it is enabled and armed on a `record_change` trigger for this object whose token binds an update; whether it starts is `startConditionHolds`, the one start-condition gate every run attempt passes, over the variables `seedRunVariables` seeds (`record`, its flattened fields, `previous`). The approval mark is the presence of an `APPROVAL_NODE_TYPE` node (ADR-0019). A condition that throws is not listed. Hooks are never listed (ADR-0077 §2). - `@objectstack/runtime`: the `/automation` domain's `_record-starts` door, mounted in the dispatcher plugin and recorded in the route ledger. Order: query parameters refused `400 VALIDATION_ERROR`; body parsed through the request schema (`400 VALIDATION_FAILED`); `501` when the engine has no preview; the record read AS THE CALLER through the `/data` door's own `get` (`callData`), so an unreadable record answers `404 RECORD_NOT_FOUND` exactly like an absent one and the engine is never asked; a read that answers no record is refused the same `404`; every `changes` key must be a declared field of the object (else `400 VALIDATION_FAILED` on `changes.KEY`, the engine never asked); then the engine is handed `previous` = the record read, `record` = that record with `changes` applied, and the caller's `userId` / `tenantId`. Anonymous `401`. - `@objectstack/client`: `client.automation.listRecordUpdateStarts(request)`. **UI (two confirms, one reader).** - `@object-ui/plugin-detail`: `stageChangeStarts.tsx` — `useRecordUpdateStarts(ask)` (asks the route once per pending move through the host's `apiFetch`, parses the answer through `RecordUpdateStartsResponseSchema`, answers `[]` while in flight, refused, failing, malformed or empty) and `StageChangeStarts` (the list under the sentence: each flow by its label translated through `activeFlowsBundle` + the spec's `translateFlow`, the flow runner's reading; an approval flow marked). Exported for the grid. - Record page: `recordPathStageChange.tsx` draws it in both confirmations (the path's `AlertDialog` and the header stage menu's `RequiredFieldsDialog`, via a new optional `notice` slot in `@object-ui/fields`). - List cell: `ObjectGrid`'s state-machine confirm draws it; `StateChangeConfirm` gains an optional `ask` (the row's record id and the move). - `@object-ui/i18n`: `activeFlowsBundle` moves here from `@object-ui/app-shell`'s module-internal `utils/flowsBundle` (its three app-shell importers repointed), since the confirms' packages do not depend on the console; two keys in all eleven packs: `detail.stageChangeStartsHeading`, `detail.stageChangeStartsApproval`. - The confirm's sentence is never replaced (not this card: objectstack-ai#35685 S3). A move that starts nothing, and a failed read, leave the confirm exactly as today. Docs: `content/docs/automation/flows.mdx` (§ Which flows a record update would start), `content/docs/frontend/plugins/plugin-grid.mdx` (the confirm now names the flows). Changesets: `35928-record-update-starts-read.md`, `35928-stage-confirm-names-flows.md`, both carrying the Clause-② and Metadata-protocol lines. ## Tests - Engine `record-update-starts.test.ts` (8): condition holds / does not hold; approval mark CONTROL (an approval flow and a plain flow side by side); no condition; create / delete / other object / obsolete never named while `record-before-write` is; an unevaluable condition not named; an unarmed engine answers nothing; `current_user` evaluated as the writer named. - Door `automation-record-update-starts.test.ts` (13): a member is answered (body parsed through the response schema) and the engine is handed exactly the record read as the caller; empty list; unreadable record `404 RECORD_NOT_FOUND` with the engine never asked; unreadable and absent answer alike; anonymous `401` before any read; malformed body `400 VALIDATION_FAILED`; query parameter `400 VALIDATION_ERROR`; `501` without the preview; a GET of the literal is not this door.; a change key that is not a field `400 VALIDATION_FAILED` on that key (an undeclared key, a key off the field-name grammar, an inherited member name), the engine never asked; a change on an object the registry does not declare refused alike; a read that answers no record `404 RECORD_NOT_FOUND`, never previewed; and the ledger row names `RecordUpdateStartsRequestSchema` / `RecordUpdateStartsResponseSchema`, as the clone and publish-drafts suites pin theirs. - Spec `automation-api.zod.test.ts`: contract count and the new entry's method/path; request strictness; a leaked `condition` / `nodes` dropped by the response parse. Each `changes` key is held to the field-name grammar (refused: a dotted, an upper-case, a digit-initial, a spaced and an empty key). - List cell, in its confirm's harness `ObjectGrid.autosave-35685.test.tsx` (new top-level describe, 3): list (request body pinned, labels, approval mark under the unchanged sentence), empty, failure (and Change still saves the move). - Record page, in each confirm's harness (new top-level describe in each, 3 + 3): `record-path.stageChange-28199.test.tsx` (the path's confirmation) and `RecordStageMenu-35891.test.tsx` (the header stage menu's dialog): list, empty, failure (a refused read, a network error and a malformed envelope each draw no list). - `stageChangeStarts-label-35928.test.tsx` (2): a flow named by its translation where the app's `flows` bundle has one, by its authored label where not; nothing drawn for no flows. - Ablation (one-shot under the verify lock, restored by trap, `git diff HEAD` on both sources empty): removing the `StageChangeStarts` render from `ObjectGrid.tsx` and from both confirmations in `recordPathStageChange.tsx` turns exactly the three `list:` pins red (`Tests 3 failed | 6 passed`); empty and failure pins stay green, as they should. ## Acceptance notes - Card acceptance: "Changing a stage that starts a flow shows that flow by name in both confirms" — pinned in both confirms (list cell, and both record-page confirmations) and measured live (below); "a stage with nothing attached shows no list" — the empty pins; "a read failure falls back to the generic sentence" — the failure pins. - Residual, stated in the contract docblocks and `flows.mdx`: the preview binds the caller's user id and tenant only, not their positions, request params or expand as a live run does, so for a condition reading those the preview can differ from the save in either direction (it can miss a flow, or list one a negated test of the writer would stop); the seat files the follow-up for positions. - Residual (not widened here): conditions are judged on the record as the CALLER reads it (field-level security applied), so a condition that reads a field the caller cannot see is judged on what they see, and one that throws on a missing field is not listed. The preview can therefore under-list for a caller with masked fields; it never reveals a masked value. Documented in `flows.mdx`. - Residual: the header stage menu's dialog asks with the stage alone; values typed into that dialog for required fields are not part of the preview's `changes`. - Two existing confirm suites (`RecordStageMenu-35891`, `record-path.stageChange-28199`) now stub `fetch` with a `501` answer in `beforeEach`, so the new read does not leave for the network under test; no existing assertion changed. Across the touched UI packages the run shows 0 `ECONNREFUSED`. - The approval mark is the ruling's test, "the flow contains an approval node". Measured live, showcase's `showcase_project_closure` reaches its sign-off approval through a `subflow` node (the approval node lives in `showcase_closure_signoff`), so the preview lists it with `startsApproval: false`. Following subflow references for the mark is a reading beyond the ruling: filed objectstack-ai#36322. - Overlap (`overlap-check.mjs` at the head below, exit 1, reported and not merged around): objectstack-ai#36296 and objectstack-ai#36236 have landed and are merged in. objectstack-ai#36335 (part of objectstack-ai#35979) moves `activeFlowsBundle` into `@object-ui/i18n` too and conflicts in `ui/packages/i18n/src/flowsBundle.ts`, `ui/packages/i18n/src/index.ts` and `ui/packages/app-shell/src/views/metadata-admin/previews/flow-label-translations.tsx`; it lands after this PR and drops its copy of the move. Every other open PR that shares a file merges cleanly. - Declaration correction: the claim and ruling 7073655354 read `Metadata-protocol: none`, but the three new `@objectstack/spec/api` schemas enter the `api` authorable-surface shard (10 keys), which `Check Changeset` reads as `added` (`none-baseline-moved`). The line is `added` and `@objectstack/spec` is graded `minor`, as objectstack-ai#32251, objectstack-ai#35789 and objectstack-ai#31883 were for new api request/response schemas. No flow or other metadata key is added, so the ruling's "no new authorable key" still holds. ## Verification - Read first: `packages/runtime/src/domains/automation.ts` `respondToRecordUpdateStarts` (the order of refusals and the caller-scoped read that admits the engine), then `packages/services/service-automation/src/record-update-starts.ts` (which flows are asked and the one gate they pass). - Live, on a fresh showcase (`pnpm dev -- --fresh`), as a member created by the admin (`role: user`, not an admin): - `Website Relaunch` `status: active → completed`: `200 {"flows":[{"name":"showcase_project_closure","label":"Project Closure with Sign-off (nested pause)","startsApproval":false}]}` - same record `→ on_hold` (CONTROL): `200 {"flows":[]}` - same record `budget 150000 → 250000`: `200 {"flows":[{"name":"showcase_budget_approval","label":"Project Budget Approval","startsApproval":true}]}` - an absent record: `404 RECORD_NOT_FOUND`; anonymous: `401 UNAUTHENTICATED`; a body without `changes`: `400 VALIDATION_FAILED` naming `changes`. - Zone 2 premise, measured before any code: the same kind of member reads `GET /api/v1/meta/flow` (200, 33 flows with labels, the admin's set) and `GET /api/v1/meta/flow/showcase_closure_signoff` (200, its nodes). - The console itself was not driven in a browser (its dist is not built in this container); both confirms are pinned through the real components above. - Local, all under `scripts/pm/os-verify-lock.sh` (shared box): - touched UI packages (`plugin-detail`, `plugin-grid`, `fields`, `i18n`): `Test Files 1131 passed | 2 skipped` · `Tests 13186 passed | 38 skipped`; after folding the pins into their harness files the three files plus the label file: `Tests 77 passed (77)`. - type-check: `tsc --noEmit` (src and test projects) for `i18n`, `fields`, `plugin-detail`, `plugin-grid`, and src for `app-shell`; `service-automation`, `runtime`, `client` exit 0. - server: engine 8/8, door 9/9, `route-ledger.conformance` + `automation-api-contract-mounts` + `http-dispatcher` green, client conformance 11, spec `automation-api.zod` + `address-grammar` 87, `trigger-record-change` 122. - `dispatch-gates.mjs --commands` (129 families) run and reconciled with `--ran`: `129 run, 0 NOT-MEASURED`. First pass reds were all this diff's own owed artefacts, fixed and re-run green: spec `gen:api-surface` / `gen:docs` / `gen:export-origins` / `gen:declaration-map` / `gen:strictness-ledger` (api count 533 → 536: the three new schemas), the route-ledger census sentence (149 → 150), and `check:test-source-alias` (a spec/automation alias in the trigger package's vitest config; the door test pays `@objectstack/metadata` at collection). - Re-verified after the hand-over (seat 7), main `b3bcfefc` merged in at `472457d9`, the generated surfaces regenerated at `6bd111ff` (`gen:schema` → spec build → `gen:api-surface` → `gen:export-origins` → `gen:declaration-map` → `gen:docs` → `gen:strictness-ledger`; `check-regen-pending` clear), the changeset correction at `99bfd857`. Under the verify lock at `6bd111ff`: - type-check exit 0: `@object-ui/i18n`, `fields`, `plugin-detail` (src and test; the hand-over's stale-dist red is gone after the closure build), `plugin-grid`, `app-shell`; `@objectstack/spec`, `runtime` (src and test layer, after building `@objectstack/driver-turso`), `service-automation`, `client`, `trigger-record-change`. - tests: `runtime` Tests 11745 passed | 25 skipped; `service-automation` 4224 passed; `client` 820 passed; `trigger-record-change` 122 passed; spec `automation-api.zod` + `address-grammar` 87 passed; `plugin-detail` + `plugin-grid` + `fields` + `i18n` Test Files 1135 passed | 2 skipped, Tests 13300 passed | 38 skipped. - `dispatch-gates.mjs --commands` (129 families): run at `99bfd857` (the six that started before that commit re-run on it) and reconciled with `--ran`: `129 derived, 128 run, 1 NOT-MEASURED, 0 UNRUN`. The one NOT-MEASURED is `check:dual-build-cjs-loads` (exit 3, PREREQUISITE NOT MET: it needs every package's dist, which this container does not build); CI runs it in its Lint jobs, green at this head. - CI at `99bfd857`: every check-run green or skipped by design. Check Changeset shows two runs: the `synchronize` run (09:07Z, before the body said `added`) red, the `edited` run (09:08Z) green. - Contract review rework (L2 at `99bfd857`), at `3ba211dc` and `d2279e6c` (head): - the door refuses a change key that is not a declared field of the object and a read that answers no record; the request schema holds each change key to the field-name grammar; the ledger row is pinned; the preview's caller binding is stated in the contract docblocks and `flows.mdx`; `_record-starts` joins the address module's literal list. - ablation, one-shot under the verify lock (`ablation-replace.mjs`, restored by trap, blob == HEAD and `git diff HEAD` empty after each): the declared-field refusal disabled → `Tests 2 failed | 11 passed` (the two refusal pins); the no-record refusal disabled → `Tests 1 failed | 12 passed` (its pin). - local: `runtime` Test Files 637 passed, Tests 11749 passed | 25 skipped; door suite 13/13 at the head; spec `automation-api.zod` + `address-grammar` 88 passed; type-check exit 0 for `spec`, `runtime` (src and test layer, at `d2279e6c`), `service-automation`, `client`, `plugin-detail`. - `dispatch-gates.mjs --commands` at `3ba211dc`: `129 derived, 129 run, 0 NOT-MEASURED, 0 UNRUN`; the 37 families that read test files re-run at `d2279e6c` (a one-line test-type fix), all exit 0. - CI at `d2279e6c`: 70 check-runs, 61 success and 9 skipped by design, Check Changeset green. - Delta round (L1-d 7078831268, L2 nit N3 from 7078841748), at `41487226` (head): the 401 and 501 pins assert `body.error.code` (`UNAUTHENTICATED`, `NOT_IMPLEMENTED`) beside the status; the spec changeset names the undeclared-change-key `400 VALIDATION_FAILED` and the no-record `404` among the door's refusals; the caller-binding limit reads "can differ from the save in either direction" in the request schema's docblock, `RecordUpdateStartsInput` and `flows.mdx`. Door suite 13/13; type-check exit 0 for `spec` and `runtime` (src and test layer); `dispatch-gates.mjs --commands` at `41487226`: `129 derived, 129 run, 0 NOT-MEASURED, 0 UNRUN`; CI at `41487226`: 70 check-runs, 61 success and 9 skipped by design. https://claude.ai/code/session_01FEkQ5keqTTiV8ptWFNc6ZF https://claude.ai/code/session_01QsR2jVTYADzVWfarACx5j3 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- signed: repo:objectstack#7 · zhuangjianguo · session_01QsR2jVTYADzVWfarACx5j3 --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…ranches and their conditions (objectstack-ai#36327) <!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Steedos** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbUq2j5tRRVo3TVY3wcS1Fdg)_ Fixes objectstack-ai#36094 Clause-②: no Metadata-protocol: none ## 维护者速读 - 文档里嵌入的流程图(业务视图)现在在每个判断步骤下列出各分支:条件(如"金额 > 500,000",按读者语言和币种格式化)和去向步骤;流程的触发条件在步骤上方显示一次。 - 为 HotCRM 销售手册服务:大额审批的金额门槛随管理员在 Studio 中的修改自动更新,手册不用再手抄金额。 - 读不懂的复杂条件只显示中性的"条件"字样,不会显示原始表达式;出错只影响这张卡片的显示,撤回本 PR 即恢复原样。 - 无。 ## What changes - `ui/packages/components/src/renderers/basic/flow-branches.ts` (new, pure): `decisionBranches` reads a decision's branches in both forms the engine runs (a `config.conditions` decision through its out-edge labels, `default` / `isDefault` as "otherwise"; a gateway decision through its out-edges' `condition`). `readCondition` is a small fail-closed reader: comparisons of one field of the flow's object with one literal, joined by `&&` / `||`, with parentheses. Presence guards on the compared field (`has(x)`, `x != null`; `!has(x)`, `x == null` under `||`) are dropped, since the platform's null-guard rule puts one on every ordering comparison. Anything else answers `null`. A top-level conjunction with some unread terms reads as `A and other conditions`: each read term is necessary, the rest are named rather than dropped. - `metadata-viewer.tsx` `FlowView`, business view only: under each decision, its branches (condition or neutral marker, arrow, target step). The start node's condition is shown once above the steps (`Runs when …`). Field label and options come from the flow's object, `useMetadataItem('object', start.config.objectName)`, which is one extra request per embed. That request lives in `FlowConditions`, which mounts once the flow is known, so the conditions never draw unread for a render. Amounts use the reader's locale (`useDisplayLocale`) and, for a currency field, `resolveFieldCurrency(field, tenant currency)`. A whole threshold prints whole (`$500,000`). The technical view (`detail: technical`) is unchanged and makes no object request. - Six new `element.metadataViewer.*` strings in all eleven packs (`condition`, `otherwise`, `conditionAnd`, `conditionOr`, `conditionMore`, `runsWhen`). - The two label reads objectstack-ai#35979 changes (`flow.label`, `n.label`) are untouched. A branch's target label reads `target.label` in `Branches`; whichever PR lands second routes it through objectstack-ai#35979's resolver. - The reader's field shape is named `FlowConditionField`: `@object-ui/plugin-list` already exports a `ConditionField` interface, and `one-authority-per-exported-name` refuses a second declaration of one exported name (it went red in `Test UI (10/16)` at c3bc920; renamed in c8300e9). - Changeset: `@object-ui/components` and `@object-ui/i18n` patch. **Read first** (riskiest first): `flow-branches.ts` `isGuard` and `read` (what is dropped as a guard, and when a partial reading is allowed), then `FlowConditions` in `metadata-viewer.tsx` (the loading gate). **Two-minute check:** `pnpm --dir ui exec vitest run packages/components/src/__tests__/metadata-viewer.test.tsx`. Expect 15 passed, including the six `flow branches (objectstack#36094)` cases. ## Tests - `ui/packages/components/src/renderers/basic/__tests__/flow-branches-36094.test.ts`: the reader (9 readable shapes, 17 refused shapes), both decision forms, the subject and entry-guard resolution. - `metadata-viewer.test.tsx` (the component's shared harness, one new top-level `describe`), on a hotcrm-shaped `opportunity_approval` served with `{ dialect: 'cel', source }` envelopes: `Amount > 500,000` beside the branch to Sales Director Sign-off and `Amount ≤ 500,000` beside the other branch; a 750000 threshold in the served definition draws `Amount > 750,000` and no `500,000`; `$500,000` under a USD tenant; a field-to-field condition draws the neutral marker and no raw CEL; the conditions wait for the object; the technical view draws no branch, no entry line and makes no object request. <details><summary>Readings at head c8300e9 (the rename)</summary> - `Test UI (10/16)` at c3bc920 was red on `ui/scripts/__tests__/one-authority-per-exported-name-6273.test.ts`: "ConditionField — a NEW colliding name", `flow-branches.ts:348` against `plugin-list/src/conditions/conditionModel.ts:31`. c8300e9 renames the reader's interface to `FlowConditionField` (3 files, 7 lines, no behaviour change), so no ablation. - Under the verify lock at c8300e9: that gate test plus `flow-branches-36094.test.ts` plus `metadata-viewer.test.tsx` gave `Test Files 3 passed (3)`, `Tests 57 passed (57)`, `VERDICT command-exit 0`. - `pnpm --dir ui exec vitest run --maxWorkers=2 scripts/` (NOT MEASURED at c3bc920) gave `Test Files 172 passed | 2 skipped (174)`, `Tests 5122 passed | 2 skipped (5124)`, `VERDICT command-exit 0`. - `pnpm --filter @object-ui/components run type-check` exit 0, then `pnpm check:type-check-debt` exit 0 ("129/132 workspace packages type-checked ... 0 in the DEBT ledger"). - CI on c8300e9: 45 success, 13 skipped, 0 failed (`Test UI` and `Test UI (10/16)` success). </details> <details><summary>Readings at head c3bc920</summary> - Green, at c3bc920, run without the lock and declared (the lock queue had not moved for over 40 minutes): `pnpm --dir ui exec vitest run --maxWorkers=1 packages/components/src/renderers/basic/__tests__/flow-branches-36094.test.ts packages/components/src/__tests__/metadata-viewer.test.tsx` gave `Test Files 2 passed (2)`, `Tests 46 passed (46)`. - Earlier, under the lock, at 29ee835: the two files plus `packages/i18n/` (key-parity tests included) gave `Test Files 107 passed (107)`, `Tests 2007 passed | 13 skipped`, `VERDICT command-exit 0`. - `pnpm --filter @object-ui/components run type-check` exit 0 and `pnpm --filter @object-ui/i18n run type-check` exit 0. `--listFiles` counts the new test file and the harness in the test program (2) and the new module in the source program (1). - Ablations, one per leg. Each mutation went through `scripts/ablation-replace.mjs` (anchor 1 to 0, blob moved) and was restored to the HEAD blob with `git diff HEAD` empty: - reader: `readComparison` returns null. `3 failed | 11 passed (14)`. - neutral marker: unreadable source drawn raw. `1 failed | 13 passed (14)`. - technical view: technical card wrapped in the condition scope. `1 failed | 13 passed (14)`. - loading gate: `if (subject.loading)` deleted. `3 failed | 12 passed (15)` at c3bc920. The same mutation stayed green (14/14) at 29ee835, before the deterministic pin "waits for the flow's object" was added. That pin is why it exists. - i18n gates: `node ui/scripts/check-i18n-call-site-keys.mjs` exit 0, `check-i18n-dead-keys.mjs` exit 0, `check-i18n-en-drift.mjs` exit 0 ("No en value changed in this range"). </details> ## Acceptance notes - **Served shape, measured at the parse layer only.** A hotcrm-shaped fixture through the spec's `FlowSchema` (spec source at this branch's base): edge and start `condition` come back as `{ dialect: 'cel', source }` (a bare string normalizes to it), and `config.conditions[].expression` stays a bare string. The reader takes both spellings of `EvaluatedExpressionInputSchema` and no other. A live `GET /api/v1/meta/flow/…` read was NOT MEASURED: no server build was available in the container while the verify lock was saturated. - **No CEL-to-text helper exists in a package `@object-ui/components` imports.** app-shell's `celToRows` is a round-trip reader for the edge inspector's own spellings, and app-shell is off-limits to components. `@objectstack/formula`'s `parseCelToAst` is a real parser, but components does not declare that dependency. Per the dispatch, this PR writes the smallest reader and fails closed. Moving it onto `parseCelToAst` would need a manifest edit and is noted here, not done. - **Not read (neutral marker):** `previous.*`, a field compared with a field, function calls, list membership, booleans, dates, percents, and a `get_record` variable reading another object (it would need a second object request). hotcrm's start condition reads `Amount ≥ 100,000 and other conditions`. - Branch targets that are technical steps (for example `Mark Approved`, an `update_record`) are named in the branch line even though the step list hides them. - An approval node's `approve` / `reject` out-edges are not drawn as branches. The card asks for decisions only. ## Verification Local subset from `node scripts/pm/dispatch-gates.mjs --commands` (41 families), re-run at c8300e9: 41 exit 0, including `pnpm --dir ui exec vitest run scripts/` and `pnpm check:type-check-debt` (both NOT MEASURED at c3bc920). `--ran` reconciliation: "41 derived famil(ies) accounted for — 41 run, 0 NOT-MEASURED". `node scripts/check-platform-checklist.mjs --changed-from origin/main` exit 0 (0 anchored files). `overlap-check` at c8300e9: `VERDICT overlap exit 1`, conflicting only with objectstack-ai#36335 (the sibling label-translation PR, routed to land after this one and merge main). The full farm is CI's: on c8300e9, 45 check-runs success, 13 skipped, 0 failed. --- _Generated by [Claude Code](https://claude.ai/code/session_01QsR2jV3scu6UYPb42n5okQ)_ <!-- signed: repo:objectstack#7 · zhuangjianguo · session_01QsR2jV3scu6UYPb42n5okQ --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…flows.FLOW.nodes.NODE_ID.label (objectstack-ai#36383) <!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Steedos** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbYV2nRmpjdz5BmCf9psuMXA)_ Part of objectstack-ai#35979 (Asked item 2 only, as ruled in comment 7076440876; Asked item 1 is PR objectstack-ai#36335, merged) repo:objectstack#7 · zhuangjianguo · session_01QsR2jTrJZvNaijgX3NxBMc Clause-②: yes (widening: a new translation key `flows.FLOW.nodes.NODE_ID.label`; the new exports `FLOW_TECHNICAL_NODE_TYPES` and `isFlowTechnicalNodeType` from `@objectstack/spec/automation`; and `@object-ui/i18n`'s exported `FlowLabelTranslations` type gains the member `screenTitle`, and its `stepLabel` parameter accepts a `config`) Metadata-protocol: added Skills-docs: follow-up objectstack-ai#36401 ## 维护者速读 - 用户能看到什么变化:应用包现在可以给流程里每个步骤(开始、判断、通知、结束等)写各语言名称;手册里的流程图和 Studio 流程画布都按读者语言显示这些步骤名,中文下不再夹英文。已发布语言的应用在检查里会多出这些步骤的缺译提示。 - 为什么做:HotCRM 销售手册的审批流程图在中文下仍显示英文的判断和通知步骤,维护者在卡上选了「补上翻译位,可以翻译」。 - 出错会怎样:只影响显示和缺译提示,不改流程运行和任何数据;可直接撤回。 - 要你做什么:无。 ## What changes Both halves are on this branch: the key, its validation and its coverage demand, and the readers that draw it (on `main` since PR objectstack-ai#36335 merged the shared flow-label resolution into `@object-ui/i18n`). - **The key** (`packages/spec/src/system/translation.zod.ts`). `flows.FLOW.nodes.NODE_ID.label`, a strict entry with one plain-text leaf, `label`, overlaying the node's own `FlowNode.label`. It addresses every node but a `screen` (whose `screens.NODE_ID.title` covers `config.title ?? node.label`) and an `approval` (`approvals.NODE_ID.label`), so one string keeps one key. `nodes` was an unknown-key alias onto `screens`; it is now the real group (`node` aliases onto it). The `## nodes` docblock section states the rule; the convention list gains the row. - **Start and end nodes (ruling item 3).** Keyed like any other step; the viewer supplies no words of its own. Measured on `examples/app-showcase` at c448c61: of the start/end labels, 25 are `End` and 11 `Start`, but the rest name an outcome or a trigger (`Approved` x5, `Rejected` x5, `Signed Off`, `Declined`, `On Task Created` x3, `Daily at 06:00`, ...), which a generic word would erase. - **Validation** (`packages/lint/src/validate-translation-references.ts`). A `nodes` key over an unknown node is `translation-target-unknown` with the nearest node offered; over a `screen` it is pointed at `screens.NODE_ID.title`, over an `approval` at `approvals.NODE_ID.label`. The reverse slips now point at the new key: a `screens` or `approvals` key over any other node says `its label is keyed nodes.NODE_ID.label` (two existing messages gain that clause instead of "so nothing resolves"). - **The demand** (`packages/lint/src/i18n-walk.ts`, `i18n/missing-flow`). Every top-level node the docs embed draws at its default `detail: business` altitude, minus screens and approvals, which were already demanded; and, since the embed's branch list names the step each branch of a drawn decision leads to, a folded technical step a branch names (seat reading L2 S1; live case: app-todo's `check_recurring` branching to the `compute_next_due_date` script). `decisionBranchTechnicalTargets` mirrors which out-edges the viewer lists (`flow-branches.ts` `decisionBranches`). Region-nested nodes are accepted by validation but not demanded: the embed does not draw them. `packages/cli/src/utils/i18n-coverage.ts` only updates the bucket's description. - **The readers** (`ui/packages/i18n/src/flowLabels.ts`). The shared `stepLabel` now reads each step's one key by node type: `approvals.NODE_ID.label` for an approval, `screens.NODE_ID.title` for a screen with no `config.title`, `nodes.NODE_ID.label` for any other node. The docs viewer's `type: flow` embed (`metadata-viewer.tsx`, new `flowStepName`) names each drawn step and each decision-branch target by it; the Studio canvas (`FlowCanvas`, and `flow-region-view`'s `RegionNode` for nested region nodes) and the inspector heading read the same `stepLabel` unchanged, so a nested node's key, which validation accepts, has a reader. - **A titled screen (seat reading S3).** A screen with its own `config.title` shows that heading at run time, translated under `screens.NODE_ID.title`; its canvas label has no key. The docs embed names such a screen by its heading (translated where the bundle carries it), unless the heading holds a `{{ }}` hole a drawing cannot fill, in which case it keeps the authored label. `FlowLabelTranslations` gains `screenTitle` for this read. The Studio canvas keeps a titled screen's authored label, since that is the label the designer edits. - **One table for business altitude** (`packages/spec/src/automation/flow-altitude.ts`). The viewer's private `TECHNICAL_NODE_TYPES` set becomes `FLOW_TECHNICAL_NODE_TYPES` + `isFlowTechnicalNodeType` in `@objectstack/spec/automation`; the viewer folds steps by it and the walk demands by it, so they agree on which steps a reader sees. - **Examples.** `app-crm`'s lead-conversion wizard gets its three drawn steps in zh-CN (its baseline stays 0). The ratchet in `scripts/i18n-coverage-baseline.json` is raised for the new population, as the PR that first walked the validation-message family did: `app-showcase` 317 -> 425 (+108, one of them the folded `showcase_inquiry_purge.purge` a branch names), `app-todo` 106 -> 130 (+24, two of them `todo_task_completion.compute_next_due_date` in its two translated locales); the other 12 configs are unchanged (the ten bundle packages stay 0, `check:i18n` in sync). - **Ledger and pins.** `liveness/translation.json` gains `flows.nodes` (+ `label`), `live`, citing `flowLabelTranslations`, `flowStepName`, `FlowCanvas` and `RegionNode`. `flows-translation-face.test.ts`: the `node.label` row now lists `nodes.NODE.label` beside `approvals.NODE.label`. - **Generated.** `api-surface/automation.json`, `export-origins/automation.json`, `content/docs/references/system/translation.mdx`, the strictness-ledger counts and the liveness state counts, regenerated by `check:generated --fix`. ## Read first (by risk) 1. `packages/lint/src/i18n-walk.ts`, the new loop at the end of `walkScreenFlows`: what is demanded (top level, not technical, not screen/approval). 2. `ui/packages/i18n/src/flowLabels.ts` `stepLabel` and `metadata-viewer.tsx` `flowStepName`: which key each node type reads, and the titled-screen rule. 3. `packages/spec/src/system/translation.zod.ts`, the `nodes` entry and the `nodes` / `steps` alias changes. 4. `packages/lint/src/validate-translation-references.ts`, the `nodes` block and the two redirect clauses. Two-minute check: `pnpm --filter @objectstack/cli exec vitest run --project unit test/i18n-flow-node-coverage.test.ts`; expect 6 passed, including HotCRM's `opportunity_approval` shape asking for its start, decision, notify, loop and end labels and nothing for its approvals, screen or record write. ## Tests <details><summary>Pins</summary> - `packages/cli/test/i18n-flow-node-coverage.test.ts` (new family file, like the screen / approval / refusal family files beside it): the walker harvests exactly the drawn steps with no other key, seeded with the authored label; a folded step only where a drawn decision's listed branch names it, once (a conditions-free decision lists every out-edge; a `conditions` decision its default and its claimed labels; an unclaimed label and a non-decision source name nothing); nothing for any other `FLOW_TECHNICAL_NODE_TYPES` step or an id-less node; every harvested key parses and is kept by `TranslationDataSchema`; the coverage gate lists them in the flow bucket and goes quiet once translated. - `packages/lint/src/validate-translation-references.test.ts`: a new top-level describe (clean run over start / decision / loop / nested notify / end beside the other groups; `nodes` over an approval and over a screen redirected; unknown node with suggestion), the two changed redirect messages, and the one-line-verdict arm list gains the four new arms. - The screen, approval and liveness-gate family files in `packages/cli/test/` pin exact key lists of their own family; they now read every key but the `nodes` family (one predicate per file, pointing at the new file). - `ui/packages/components/src/__tests__/metadata-viewer.test.tsx`: a new top-level describe: start / decision / notify / end by `nodes`, an untitled screen by `screens` title, a titled screen by its translated heading and a holed heading by its label, a decision-branch target by `nodes`, and the business view folding exactly `FLOW_TECHNICAL_NODE_TYPES`. - `ui/packages/app-shell/src/views/metadata-admin/previews/FlowCanvas.test.tsx`: `stepLabel` reads each group by node type (and never another type's group under the same id); the canvas draws a decision's and a nested notify's translation; the inspector heading titles a decision by its `nodes` key with the authored label beside it. </details> <details><summary>Runs at cafc3fd (the spec half) unless noted</summary> - `@objectstack/lint` whole suite (before the L2 S1 widening): `Test Files 225 passed (225)`, `Tests 9431 passed (9431)` (at eabf0e6; lint unchanged since). - `@objectstack/cli` unit project, the 60 i18n / translation / lint test files: 18 failures at eabf0e6, all exact key lists in the three family files above; after the predicate, those 4 files `Tests 52 passed (52)`. - `@objectstack/spec`: `flows-translation-face.test.ts` + `translation.test.ts`, `Tests 238 passed (238)`. - `pnpm --filter @objectstack/spec check:generated`: 5 stale before regeneration, all 5 green after `--fix`. - `node scripts/check-i18n-coverage.mjs`: before the baseline edit `app-crm 0 -> 3`, `app-showcase 317 -> 424`, `app-todo 106 -> 128`; after: `OK (14 config(s), 552 baselined untranslated string(s), none new)`. `pnpm check:i18n`: all ten bundle packages in sync. `pnpm check:i18n-walk-parity`: 17 declared, 15 walked, 2 exempted. - Derived gate sweep at cafc3fd (`dispatch-gates --commands`, 127 commands): 126 exit 0, 1 NOT MEASURED (`check:dual-build-cjs-loads`, exit 3 for want of a full build; left to CI). `dispatch-gates --ran`: 127 accounted for. </details> <details><summary>Runs at bc0171d (the reader half, after merging main at dda5e74)</summary> - ui, from `ui/`: `FlowCanvas.test.tsx` + `flowNodeLabels.sites-13200.test.ts`, 64 tests passed; `metadata-viewer.test.tsx` at its final edit, `Tests 22 passed (22)` (two runs before it failed on the test's own isolation: a shared i18n instance and a locale-specific string, both fixed in the test). - `pnpm --filter @object-ui/i18n run type-check`, `@object-ui/components`, `@object-ui/app-shell`: all exit 0 (after building app-shell's dependency closure, 68 of 68 tasks). - `pnpm --filter @objectstack/spec check:generated --fix`: the 2 artifacts the merge deferred plus the liveness counts regenerated, all 3 re-checked green. - Derived gates for the files changed since the first sweep (`dispatch-gates --commands`, 96 commands): 96 exit 0. `dispatch-gates --ran`: 96 accounted for, 0 NOT MEASURED (derived from recorded exit codes). - `overlap-check.mjs`: merges cleanly with `origin/main` at 316f757. </details> <details><summary>Runs at 04d28e0 (the L1 / L2 rework)</summary> - `@objectstack/lint` whole suite: `Test Files 225 passed (225)`, `Tests 9444 passed (9444)`. - `@objectstack/cli` unit project, the 4 flow family files: `Tests 53 passed (53)` (the new folded-branch-target pin included). - `node scripts/check-i18n-coverage.mjs`: `app-showcase 424 -> 425`, `app-todo 128 -> 130` before `--update`; the new keys are `flows.showcase_inquiry_purge.nodes.purge.label` and `flows.todo_task_completion.nodes.compute_next_due_date.label`. `check:generated` green after rebuilding spec. - Derived gates for the files changed since bc0171d (`dispatch-gates --commands`, 105 commands): 105 exit 0; `--ran`: 105 accounted for, 0 NOT MEASURED. - `overlap-check.mjs`: clean against `origin/main` and the open PRs sharing files (objectstack-ai#36517, objectstack-ai#36527). </details> ## Acceptance notes - `flows.FLOW.label` is still demanded only for a flow with a screen or an approval node, although item 1's viewer draws the label of every embedded flow. Not widened here, by the seat's word: filed as objectstack-ai#36400. - HotCRM's own translations (`opportunity_approval`: 9 of 11 drawn steps) are a follow-up in that repository now that the key has a reader: objectstack-ai#36402. - The i18n skill's text for the new key is owed: objectstack-ai#36401. - A titled screen whose heading holds a `{{ }}` hole is drawn in the docs embed by its authored label, which has no key, so it stays in the authored language: carded as objectstack-ai#36530 with the L2's N2. Every other step the embed names has a key and a reader. --- _Generated by [Claude Code](https://claude.ai/code/session_01QsR2jTrJZvNaijgX3NxBMc)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01QsR2jTrJZvNaijgX3NxBMc <!-- signed: repo:objectstack#7 · zhuangjianguo · session_01QsR2jTrJZvNaijgX3NxBMc --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Steedos · project thread
Part of #35979 (Asked item 1 only. Asked item 2, a translation key for decision / notify / start / end node labels, was ruled option A on the card and is built on its own claim and branch, not in this PR; the card stays open for it)
repo:objectstack#7 · zhuangjianguo · session_01QsR2jV3scu6UYPb42n5okQ
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
What changes
FlowViewinelement:metadata_viewernow draws the flow title fromflows.FLOW.labeland eachapprovalstep fromflows.FLOW.approvals.NODE_ID.label, in the reader's language, and falls back to the authored label (then the name / node id) where the bundle has no entry. Two label reads changed (flow.label,n.label), through one hook call placed before the early returns.stepLabelprop onBranches), so an approval step reached from a decision is not named in English beside its translated row.@object-ui/i18n.ui/packages/i18n/src/flowLabels.tsholdsflowLabelTranslationsanduseFlowLabelTranslations, moved from the Studio module because@object-ui/componentscannot import@object-ui/app-shell. It is built onactiveFlowsBundle, which feat(automation): the stage confirms name the flows a move would start (#35928) #36316 already moved into@object-ui/i18n(flowsBundle.ts); this PR adds no second copy of that reader. The flow label still goes through the spec'stranslateFlow; the step label is still read forapprovalnodes only. The Studio module keeps its own parts (the Automations rail reader and the canvas context) and re-exports the moved ones, so its call sites are unchanged.flows.FLOWgroup has a label key only forapprovalsteps. A start, decision, notify or end step keeps its authored label until the Asked item 2 work adds its key.GET /meta/flowis unchanged; the embed reads the bundle the host already loads.Read first (by risk)
ui/packages/components/src/renderers/basic/metadata-viewer.tsx, theFlowViewandBrancheshunks: the hook sits before the early returns, beside thebusinessflag from feat(components): a type: flow metadata embed shows each decision's branches and their conditions #36327.ui/packages/i18n/src/flowLabels.ts: the moved resolver; compare with the Studio original removed fromflow-label-translations.tsx.ui/packages/app-shell/src/views/metadata-admin/previews/flow-label-translations.tsx: what stays in Studio, and the re-export.Two-minute check:
pnpm --dir ui exec vitest run packages/components/src/__tests__/metadata-viewer.test.tsx; expect 18 passed, including the three tests under "flow embed: package label translations".Tests
Pins (one top-level describe in the existing viewer harness)
metadata-viewer.test.tsx, describe "element:metadata_viewer flow embed: package label translations (flows.FLOW.label, approvals.STEP.label)", with a realcreateI18ninstance loaded from a zh-CNTranslationDatathroughtransformSpecTranslations, insideI18nProvider:opportunity_approval-shaped flow draws 大额商机审批, 销售经理审核 and 销售总监签批, and none of the English approval labels; the start, decision, notify and end steps keep their authored labels;The Studio pins in
FlowCanvas.test.tsxexercise the moved resolver unchanged.Runs
vitest runofmetadata-viewer.test.tsxandFlowCanvas.test.tsx:Test Files 2 passed (2),Tests 47 passed (47); thenpnpm --filter @object-ui/components run type-check(both tsc programs);VERDICT command-exit 0.@object-ui/app-shell^...and@object-ui/components^...closures (68 tasks successful), the same two files (Tests 40 passed (40)), andpnpm --filter @object-ui/i18n --filter @object-ui/components --filter @object-ui/app-shell run type-check: test exit 0, type-check exit 0.scripts/ablation-replace.mjs --delete: anchor(target && stepLabel?.(target)) ??1 to 0, blob e0610844af58 to 1bcbe5a1bdbb. Result:Tests 1 failed | 17 passed (18), the branch-target pin red. Restored: blob equals HEAD andgit diff HEADis empty. A first attempt with--replacement ''was refused by the tool before any test ran (it cannot count an empty replacement), so it measured nothing. The test resolves the viewer throughsrc, so no dist preflight applies.Acceptance notes
origin/maintwice. First merge (c261a7c, feat(automation): the stage confirms name the flows a move would start (#35928) #36316, already on main): feat(automation): the stage confirms name the flows a move would start (#35928) #36316 movedactiveFlowsBundleinto@object-ui/i18nat the same path this branch had used. Resolution kept main'sflowsBundle.tsbyte-for-byte, dropped this branch's duplicate move, and keptflowLabels.tsand its export.git grepon the merged tree: onefunction activeFlowsBundle(ui/packages/i18n/src/flowsBundle.ts), no app-shell copy, noutils/flowsBundleimport left. Second merge (e605773, feat(components): a type: flow metadata embed shows each decision's branches and their conditions #36327): kept its branches and entry-condition code and its tests, and added the two label reads plus the branch-target label.opportunity_approval(hotcrm 01d3ec4): 13 nodes; 11 drawn at the default business altitude; 2 have a key (approval), 9 do not: 1 start, 3 decision, 4 notify, 1 end.flow.description. The spec'sflowsgroup has no description key, so it stays authored.content/docspage documents the viewer (only its ADR, a governed surface), so no docs page changed.@object-ui/componentsand@object-ui/i18npatch.@object-ui/app-shellis private and its behaviour is unchanged.Verification
Gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackat 78faa00: 38 families, the same list as at 10f5352. At 10f5352 all 37 non-vitest families exited 0, each exit code captured before any pipe, andpnpm --dir ui exec vitest run scripts/under the lock gaveTest Files 172 passed | 2 skipped (174),VERDICT command-exit 0. The re-run at the final head is in the report on the card.node scripts/pm/overlap-check.mjsat 5999753:VERDICT clean exit 0(origin/main e605773 merges cleanly, no open PR head overlaps).Generated by Claude Code