Skip to content

Conversation

sjd78
Copy link
Member

@sjd78 sjd78 commented Aug 30, 2025

Resolves: https://issues.redhat.com/browse/MTA-6037

In the first step of a wizard, if there is only one step, the back button should be hidden. If there is more than one step, the back button on the first step should be disabled.

Summary by CodeRabbit

  • New Features

    • Wizards now show localized Next and Back labels across steps for clearer navigation.
    • Generate Assets wizard: Back button available on final step; Next/Close label remains contextual when results are present.
    • Retrieve Config wizard: Back button hidden for single-step flow; Cancel hidden when showing results.
    • Discover Import wizard: Back button label added to both steps for consistency.
  • Chores

    • UI footer property ordering adjusted (no behavioral changes).

Copy link

coderabbitai bot commented Aug 30, 2025

Walkthrough

Adds explicit localized Next/Back labels to wizard footers in three wizards, reveals Back on the final Generate Assets step, hides Back in the single-step Retrieve Config wizard, and reorders footer property placements; submission/cancel control flow remains unchanged.

Changes

Cohort / File(s) Summary of changes
Generate Assets Wizard
client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx
Added nextButtonText and backButtonText to three WizardStep footers; Back now visible on final review step; preserved isNextDisabled checks and existing onNext behavior (handleCancel vs submitTasksAndSaveResults); reordered footer fields.
Retrieve Config Wizard
client/src/app/pages/applications/retrieve-config-wizard/retrieve-config-wizard.tsx
Replaced isBackDisabled: showResults with isBackHidden: true; added isCancelHidden: showResults; onNext behavior unchanged (handleCancel vs handleSubmit(onSubmit)); reordered footer properties and added clarifying comment.
Discover Import Wizard
client/src/app/pages/source-platforms/discover-import-wizard/discover-import-wizard.tsx
Added backButtonText to both WizardStep footers; reordered footer props (isNextDisabled placement, onNext moved last); onNext semantics unchanged (either handleCancel or submit handler).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Wizard as WizardStep (Footer)
  participant Handlers as Handlers

  rect rgb(240,248,255)
    note right of Wizard: Multi-step wizards (Generate Assets, Discover Import)
    User->>Wizard: Click Back
    Wizard-->>User: Navigate to previous step
    User->>Wizard: Click Next
    alt Review step showing results
      Wizard->>Handlers: handleCancel()
      Handlers-->>Wizard: Close wizard / return
    else No results
      Wizard->>Handlers: submitTasksAndSaveResults() / onSubmitTask()
      Handlers-->>Wizard: Show results
    end
  end

  rect rgb(249,249,249)
    note right of Wizard: Single-step wizard (Retrieve Config)
    note over Wizard: Back hidden (isBackHidden: true)
    User->>Wizard: Click Next
    alt Showing results
      Wizard->>Handlers: handleCancel()
    else Not showing results
      Wizard->>Handlers: handleSubmit(onSubmit)
    end
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • ibolton336
  • rszwajko
  • dymurray

Poem

A rabbit taps the Next and Back,
Labels snug upon the track.
One-step hides the backward hop,
Multi-steps let the journey stop.
Click to close or click to send—hop, hop—now ship, friend! 🐇


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 0dc21d0 and 36e9a08.

📒 Files selected for processing (3)
  • client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx (3 hunks)
  • client/src/app/pages/applications/retrieve-config-wizard/retrieve-config-wizard.tsx (1 hunks)
  • client/src/app/pages/source-platforms/discover-import-wizard/discover-import-wizard.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • client/src/app/pages/applications/retrieve-config-wizard/retrieve-config-wizard.tsx
  • client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx
  • client/src/app/pages/source-platforms/discover-import-wizard/discover-import-wizard.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: unit-test
  • GitHub Check: build-and-upload-for-global-ci
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
client/src/app/pages/applications/retrieve-config-wizard/retrieve-config-wizard.tsx (1)

161-163: Localize step title for consistency

Consider translating the literal "Review" to stay consistent with other wizards.

-            name="Review"
+            name={t("retrieveConfigWizard.review.stepTitle")}
client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx (1)

144-151: Optional: DRY up repeated nav labels

If desired, extract shared nav labels to reduce repetition.

Example:

const nav = { nextButtonText: t("actions.next"), backButtonText: t("actions.back") };
// usage: footer={{ ...nav, isNextDisabled: !state.profile }}

Also applies to: 160-168, 176-188

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a89124f and 5c6d866.

📒 Files selected for processing (3)
  • client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx (3 hunks)
  • client/src/app/pages/applications/retrieve-config-wizard/retrieve-config-wizard.tsx (1 hunks)
  • client/src/app/pages/source-platforms/discover-import-wizard/discover-import-wizard.tsx (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: sjd78
PR: konveyor/tackle2-ui#2558
File: client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx:0-0
Timestamp: 2025-08-15T22:35:55.912Z
Learning: The Generate Assets Wizard in client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx is designed to accommodate additional wizard steps in the future, so the current conditional rendering of the Results step is intentional and appropriate for the planned architecture.
📚 Learning: 2025-08-15T22:35:55.912Z
Learnt from: sjd78
PR: konveyor/tackle2-ui#2558
File: client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx:0-0
Timestamp: 2025-08-15T22:35:55.912Z
Learning: The Generate Assets Wizard in client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx is designed to accommodate additional wizard steps in the future, so the current conditional rendering of the Results step is intentional and appropriate for the planned architecture.

Applied to files:

  • client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx
  • client/src/app/pages/source-platforms/discover-import-wizard/discover-import-wizard.tsx
  • client/src/app/pages/applications/retrieve-config-wizard/retrieve-config-wizard.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: unit-test
  • GitHub Check: build-and-upload-for-global-ci
🔇 Additional comments (6)
client/src/app/pages/source-platforms/discover-import-wizard/discover-import-wizard.tsx (2)

135-139: Explicit Back label on step 1 — aligns with PR objective

Adding backButtonText ensures the Back control renders; on a multi-step wizard it should appear disabled on the first step. Please verify in your PF version that it renders disabled (not hidden).


151-159: Review step footer semantics preserved; good UX after submission

Reordering + explicit backButtonText look good. Disabling Back and hiding Cancel when results exist matches the post-submit state; onNext logic is unchanged.

client/src/app/pages/applications/retrieve-config-wizard/retrieve-config-wizard.tsx (1)

164-170: Hide Back in single-step wizard — correct fix

Using isBackHidden: true satisfies “single step ⇒ hide Back.” onNext behavior is unchanged and correct.

client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx (3)

148-151: First step labels standardized

Explicit next/back labels improve consistency; Back should render disabled by default on the first step. Please sanity-check this in the UI.


164-167: Second step labels standardized

Looks good; no behavior changes besides visible, localized labels.


180-188: Final step Back exposed with correct post-submit state

backButtonText added; Back disabled and Cancel hidden when results exist; onNext unchanged. Matches the intended UX.

@sjd78 sjd78 force-pushed the wizard-back-first-step branch from 5c6d866 to 0dc21d0 Compare September 2, 2025 14:20
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx (1)

148-151: Make first-step Back state explicit to match PR behavior.

PF typically disables Back on the first step, but since we’re customizing the footer, make the intent explicit to avoid regressions and align with “first step Back is disabled” for multi-step wizards.

           footer={{
             nextButtonText: t("actions.next"),
             backButtonText: t("actions.back"),
+            isBackDisabled: true,
             isNextDisabled: !state.profile,
           }}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 5c6d866 and 0dc21d0.

📒 Files selected for processing (3)
  • client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx (3 hunks)
  • client/src/app/pages/applications/retrieve-config-wizard/retrieve-config-wizard.tsx (1 hunks)
  • client/src/app/pages/source-platforms/discover-import-wizard/discover-import-wizard.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • client/src/app/pages/source-platforms/discover-import-wizard/discover-import-wizard.tsx
  • client/src/app/pages/applications/retrieve-config-wizard/retrieve-config-wizard.tsx
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: sjd78
PR: konveyor/tackle2-ui#2558
File: client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx:0-0
Timestamp: 2025-08-15T22:35:55.912Z
Learning: The Generate Assets Wizard in client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx is designed to accommodate additional wizard steps in the future, so the current conditional rendering of the Results step is intentional and appropriate for the planned architecture.
📚 Learning: 2025-08-15T22:35:55.912Z
Learnt from: sjd78
PR: konveyor/tackle2-ui#2558
File: client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx:0-0
Timestamp: 2025-08-15T22:35:55.912Z
Learning: The Generate Assets Wizard in client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx is designed to accommodate additional wizard steps in the future, so the current conditional rendering of the Results step is intentional and appropriate for the planned architecture.

Applied to files:

  • client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: unit-test
  • GitHub Check: build-and-upload-for-global-ci
🔇 Additional comments (2)
client/src/app/pages/applications/generate-assets-wizard/generate-assets-wizard.tsx (2)

164-167: LGTM: Consistent localized navigation labels.

Adds explicit Next/Back text; no behavior changes to gating on parameters validity.


183-188: LGTM: Result-state footer wiring is correct.

Back is disabled and Cancel hidden when results exist; Next relabels to Close and triggers handleCancel.

Resolves: https://issues.redhat.com/browse/MTA-6037

In the first step of a wizard, if there is only one step, the
back button should be hidden.  If there is more than one step, the
back button on the first step should be disabled.

Signed-off-by: Scott J Dickerson <[email protected]>
@sjd78 sjd78 force-pushed the wizard-back-first-step branch from 0dc21d0 to 36e9a08 Compare September 3, 2025 03:19
@sjd78 sjd78 merged commit e6a3b8f into konveyor:main Sep 3, 2025
12 checks passed
@sjd78 sjd78 deleted the wizard-back-first-step branch September 3, 2025 03:48
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