Repository navigation
Launch wizard asks everything before writing, picks the parent contract, makes the submit choice explicit; Start Renewal lands on its draft - #180
Merged
Conversation
… draft F1 now collects the counterparty, the first version's file (a `file` screen field, objectstack#25801) and an explicit submission choice before its first write, so a wizard closed part-way leaves no draft; the object-form `screen_upload` step is gone. The parent contract is a record picker (`type: 'lookup'`). Start Renewal navigates to the draft it made via a flow action's `onSuccess` (objectstack#25800), reading the renewal flow's new `renewal` output variable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn
Contributor
Author
席位核对 — ACCEPT · head
|
| check | reading |
|---|---|
| shape | draft → main, Fixes #161 + Fixes #162 + Part of #99 (items 3 and 4); mergeable clean, with main (#176, #177, #178) merged in |
| CI on the head | both Validate check-runs success on bdabe1e = PR head.sha |
| scope | 5 files (+142/−106): the F1 wizard in contract-intake.flow.ts and its translations; start_renewal's onSuccess navigate; and the one seat-approved line in renewal-notice.flow.ts (renewal declared isOutput). contract.actions.ts is untouched. Nothing governed; lint 0 warnings |
| item 4 (ask everything, then write) | measured. Closing the wizard at its last screen, with every screen filled, left contracts 120 / drafts 10 / parties 40 (and 41 on the new-counterparty path) before and after. On main an NDA closed at 上传首个版本 had left an orphan draft with version_count 0. The first-version file is a screen file field (objectstack#25801). A headless launch with no file now pauses instead of writing |
| item 3 (go to the renewal) | measured as requester1: 发起续签 opens the new draft (SOW-2026-0025, renewed_from set). A second press shows the existing refusal and stays put |
| #161 | parent_contract is a record picker. Measured as counsel1 (SOW → SUP-2026-0007) and requester1 (AMD → SOW-2026-0016) |
| #162 | the first-version step is never empty (the file is required unless the type's template is chosen). 「提交方式」 is a required choice with no default: pressing 提交 without a choice is refused client-side, and each choice lands as draft or in review. Its values are booleans, so the headless param is unchanged |
| residuals | when the dialog closes, the run stays paused, and a file uploaded before closing stays unowned. objectstack#25801's second half carries this, and no record is written. The renewal draft's English 「Renewal —」 title prefix under zh-CN predates this PR; the seat files a card for it |
Landing: under the maintainer's merge authorization (project thread: 「你可以自己审核的就自己合并」). With this PR, every item of #99 has landed (1, 2, 5, 6 earlier; 7 in PR #177; 3 and 4 here), so the seat closes #99.
Generated by Claude Code
zhuangjianguo
marked this pull request as ready for review
October 27, 2026 11:45
This was referenced Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #161
Fixes #162
Part of #99 (items 3 and 4)
Clause-②: no
Metadata-protocol: none
Four changes to the F1 launch wizard and the renewal hand-off, on @objectstack 18.2.0. Each one is measured in the browser below, before and after.
What changed
start_renewaldeclaresonSuccess: { navigate: '/apps/clm/clm_contract/record/${result.output.renewal.id}' }. A flow action can do this since objectstack#25800 (18.2.0). The renewal flow now returns the new id:RenewalStartFlow.variablesgains{ name: 'renewal', type: 'object', isOutput: true }, whichcreate_draftalready writes. That one line insrc/flows/renewal-notice.flow.tsis outside the claim's original surface and was added with the seat's approval. Nothing else in that file changed. A second press is still refused with the existing sentence and stays on the source contract. The Renewals related list (PR Seven smaller things a real user hits — items 2, 3, 4: template toggle only with a template, a Renewals list, Withdraw for the owner's draft #123) is unchanged.type: 'file'field onscreen_document, which is possible since objectstack#25801 (18.2.0). All four screens (core fields, new counterparty, first version, submission) come before the first write. After the last screen the run creates the counterparty (if it is new), the contract, version 1 and the submission. The object-formscreen_uploadstep is gone. A wizard closed part-way leaves no draft and no counterparty. Closing the dialog still does not cancel the run: it stayspausedwith nothing written (measured below; objectstack#25801's second half was not built).lookupsince 18.x #161: the parent contract is a record picker. It istype: 'lookup',reference: 'clm_contract', and is required when the type lists it. The 主合同 label is updated in both bundles. The help sentence moved from the placeholder toinlineHelpText. The flow header's stale "no record picker / no file input" bullets are rewritten.submit_nowis now a requiredselect「提交方式」 with no default and two options: 「现在提交给法务 / 审批」 (true) and 「先保存为草稿」 (false). The console binds the option's own value, so the variable stays a boolean, and the headlesssubmit_nowparam andlaunch_contract(src/actions/contract.actions.ts, untouched) still work. The footer button wording is the platform's and was not changed.first_version_fileordraft_from_templateon a type with a template completes with no screen, as before. A caller that passes neither used to pause atscreen_uploadafter writing the draft. It now pauses atscreen_documentwith nothing written.Files:
src/flows/contract-intake.flow.ts,src/actions/contract-lifecycle.actions.ts(start_renewalonly),src/flows/renewal-notice.flow.ts(one seat-approved line), andsrc/translations/{en,zh-CN}/flows.ts.Browser evidence
Setup:
pnpm demo:zh -- --port 3154on a fresh.objectstack/datafor each boot, and Chromium/opt/pw-browsers/chromiumin zh-CN at 1440x1000. Personas are the declared demo staff with password admin123. The only manual step was set-user-manager for requester1-3, which answered 200 x3. Every boot readPlugins: 44 loaded, with nodegradedand nono such table.Before (origin/main 475106f), as requester1@example.com unless noted:
NDA-2026-0021as a draft with version_count 0.screen_upload, and drafts went from 13 to 14 (an orphan draft).NDA-2026-0022).lookupsince 18.x #161, as counsel1@example.com: SOW 合同信息 showed 主合同(记录 ID) asINPUT type=text.200 output:{}. The URL stayed on the source record. A second press was refused.After. The full set ran on 9c4779d. After merging main again (#176, #177, #178: backfill, email-template and data files only), the head bdabe1e re-ran the abandon count, draft, renewal and action-door probes with the same results.
contracts=120 drafts=10 parties=40before and after. The run stayspaused. The uploaded file is left as an unownedsys_file(ref_objectnull).parties=41before and after. Completing the same path created the party and the contract together.paused at screen_document fields=templateAvailable:boolean,draft_from_template:boolean,first_version_file:file*, and counts were unchanged. Resuming with a URL answered400 INVALID_SCREEN_INPUTand wrote nothing. Resuming with the uploaded id completed the run, wrote one draft with v1, and the file was claimed (ref_object clm_contract_version,ref_field file).Drafted from the contract type template.withorder-form-template.pdf. A headlessdraft_from_templateon 订单 also completed with no screen.in_review. In en the same screen reads "Submission" with "Submit to legal / approval now" and "Save as a draft for now".lookupsince 18.x #161, as counsel1@example.com on SOW: 主合同 * is a picker (BUTTON), and the popover lists contracts by title, number and counterparty. The pick (SUP-2026-0007) landed inparent_contractonSOW-2026-0026. As requester1 on 补充协议, picking SOW-2026-0016 landed inparent_contractonAMD-2026-0005./record/zVlHPstXPKc_eJUo, which isSOW-2026-0025, a draft withrenewed_fromset to the source. The response carriedoutput.renewal.id. A second press was refused with 「这份合同已有续签草稿(SOW-2026-0025)…」 and stayed on the source record.refusedand write nothing (counts unchanged). The department and entity pickers are unchanged: a run with 发起部门 picked stored bothour_entityanddepartment.No such key: statuspredicate warnings on header actions. Nothing new.Gates (bdabe1e)
Each exit code was captured before any pipe:
pnpm install: 0pnpm validate: 0 (✓ Validation passed)pnpm lint: 0 (6 suggestion(s), 0 warnings, same as main)pnpm typecheck: 0pnpm lint:i18n-gate: 0 (COVERAGE : 0 missing keys across 2 locale(s))CLM_DEMO_SEED=1 pnpm validate: 0Acceptance notes
sys_file. This is the platform's behaviour per objectstack#25801's acceptance notes (cancel on close is an open product decision upstream). No record is left behind.clm_renewal_draft). This is pre-existing and not touched here.src/actions/contract.actions.tsstill says the flat screens have no record picker. The file was left alone because the wizard's inputs did not change. The four dialog pickers still belong there, for the reasons the flow header now gives.🤖 Generated with Claude Code
https://claude.ai/code/session_017nzWFRUo2U7evMkPdVniAn