Skip to content

feat(SDK-1161): add PrintChecks state machine and orchestrator - #2587

Open
krisxcrash wants to merge 2 commits into
kw/feat/print-checks-3-formfrom
kw/feat/print-checks-4-orchestrator
Open

feat(SDK-1161): add PrintChecks state machine and orchestrator#2587
krisxcrash wants to merge 2 commits into
kw/feat/print-checks-3-formfrom
kw/feat/print-checks-4-orchestrator

Conversation

@krisxcrash

Copy link
Copy Markdown
Contributor

Summary

Fourth PR in the print-checks stack (see #2584 for the full split rationale, splitting up #2572). This is where Banner/Form/Failure/Summary (PRs #2584-#2586) become the actual public Payroll.PrintChecks component.

  • printChecksStateMachine.tsx — a robot3 machine following the same pattern as ConfirmWireDetails/RecoveryCases: banner -> form -> summary/failure, unmounting each screen on transition rather than manually resetting form state.
  • PrintChecksComponents.tsx — the shared PrintChecksContextInterface + *Contextual wrapper components that connect each screen to the machine via FlowContext.
  • PrintChecks.tsx — the top-level orchestrator: BaseComponent + Root, mounts the banner unconditionally and the current screen inside a Modal.
  • No inert final() state, unlike the two reference machines (which define one but never transition to it) — per src/CLAUDE.md, hub-and-spoke components with no natural "end" shouldn't model completion as a final state.
  • Exports PrintChecks from the Payroll namespace and regenerates the SDK Dev App's component-props registry so companyId/payrollId are picked up as auto-provisioned entity IDs.

Base branch note: targets kw/feat/print-checks-3-form, stacked on PR #2586.

Stack

  1. feat(SDK-1161): add print-checks terminal screens and event vocabulary #2584 — terminal screens + events
  2. feat(SDK-1161): add PrintChecksBanner #2585 — Banner
  3. feat(SDK-1161): add PrintChecksForm #2586 — Form
  4. This PR — state machine / orchestrator
  5. PayrollOverview integration (stacked on this)

Testing

  • npm run test -- --run src/components/Payroll/PrintChecks — 24 tests pass (includes a new integration test exercising the full banner → form → summary/failure flow)
  • npx tsc --noEmit and npm run lint:check clean

🤖 Generated with Claude Code

Fourth slice of the print-checks feature stack (see #2584). Wires
PrintChecksBanner/Form/Failure/Summary together into the public
Payroll.PrintChecks component via a robot3 state machine, following
the same pattern as ConfirmWireDetails/RecoveryCases: banner -> form
-> summary/failure, unmounting each screen on transition instead of
manually resetting form state.

No inert final() state, unlike the two reference machines that define
one but never transition to it -- per src/CLAUDE.md, hub-and-spoke
components (no natural "end", user can reopen the flow freely)
shouldn't model completion as a final state.

Exports PrintChecks from the Payroll namespace and regenerates the SDK
Dev App's component-props registry so it picks up companyId/payrollId
as auto-provisioned entity IDs.

Stacked on kw/feat/print-checks-3-form; targets that branch, not main.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant