Parent: T9 (#9) · Importance: Must have · Size: L · Depends on: 9c (field picker), 9e (Validation panel).
Why. The pieces for authoring a condition exist, but the flow reads as a developer's debug panel:
pick a column, press + insert, read the result back as ${lmp_approx} = 'approx_weeks'. The
microcopy is build:, — column —, × start over, value or ${other_field}. The advanced panel is
one flat stack where "Compute the value as…" appears on a plain Number question. This slice is the
Validation panel generalised: one sentence-shaped editor per logic column, in plain English, with the
XPath available but not in the way.
Scope.
Not in scope. New rule kinds (9a). Validation presets (9e). Drag-reorder of clauses. Keyboard
chip polish (tracked in condition-builder.md v0.3 out-of-scope).
Acceptance.
- The cold-start journey from the UX review runs end to end: open a real pregnancy form, add
"show this when LMP is approximate" by picking, read it back in plain English, never see XPath
unless the code toggle is pressed.
- Existing relevants written with
../field open as clauses (parser from 9a) and are re-emitted
byte-identically when untouched.
- Before / after screenshots of the one-clause path show the only visible delta is the sentence
form and the microcopy; the emitted cell is unchanged.
- Playwright: the field picker, readback and code toggle are exercised; the sheet cell is asserted
on disk.
- Open-and-save with zero edits leaves every column byte-identical.
Validate.
pnpm typecheck && pnpm lint
pnpm --filter @cht-ui/client test:e2e
node scripts/corpus-sweep.mjs
Plan: docs/plans/9_complex_logic_calculation_relevant_constraint/README.md · Analysis: validation-rules-v2.md §"UI/UX" findings 1, 4 to 9, 11; §"UX changes" 1, 5. FormEditor.tsx:2250 (inline), :2729 (modal) at bff69cb. Microcopy rules: docs/plans/condition-builder.md §10.
Parent: T9 (#9) · Importance: Must have · Size: L · Depends on: 9c (field picker), 9e (Validation panel).
Why. The pieces for authoring a condition exist, but the flow reads as a developer's debug panel:
pick a column, press
+ insert, read the result back as${lmp_approx} = 'approx_weeks'. Themicrocopy is
build:,— column —,× start over,value or ${other_field}. The advanced panel isone flat stack where "Compute the value as…" appears on a plain Number question. This slice is the
Validation panel generalised: one sentence-shaped editor per logic column, in plain English, with the
XPath available but not in the way.
Scope.
relevantand
choice_filter: "Show this question when [field ▾] [is ▾] [value ▾]" and "Filter choiceswhen …". Plain-English readback for every clause; XPath behind a "code" toggle. The column is
implied by the field being edited, never chosen from a dropdown.
( group these ),refuse flat mixed). Connector separate from operator.
required_messagebesideconstraint_message; "Compute the value as…" hidden unless the type is calculate or the authoropts in.
NO_LABELon calculates; fix the collidinglabel::hi insertcaptions.serializeAnyParsed; the raw fallback stays sacred; a rulethe editor cannot show opens as text and is saved exactly as written.
Not in scope. New rule kinds (9a). Validation presets (9e). Drag-reorder of clauses. Keyboard
chip polish (tracked in condition-builder.md v0.3 out-of-scope).
Acceptance.
"show this when LMP is approximate" by picking, read it back in plain English, never see XPath
unless the code toggle is pressed.
../fieldopen as clauses (parser from 9a) and are re-emittedbyte-identically when untouched.
form and the microcopy; the emitted cell is unchanged.
on disk.
Validate.
pnpm typecheck && pnpm lint pnpm --filter @cht-ui/client test:e2e node scripts/corpus-sweep.mjsPlan:
docs/plans/9_complex_logic_calculation_relevant_constraint/README.md· Analysis:validation-rules-v2.md§"UI/UX" findings 1, 4 to 9, 11; §"UX changes" 1, 5.FormEditor.tsx:2250(inline),:2729(modal) atbff69cb. Microcopy rules:docs/plans/condition-builder.md§10.