Skip to content

Unify multi-project configure destination UX#1279

Merged
kanushka merged 3 commits intowso2:5.0.xfrom
lochana-chathura:multi-login
Apr 28, 2026
Merged

Unify multi-project configure destination UX#1279
kanushka merged 3 commits intowso2:5.0.xfrom
lochana-chathura:multi-login

Conversation

@lochana-chathura
Copy link
Copy Markdown
Contributor

@lochana-chathura lochana-chathura commented Apr 28, 2026

Purpose

$subject.

Fixes #1053

  • Add required marker to path field in multi-project Configure Destination step
  • Use default path fallback logic matching single-project (getWorkspaceRoot, then getDefaultCreationPath)
  • Ensures consistent required field indicators, default path population, and focus behavior between single and multi-project flows in the migration wizard

Sample:
Screenshot 2026-04-28 at 11 40 13

Add required marker, default path fallback, and fix field focus for multi-project step to match single-project behavior
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

📝 Walkthrough

Walkthrough

The MultiProjectFormFields component now implements asynchronous initialization logic for the path field. When formData.path is unset, the component attempts to fetch the workspace root and uses its path value as a default, with a fallback to the default creation path if unavailable. Error handling is integrated via console.error. Additionally, the directory selection field is marked as required and autofocus is removed from the folder name field.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The PR description lacks several required sections from the template including Goals, User stories, Release note, Documentation, Training, Certification, Marketing, Automation tests, Security checks, Samples, Related PRs, Migrations, Test environment, and Learning. Complete the missing sections in the PR description following the repository template. At minimum, add Goals, Release note, Documentation, and Test environment sections to provide essential context for reviewers.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Unify multi-project configure destination UX' accurately summarizes the main change: making the multi-project flow consistent with single-project behavior.
Linked Issues check ✅ Passed All coding requirements from issue #1053 are met: Path field marked required, default path fallback logic implemented, and autoFocus removed from Folder Name field.
Out of Scope Changes check ✅ Passed All changes align with the stated objectives: only the MultiProjectFormFields component was modified to unify UX with single-project behavior, with no extraneous modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@lochana-chathura
Copy link
Copy Markdown
Contributor Author

@coderabbitai Please review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

@lochana-chathura: I'll review the changes in this PR now.

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@wi/wi-webviews/src/views/ImportIntegration/components/MultiProjectFormFields.tsx`:
- Around line 64-76: The effect that sets a default path (useEffect) can race
with user input and currently doesn't fallback to getDefaultCreationPath() when
getWorkspaceRoot() fails; update the effect to accept a cancellation flag (e.g.,
let cancelled = false or isMounted) and return a cleanup that flips it so any
async result is ignored if the user has since changed formData.path, call
wsClient.getWorkspaceRoot() inside try/catch and if that fails call
wsClient.getDefaultCreationPath() as a fallback, only call onFormDataChange({
path }) when !cancelled and formData.path is still falsy to avoid overwriting a
user selection, and change the dependency array to [formData.path,
onFormDataChange, wsClient].
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: afbe0610-2c6b-433e-975c-002b14dc1311

📥 Commits

Reviewing files that changed from the base of the PR and between 74b74e1 and e037c73.

📒 Files selected for processing (1)
  • wi/wi-webviews/src/views/ImportIntegration/components/MultiProjectFormFields.tsx

lochana-chathura and others added 2 commits April 28, 2026 11:35
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
@lochana-chathura
Copy link
Copy Markdown
Contributor Author

@coderabbitai I addressed the previous suggestion. Please re-review.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

The PR description image shows the updated Configure Destination step (step 3) in the migration wizard. The UI now displays:

  • Select Path* — marked as required (asterisk) and pre-populated with a default path (/Users/wso2/wso2integrator/projects/Default).
  • A Browse button for path selection.
  • A checked "Create a new folder for the packages" checkbox.
  • Folder Name* — marked required, with placeholder text and no auto-focus behavior.

This visually confirms the intent of the PR: unified required-field indicators, default path population, and corrected focus behavior. I'll trigger a full re-review of the changes now.

@lochana-chathura: Triggering a re-review of the PR now.

✅ Actions performed

Full review triggered.

@kanushka kanushka merged commit ab8d52c into wso2:5.0.x Apr 28, 2026
5 checks passed
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