feat: extract State taxes card from DashboardFlow into standalone management block#2021
Merged
Merged
Conversation
a983f6d to
b14fe02
Compare
…agement block Migrates the State taxes card off the monolithic DashboardFlow path onto the "thin workflow + standalone pieces" pattern established by PaymentMethod / WorkAddress. Adds four independently consumable surfaces under Employee/StateTaxes/: - useStateTaxesSummary — BaseHookReady-shaped data hook in shared/ - StateTaxesCard — self-fetching standalone card in management/ - StateTaxesEditForm — renamed from the previous management/StateTaxes.tsx, now firing scoped EMPLOYEE_MANAGEMENT_STATE_TAXES_* events - StateTaxes — robot3-orchestrated block composing the two pieces The dashboard composes the pieces (card + edit form) directly via its existing state machine; dashboardStateMachine and DashboardComponents are retargeted from EMPLOYEE_STATE_TAXES_EDIT (now removed) onto the new scoped events. useEmployeeTaxes is trimmed to federal-only. The shared EmployeeStateTaxesView now owns a dedicated Employee.StateTaxesView namespace with its own defaults. Onboarding and management each ship a flow-local dictionary hook that resolves their own namespace (Employee.StateTaxes / Employee.Management.StateTaxes) into the view's shape, so partner `dictionary` overrides on either flow flow into the view without leaking across flows. Co-authored-by: Cursor <cursoragent@cursor.com>
b14fe02 to
cbf5f88
Compare
jeffredodd
approved these changes
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates the State taxes card off the monolithic
DashboardFlowpath onto the "thin workflow + standalone pieces" pattern established byPaymentMethod/WorkAddress/Paystubs. Continues the strangler-fig migration outlined in.claude/skills/migrate-dashboard-card-to-block/SKILL.md.Four standalone partner-consumable surfaces under
Employee/StateTaxes/useStateTaxesSummary—BaseHookReady-shaped data hook inshared/useStateTaxesSummary/.StateTaxesCard— self-fetching standalone card inmanagement/StateTaxesCard/. Hides the Edit button when no state has any withholding questions (e.g. a no-income-tax state has nothing to edit).StateTaxesEditForm— renamed from the previousmanagement/StateTaxes.tsx, now firing scopedEMPLOYEE_MANAGEMENT_STATE_TAXES_*events. Keeps the form open with an inline success alert on save; cancel returns to the card.StateTaxes—robot3-orchestrated block composing the card and edit form for partners who want a single in-place surface.Dashboard integration
The dashboard composes the pieces (
StateTaxesCard+StateTaxesEditForm) directly via its existing state machine;dashboardStateMachineandDashboardComponentsare retargeted fromEMPLOYEE_STATE_TAXES_EDIT(now removed) onto the new scoped events.useEmployeeTaxesis trimmed to federal-only.Shared
EmployeeStateTaxesViewdecouplingFollowing the same pattern the in-flight Deductions migration uses for
DeductionsForm: the shared view now owns a dedicatedEmployee.StateTaxesViewnamespace with its own defaults. Onboarding (StateTaxes) and management (StateTaxesEditForm) each ship a flow-local dictionary hook (useOnboardingStateTaxesViewDictionary/useManagementStateTaxesViewDictionary) that resolves the view's keys against the flow's own namespace (Employee.StateTaxes/Employee.Management.StateTaxes). Partnerdictionaryoverrides on either flow propagate into the view without leaking across flows — and the view itself no longer needs callers to dual-loadEmployee.StateTaxes.Test plan
npm run test -- --run— 3028 tests pass (1 expected-fail unchanged).npm run lint:check— 0 errors (pre-existing warnings unchanged).npm run i18n:generate— types in sync with the newEmployee.StateTaxesViewandEmployee.Management.StateTaxesnamespaces.npx tsx sdk-app/scripts/analyze-component-props.ts— registry exposesEmployeeManagement.StateTaxes,EmployeeManagement.StateTaxesCard, andEmployeeManagement.StateTaxesEditFormwithemployeeIdas the required entity.EMPLOYEE_MANAGEMENT_STATE_TAXES_EDIT_REQUESTED; Save emitsEMPLOYEE_MANAGEMENT_STATE_TAXES_UPDATEDand shows the inline alert; Cancel emitsEMPLOYEE_MANAGEMENT_STATE_TAXES_EDIT_CANCELLEDand returns to the card.Screen.Recording.2026-06-04.at.3.55.56.PM.mov
Made with Cursor