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 - #132

Merged
zhuangjianguo merged 2 commits into
mainfrom
claude/issue-95-action-descriptions
Oct 25, 2026
Merged

zhuangjianguo merged 2 commits into
mainfrom
claude/issue-95-action-descriptions

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #95

The last piece of the card: the action descriptions and the backfill dialog's help that still carried implementation notes. PRs #103 and #131 delivered the rest. Wording is PR #131's proposal, unchanged in English. The rendered text read correctly, so none of it was reworded.

What changed

Every description and help string in src/actions/contract-lifecycle.actions.ts and src/actions/contract-backfill.actions.ts was listed and sorted into fine or rewrite. Only the six that carried flow codes, field API names or mechanics were changed. The en bundle mirrors each one.

string before after
submit_contract Hand the draft to legal. Routing (F2) stamps the approval flags and either assigns a reviewer or sends it straight to approval. 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 open the approval ladder (F5). Refused while any deviation is still open. Close legal review and start approval. Not possible while any deviation is still open.
activate_contract Bring a signed contract into force. F9 stamps activated_at and opens the renewal-reminder obligation. Bring a signed contract into force. Its activation date is recorded and the renewal reminder is set up.
executed_upload … it is created directly in active with is_backfilled set, skipping review and approval, … … It is created directly as active and marked as backfilled, skipping review and approval, …
executed_upload · signed_date help … It becomes both signed_at and executed_at. … It is recorded as both the signed date and the execution date.
executed_upload · executed_file help … It is filed as version 1, kind final_signed. … It is filed as version 1, the final signed version.

zh-CN: only submit_contract carried a note (「系统会盖上审批标记」). It now reads 「把草稿交出去。系统会定好它的审批路线,并指派一位法务审查;不需要法务审查的类型则直接送审。」. The other zh-CN values were already written for the reader, so they were left as they were: send_for_approval, activate_contract, executed_upload and its two helps.

Left as they were, because they hold no implementation note: accept_contract, start_signing, terminate_contract and its termination_reason help, start_renewal, withdraw_contract (description and confirm text), the success messages, the owner-only body's two refusal messages, and the backfill helps for contract_type, party and archive_no.

The notes moved into the code comments beside each action: F2 and its route_* stamps, F5, F9 and activated_at, is_backfilled, and signed_at / executed_at / final_signed. No key was added or removed, and behaviour is unchanged.

Gates (tree of head 77987fe, each exit captured to a file before any pipe)

pnpm install                    EXIT=0
pnpm validate                   EXIT=0   ✓ Validation passed (874ms)
pnpm lint                       EXIT=0   6 suggestion(s) (859ms), 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 (863ms)

Control-byte scan of the 4 changed files: no match (grep exit 1).

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

There were two boots: before on main d7c706c, and after on this branch. Each seeded {"inserted":830,…,"errored":404}. Normalised, the WARN/ERROR lines number 439 on each side and are identical (0 diff lines). No degraded, no no such table, no plugin-load failure.

Personas: the dev admin, and Business Requester 1, created the README way: POST /api/v1/auth/admin/create-user 200, then change-password 200. The requester's own draft was created by the requester through POST /api/v1/data/clm_contract (201), not through the wizard.

where locale before after
Setup → Action list, Description column (admin) en the four old texts above the four new texts above
same zh-CN submit_contract 「把草稿交给法务。系统会盖上审批标记,并指派审查人或直接送审。」 「把草稿交出去。系统会定好它的审批路线,并指派一位法务审查;不需要法务审查的类型则直接送审。」; the other three are unchanged, as intended
Setup → Action → executed_upload, the designer's input-dialog preview (admin) en and zh-CN Signed On: … It becomes both signed_at and executed_at. · Executed Copy: … kind final_signed. … It is recorded as both the signed date and the execution date. · … the final signed version.
contract header, draft (admin; requester on own draft) en and zh-CN Submit / 提交 shown; hovering shows no tooltip; the description text is not in the DOM the same: Submit / 提交 shown; no tooltip; no description in the DOM
served GET /api/v1/i18n/translations/{en,zh-CN} and GET /api/v1/meta/actions — old texts new en texts in both; zh-CN submit_contract new; the other zh-CN keys unchanged

Browser console on every page: the pre-login 401 (get-session) and one 404 resource, the same before and after. For the requester there was also GET /api/v1/meta/app/setup → 403 on the Setup URL, which is expected.

NOT MEASURED:

  • The backfill dialog as a user sees it (its description under the title and the two param helps, en and zh-CN). Both personas lack execute_contract: the list toolbar shows no Backfill button for either, and POST /api/v1/actions/clm_contract/executed_upload answers 403 for both. The closest readings are the designer preview and the served bundle above.
  • The Send for Approval and Activate header buttons. They are hidden from both personas (clm_legal.access / execute_contract), on an in-review and a signing contract.

Acceptance notes

  • On 18.1.0 the record header does not show a param-less action's description: no tooltip on hover, and the text is absent from the DOM, for the admin and the requester in both locales. Where it does render is Setup's Action list and, for an action with params, the param dialog under its title. So the Submit, Send for Approval and Activate texts are read by admins in Setup and by API/AI consumers through the metadata. Observation, not filed.
  • The Setup designer's input-dialog preview shows the inline helpText (English) under zh-CN too; it reads the source, not the bundle. Observation, not filed.
  • activate_contract says "the renewal reminder is set up". The activation hook (contract.hook.ts, contract_activate) opens that obligation only when the contract has an end date, and returns early without one. Read from code, not measured (no persona with execute_contract), so PR 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's wording was kept. A possible tightening is "… and, if it has an end date, a renewal reminder is set up." That is left to review.

🤖 Generated with Claude Code

https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn

…eeds

The Submit, Send for Approval and Activate descriptions and the Backfill
Executed Contract description and its two date/file helps still carried
implementation notes: flow codes (F2, F5, F9), field API names
(activated_at, is_backfilled, signed_at, executed_at, final_signed) and
mechanics ("stamps the approval flags"). They render in Setup's action
list and, for the backfill action, in its parameter dialog. They now
describe what happens for the person pressing the button; the en bundle
mirrors the inline text and the zh-CN Submit text drops 审批标记. The
notes moved into the code comments beside each action.

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

The activation hook opens the renewal-reminder obligation only for a
contract with an end date, so the description no longer promises one
unconditionally (en inline and bundle, zh-CN bundle). Also corrects the
stale header comment in both objects.contract.ts bundles: the `_actions`
group holds eight record-header actions plus the launch and backfill
list-toolbar actions, not six plus one.

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 bc26eff · 2026-10-25T16:25Z

check reading
shape draft → main, Fixes #95; assignee zhuangjianguo
CI on the head both Validate check-runs success on bc26eff = PR head.sha (read by the seat before this comment)
scope 4 files: six action description / param-help strings in contract-lifecycle.actions.ts and contract-backfill.actions.ts rewritten for users, mirrored in the en bundle; zh-CN submit_contract (the only zh value carrying a note). The implementation notes moved into code comments beside each action. Nothing governed
seat review fix bc26eff on top of 77987fe: activate_contract no longer promises a renewal reminder unconditionally — contract.hook.ts opens one only when the contract has an end date (seat read on main); the bundles' stale header comment now counts eight header actions plus launch and backfill. Gates re-run on bc26eff: install, validate, lint, typecheck, i18n gate, seeded validate — all exit 0
measured boot signatures identical before/after; the new texts are served by /api/v1/meta/actions and the translation endpoints and shown in Setup's Action list in en and zh-CN. NOT MEASURED: the backfill dialog and the Send for Approval / Activate buttons as a user sees them (no persona in the run holds those capabilities); on 18.1.0 a param-less header action shows no description anywhere on the record page (observation)

With PRs #103, #131 and this one, the card's whole surface is delivered.

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

2 participants