Skip to content

chore: relocate Deductions onboarding flow into onboarding/ subfolder#1995

Open
serikjensen wants to merge 1 commit into
mainfrom
sj/chore/deductions-relocate-onboarding-flow
Open

chore: relocate Deductions onboarding flow into onboarding/ subfolder#1995
serikjensen wants to merge 1 commit into
mainfrom
sj/chore/deductions-relocate-onboarding-flow

Conversation

@serikjensen
Copy link
Copy Markdown
Member

Summary

Precursor to migrating the Deductions dashboard card into a standalone management block (per .claude/skills/migrate-dashboard-card-to-block). The skill flags Deductions as needing a precursor PR because the existing top-level Deductions.tsx is a BaseComponentInterface onboarding flow that lives in the same folder where the card-as-block migration needs to land.

This PR is bookkeeping only:

  • Relocates Deductions.tsx, stateMachine.ts, deductionsContextualComponents.{tsx,test.tsx}, and the onboarding-only leaf folders (IncludeDeductions/, DeductionsList/, DeductionsForm/) into a new Deductions/onboarding/ subfolder, matching the canonical layout used by Compensation/.
  • Adds Deductions/onboarding/index.ts re-exporting Deductions and rewrites Deductions/index.ts to export * from './onboarding'.
  • Updates internal relative imports (../shared/...../../shared/...) and the two consumers that referenced the moved files directly (Dashboard/DashboardComponents.tsx, OnboardingFlow/OnboardingFlowComponents.tsx).

Backwards compatibility

The public surface is preserved end-to-end. Deductions continues to resolve through Employee/exports/employeeOnboarding.ts and the deprecated Employee/index.ts barrel via the new Deductions/index.ts re-export. The shared hook exports (useDeductionForm, useChildSupportGarnishmentForm) reference @/components/Employee/Deductions/shared/... in src/index.tsshared/ didn't move, so those paths are unchanged.

No behavior, event, prop, or i18n changes. Tests, lint, prettier, and tsc all pass.

Follow-up

A second PR will land the actual card-to-block migration into the now-clean Deductions/management/ folder, following the standard pattern documented in the skill.

Test plan

  • npm run test -- --run — 2968 passed, 1 expected fail
  • npm run lint:check — 0 errors
  • npm run format:check — clean
  • npm run tsc — clean
  • Visual confirmation in the SDK dev app that the Deductions onboarding step and the dashboard Deductions card both still work

Made with Cursor

@serikjensen serikjensen requested a review from a team as a code owner June 3, 2026 15:28
@serikjensen serikjensen marked this pull request as draft June 3, 2026 21:14
Precursor to migrating the Deductions dashboard card into a standalone
management block. The top-level `Deductions.tsx` flow (plus its state
machine, contextual adapters, and onboarding-only leaf components) now
lives under `Deductions/onboarding/`, matching the canonical layout used
by Compensation. This frees up `Deductions/management/` for the next PR
to land a card-as-block migration without an existing flow in its way.

The public surface is preserved: `Deductions/index.ts` re-exports from
`./onboarding`, so the `Deductions` named export continues to resolve
through `employeeOnboarding.ts` and the deprecated `Employee/index.ts`
barrel. No behavior, event, prop, or i18n changes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@serikjensen serikjensen force-pushed the sj/chore/deductions-relocate-onboarding-flow branch from 2004c4c to 2eab912 Compare June 3, 2026 22:50
@serikjensen serikjensen marked this pull request as ready for review June 3, 2026 22:56
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