Skip to content

refactor: extract shared useDeployFlowReducer hook and unify initial state - #1250

Merged
pranithraoibm merged 4 commits into
IBM:mainfrom
pranithraoibm:1376-pr6
Aug 18, 2026
Merged

pranithraoibm merged 4 commits into
IBM:mainfrom
pranithraoibm:1376-pr6

Conversation

@pranithraoibm

Copy link
Copy Markdown
Contributor
  • Extracts the shared reducer cases and four callbacks into Shared/hooks/useDeployFlowReducer.ts
  • Moves RESET_STATE out of SharedDeployFlowAction and into each flow's own ACTION_TYPES and DeployFlowAction union — the shared reducer never handled it, each flow resets to its own initial state
  • Extracts BASE_INITIAL_STATE into Shared/utils/formData.ts — both getInitialState functions spread it and only declare their own flow-specific fields
  • Moves SHOW_DEPLOY_TOAST / HIDE_DEPLOY_TOAST into the shared reducer — they previously only existed in the DA flow; Services gains them here so DeployTearsheetShell (PR 7) can read deployToastOpen from both flows.

…state

Signed-off-by: Pranith Rao <pranith.rao@ibm.com>
Signed-off-by: Pranith Rao <pranith.rao@ibm.com>
@pranithraoibm
pranithraoibm requested a review from ryanmarc August 18, 2026 08:26
@pranithraoibm
pranithraoibm merged commit 826bf48 into IBM:main Aug 18, 2026
15 checks passed
@pranithraoibm
pranithraoibm deleted the 1376-pr6 branch August 18, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants