feat(ui/alerts): rule editor wizard shell + form-state module
Wizard navigates 5 steps (scope/condition/trigger/notify/review) with
per-step validation. form-state module is the single source of truth for
the rule form; initialForm/toRequest/validateStep are unit-tested (6
tests). Step components are stubbed and will be implemented in Tasks
20-24. prefillFromPromotion is a thin wrapper in this commit; Task 24
rewrites it to compute scope-adjustment warnings.
Deviation notes:
- FormState.targets uses {kind, targetId} to match AlertRuleTarget DTO
field names (plan draft had targetKind).
- toRequest casts through Record<string, unknown> so the spread over
the Partial<AlertCondition> union typechecks.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
5
ui/src/pages/Alerts/RuleEditor/ConditionStep.tsx
Normal file
5
ui/src/pages/Alerts/RuleEditor/ConditionStep.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import type { FormState } from './form-state';
|
||||
|
||||
export function ConditionStep({ form: _form, setForm: _setForm }: { form: FormState; setForm: (f: FormState) => void }) {
|
||||
return <div>Condition step — TODO Task 21</div>;
|
||||
}
|
||||
Reference in New Issue
Block a user