Skip to content

Implementation notes are shown to users as help text — field and dashboard-widget descriptions cite hook files, card numbers, DESIGN.md sections and PRs - #131

Merged
zhuangjianguo merged 3 commits into
mainfrom
claude/issue-95-remainder
Oct 25, 2026
Merged

zhuangjianguo merged 3 commits into
mainfrom
claude/issue-95-remainder

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Part of #95 — left on the card: the action descriptions in src/actions/contract-lifecycle.actions.ts and src/actions/contract-backfill.actions.ts. Their bundle keys (clm_contract._actions.*) live in src/translations/{en,zh-CN}/objects.contract.ts, which the in-flight #129 holds, so neither the inline text nor the bundles were touched (changing only the inline text would leave the en bundle showing the old text). Proposed wording is under "What is left".

What changed

User-facing text (inline and both bundles)

  • contract-approval.flow.ts: the rung-2 step label reads Head of Legal + Finance Controller (joint sign-off) in English (zh-CN keeps 法务负责人 + 财务负责人(会签)); the designer edge reads Legal + finance, jointly; the flow description now names the rungs and drops "routing flags" (it also said rung 2 is always a joint sign-off, which is wrong: it can be legal only or finance only).
  • party.object.ts country_code: the help no longer claims "Drives governing-law defaults and screening". Nothing in the app reads the field, so it now just says what the field holds. Both bundles were updated.
  • src/datasets/**: contract_cycle_time no longer says "see the module comment…"; obligation_metrics and payment_metrics no longer say "the arrears the daily job stamps". The en bundle mirrors the inline text, and zh-CN contract_cycle_time was rewritten.
  • src/profiles/** row policies (12) and src/sharing/contract.sharing.ts sharing rules (7): no more "DESIGN.md §04", policy names, "permissive companion", "OR-merge", "§13 Q1" or "ruling A on [Decision] Who presses Start Signing? Records holds the capability but cannot read an approved contract, legal can read it but lacks the capability, and clm_admin cannot write the contract #100". Each now says what the rule allows, with exact status names where it is a window. The notes moved to code comments beside the text. These have no translation key on 18.1.0.

The version step of the intake wizard (templateNote)
On 18.1.0 an assignment value is not translatable. A screen text slot's {{ }} hole is a bare variable path (@objectstack/formula parseHole: "holes are a field path with an optional formatter … not arbitrary logic"), so no template can pick a sentence by locale. Translated screen copy is the supported route: flows.FLOW.screens.NODE.description (picked by the engine in the run's locale) and …fields.FIELD.inlineHelpText (overlaid by the runner). The step now has:

  • a static description that holds for every type: "The document this contract starts from. By default you upload it on the next step." / 「这份合同的起点文件。默认在下一步上传。」
  • the template sentence as the "Draft from template" toggle's inlineHelpText, shown only where the toggle is (a type with a template).

templateNote is gone from both assignments; templateAvailable and every edge are unchanged. The screen was not split.

Stale code comments

  • src/apps/clm.app.ts: it named the retired bind-position-sets.ts twice (no such file on main). It now points at isDefault: true in requester.profile.ts and at positions.ts.
  • signature-record.flow.ts: it called is_current's default false. The field defaults to true (contract-version.object.ts), and the flow writes false on purpose.
  • records.profile.ts docblock: it named only contract_records_execution. It now also names contract_records_approved_read.
  • src/flows/index.ts: it said F8 and F15 arrive "with cards 12 and 13". Both are card 12 (docs/backlog/12-esign-and-crm-handoff.md); card 13 is the AI skills.

README: pnpm demo loads 830 rows, now including the three signing companies and seven departments. Measured: {"inserted":830,…} on a clean DB, both before and after this change.

Gates (tree of head aacd216, each exit captured before any pipe)

pnpm install                    EXIT=0
pnpm validate                   EXIT=0   ✓ Validation passed (926ms)
pnpm lint                       EXIT=0   6 suggestion(s) — the unchanged approval-approvers-may-resolve-empty set
pnpm typecheck                  EXIT=0   tsc --noEmit, no output
pnpm lint:i18n-gate             EXIT=0   COVERAGE : 0 missing keys across 2 locale(s)
CLM_DEMO_SEED=1 pnpm validate   EXIT=0   ✓ Validation passed (868ms)

Browser (18.1.0, pnpm demo --port 3495, fresh .objectstack/data each run, Chromium /opt/pw-browsers/chromium)

Two boots: before = main abd5401, after = this branch. Each seeded inserted 830 / errored 404. The normalised WARN/ERROR signatures are 423 lines on each side and differ only in two timestamps. No degraded, no no such table, no plugin-load failure.

Personas: the dev admin, and Business Requester 1 created the README way through the admin create-user route (POST /api/v1/auth/admin/create-user 200, then change-password 200). As admin, the NDA type was given a template on the type's Edit form (file input, PATCH clm_contract_type 200), so there was one type with a template and one without (DPA).

where before after
wizard 首个版本, zh-CN, DPA (no template), as requester This contract type carries no template; upload the first version on the next step. 这份合同的起点文件。默认在下一步上传。
wizard 首个版本, zh-CN, NDA (template) This contract type carries a template. Tick "Draft from template" … description as above, plus toggle 从模板起草 with 这类合同带有模板。勾选后,模板会作为第 1 版附上,不用再上传文件。
wizard First version, en, DPA / NDA (English note) The document this contract starts from. By default you upload it on the next step., plus on NDA Draft from template with This contract type carries a template. Tick to attach it as version 1 instead of uploading a file.
behaviour — NDA with the toggle ticked → 提交合同 step, and v1 · Draft filed with Drafted from the contract type template. / nda-template.pdf. DPA → 上传首个版本 object form. Same paths as before.
party Edit form, Country help — en Two-letter ISO 3166-1 code of the country the party is based in (e.g. US, DE, CN).; zh-CN 相对方所在国家或地区的两位 ISO 3166-1 代码,例如 US、DE、CN。; "Drives governing" / 「适用法律的默认值」 not found
Setup → Dataset (en / zh-CN) — the three new descriptions in both locales; "module comment" / "daily job stamps" / 「模块说明」 not found
Setup → Permission Sets → clm_finance / clm_requester → Row-Level Security — the new descriptions; "DESIGN.md" not found
Setup → Declared Sharing Rules → contract_finance_post_approval — The finance controller edits contracts from approved onward. The legal fields and the status stay locked for finance.
Setup → Flow contract_approval (designer) — node Head of Legal + Finance Controller (joint sign-off), edge Legal + finance, jointly, the new description; 会签 not found
served bundle GET /api/v1/i18n/translations/{en,zh-CN} — flows.contract_approval.approvals.legal_finance_joint en … (joint sign-off) / zh-CN …(会签); screen_document description and draft_from_template.inlineHelpText in both

Browser console on every page: the pre-login 401 (get-session) and one 404 resource, the same as before.

NOT MEASURED: the rung-2 step label as an approver sees it in 待我处理. Reaching the joint rung needs a contract with an accepted deviation in band B or C, which needs a legal persona with a position; this run's personas were the admin and a requester. The served bundle key above is the closest reading.

What is left on #95

The action descriptions and their bundle keys (objects.contract.ts is held by #129). Proposed wording for that follow-up:

  • submit_contract: "Hand the draft over. Its approval route is worked out, and it is either assigned to a lawyer for review or, for a type without legal review, sent straight to approval."
  • send_for_approval: "Close legal review and start approval. Not possible while any deviation is still open."
  • activate_contract: "Bring a signed contract into force. Its activation date is recorded and the renewal reminder is set up."
  • executed_upload: "Record a contract that was signed before this system, or outside it. It is created directly as active and marked as backfilled, skipping review and approval, and the executed copy is filed as its final signed version." Its signed_date help becomes "The date on the executed document. It is recorded as both the signed date and the execution date.", and its executed_file help becomes "The signed PDF or scan. It is filed as version 1, the final signed version."

Acceptance notes

🤖 Generated with Claude Code

https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn

Descriptions in the approval flow, the datasets, the row policies, the
sharing rules and the party's Country help were developer notes: DESIGN.md
sections, policy names, "the daily job stamps", a 会签 step name in the
English UI, and a Country help promising governing-law defaults and
screening that nothing in the app performs. Each now says what the reader
needs; the notes moved to code comments beside the text. Bundles mirror
every inline change in en and zh-CN.

The intake wizard's version step showed `templateNote`, a runtime
assignment string, so zh-CN users read English. On 18.1.0 an assignment
value is not translatable and a screen text slot's hole is a bare variable
path, so the step now carries a static description (a bundle key) and the
template sentence moved to the "Draft from template" toggle's
inlineHelpText (also a bundle key), shown only on a type with a template.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn
clm.app.ts named the retired bind-position-sets.ts twice; members hold
clm_requester through isDefault. signature-record.flow.ts called is_current's
default false; it is true, and the flow writes false on purpose. The
records.profile.ts docblock missed the approved read rule. flows/index.ts
put F8 and F15 in cards 12 and 13; both are card 12.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn
The three signing companies and seven departments are seeded rows too
(measured: inserted 830 on a clean database).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 — ACCEPT · head aacd216 · 2026-10-25T15:58Z

check reading
shape draft → main, Part of #95; assignee zhuangjianguo; mergeable clean against main 23c8a71
CI on the head both Validate check-runs success on aacd216 = PR head.sha
scope 22 files (+107/−60), the claim's surface: approval rung-2 label and edge (no Chinese in the English UI; 会签 stays in zh-CN), flow description, country_code help, three dataset descriptions, 12 row-policy and 7 sharing-rule descriptions, the four stale comments, README's 830. src/sharing/contract.sharing.ts is read as inside the claim's "sharing descriptions" item — accepted. Nothing governed
templateNote replaced by the supported route, not a workaround: a static screen description plus the toggle's inlineHelpText, both bundle keys; measured in zh-CN on a type with and without a template, and the template / upload branches behave as before
measured boot signatures identical; the rewritten texts render in en and zh-CN where users read them; NOT MEASURED: the rung-2 label in an approver's inbox (needs a band B/C deviation)
not in this PR the action descriptions (submit_contract, send_for_approval, activate_contract, executed_upload and two param helps) — their keys sat in the objects.contract.ts bundles #129 held; #129 has landed, so the seat dispatches them as the closing follow-up with the wording this PR's body proposes. Row-policy / sharing descriptions have no translation key on 18.1.0 (admin-facing, observation only)

Landing: under the maintainer's merge authorization (project thread: 「你可以自己审核的就自己合并」).


Generated by Claude Code

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants