Skip to content

feat(SDK-1161): wire PrintChecks into PayrollOverview - #2588

Merged
krisxcrash merged 7 commits into
mainfrom
kw/feat/print-checks-5-integration
Aug 21, 2026
Merged

feat(SDK-1161): wire PrintChecks into PayrollOverview#2588
krisxcrash merged 7 commits into
mainfrom
kw/feat/print-checks-5-integration

Conversation

@krisxcrash

Copy link
Copy Markdown
Contributor

Summary

Fifth and final PR in the print-checks stack (see #2584 for the full split rationale, splitting up #2572). This is the actual cutover — mounts Payroll.PrintChecks (from #2587) as its own banner in PayrollOverview, the same way ConfirmWireDetails is already embedded there.

  • PayrollOverview.tsx mounts <PrintChecks companyId={companyId} payrollId={payrollId} onEvent={onEvent} /> alongside the existing wireInConfirmationRequest pattern.
  • Removes the isPrintChecksOpen/onPrintChecksOpen plumbing a bare modal mount would have needed — PrintChecks now owns its own trigger banner and Modal lifecycle, so PayrollOverview just renders it.
  • Updates PayrollOverview's @events JSDoc table to the new payroll/printChecks/* event names.

Base branch note: targets kw/feat/print-checks-4-orchestrator, stacked on PR #2587. Once this whole stack merges, it fully replaces #2572, which I'll close.

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. feat(SDK-1161): add PrintChecks state machine and orchestrator #2587 — state machine / orchestrator
  5. This PR — PayrollOverview integration

Testing

  • npm run test -- --run src/components/Payroll/PayrollOverview src/components/Payroll/PrintChecks — 61 tests pass
  • npx tsc --noEmit and npm run lint:check clean

🤖 Generated with Claude Code

krisxcrash and others added 5 commits August 18, 2026 15:11
First slice of the print-checks feature (split out of #2572 for
reviewability): the shared event constants and the two terminal
screens of the upcoming print-checks flow, PrintChecksFailure and
PrintChecksSummary. Both are standalone, presentational components
that will be wired into a state-machine orchestrator in a follow-up PR
stacked on this one.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Second slice of the print-checks feature stack (see #2584). A
standalone banner that fetches its own payroll data via
usePayrollsGet, shows an info alert when the payroll has employees
paid by check, and surfaces a "View and print checks" CTA once the
payroll is processed. Fires PRINT_CHECKS_START when clicked.

Stacked on kw/feat/print-checks-1-terminal-screens; targets that
branch, not main.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Third slice of the print-checks feature stack (see #2584). The core
piece: the check-stock form, the generate-and-poll cycle against
usePayrollsGeneratePrintableChecksMutation/useGeneratedDocumentsGet,
and the checks-download mechanism.

The download navigates directly to the generated document's signed
URL via a synthetic anchor click rather than fetching it into a blob:
the URL already has response-content-disposition=attachment baked
into its query string, so a direct browser-level request downloads it
via that response header. A client-side fetch() would be subject to
CORS, which the document host doesn't allow, and fails outright.

Defines a narrow PrintChecksFormFlowContext (just the isGenerating
flag its Footer needs from the shared machine context) rather than
depending on the orchestrator's full context type, which doesn't
land until the next PR in the stack — keeps this PR buildable and
testable on its own.

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

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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>
Fifth and final slice of the print-checks feature stack (see #2584).
The actual cutover: mounts Payroll.PrintChecks (from #2587) as its own
banner in PayrollOverview, following the same pattern already used
for the embedded ConfirmWireDetails component. Removes the
isPrintChecksOpen state and onPrintChecksOpen prop that a bare modal
mount would have needed, since PrintChecks now owns its own trigger
banner and Modal lifecycle.

Stacked on kw/feat/print-checks-4-orchestrator; targets that branch,
not main. Once this and the rest of the stack merge, this replaces
#2572 entirely.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Base automatically changed from kw/feat/print-checks-4-orchestrator to main August 21, 2026 16:32
@krisxcrash
krisxcrash added this pull request to the merge queue Aug 21, 2026
Merged via the queue into main with commit 12ccd4f Aug 21, 2026
38 checks passed
@krisxcrash
krisxcrash deleted the kw/feat/print-checks-5-integration branch August 21, 2026 17:25
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.

2 participants