Skip to content

feat(UI-1541): improve project creation from yml#401

Merged
RonenMars merged 16 commits intomainfrom
vitaly/feat/improve-create-project-from-yml
Oct 15, 2025
Merged

feat(UI-1541): improve project creation from yml#401
RonenMars merged 16 commits intomainfrom
vitaly/feat/improve-create-project-from-yml

Conversation

@J1za
Copy link
Collaborator

@J1za J1za commented May 20, 2025

Description

For check limit request to server, instead of creating project by applyManifest,using projectClient.create

Linear Ticket

https://linear.app/autokitteh/issue/UI-1541/webui-templates-vscode-extension

What type of PR is this? (check all applicable)

  • 💡 (feat) - A New Feature (non-breaking change which adds functionality)
  • 🔄 (refactor) - Code Refactoring - A code change that neither fixes a bug nor adds a feature
  • 🐞 (fix) - Bug Fix (non-breaking change which fixes an issue)
  • 🏎 (perf) - Optimization
  • 📄 (docs) - Documentation - Documentation only changes
  • 📄 (test) - Tests - Adding missing tests or correcting existing tests
  • 🎨 (style) - Styles - Changes that do not affect the meaning of the code (white spaces, formatting, missing semi-colons, etc)
  • ⚙️ (ci) - Continuous Integrations - Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • ☑️ (chore) - Chores - Other changes that don't modify src or test files
  • ↩️ (revert) - Reverts - Reverts a previous commit(s).

Code Standards

  • Notify only when user attention is needed, otherwise log to console.
    • Notifications: short description with context identifiers (e.g. id of the manipulated entity).
    • Logs: full description with full context identifiers (e.g. deploymentId and the relevant projectId).
  • If you're not sure what is the proper behavior, consult with the product team.
  • Reduce the use of else by employing early returns to make code more readable and less nested.
  • MVC Separation: Ensure separation of concerns; views should only be manipulated by controllers (also the computing - sorting, fitlering, etc.), not by services, to maintain a clean MVC architecture.
  • Before implementing custom logic, check if existing functions or utilities (like lodash) offer a simpler solution.
  • Avoid using !important in CSS where possible.
  • Use memoization for class calculations.
  • Place constant strings in your code using I18n.

Copy link
Collaborator

@RonenMars RonenMars left a comment

Choose a reason for hiding this comment

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

});

if (createError) {
commands.executeCommand(vsCommands.showErrorMessage, namespaces.applyManifest, (createError as Error).message);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please write an appropriate error message using translate.
Also, please write to Logger.

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can even do something like this:

		const errorMessage = (createError as Error).message;
		const isProjectAlreadyExists = errorMessage.includes('SERVER MESSAGE - PROJECT EXIST');
		
		if (isProjectAlreadyExists) {
                         // display proper message and log - so the user will easily understand what is the problem
			return;
		}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But we have already had Logger inside ProjectsService, and If have error it will show message or I something don't understand

@J1za
Copy link
Collaborator Author

J1za commented Jun 18, 2025

Reviewed

@RonenMars RonenMars force-pushed the vitaly/feat/improve-create-project-from-yml branch 2 times, most recently from 4ead8c5 to 94c87f6 Compare October 5, 2025 18:55
@RonenMars RonenMars force-pushed the vitaly/feat/improve-create-project-from-yml branch from 89c3b71 to 0e8a127 Compare October 9, 2025 18:42
@RonenMars RonenMars merged commit 881359b into main Oct 15, 2025
1 check passed
@github-actions
Copy link

🎉 This issue has been resolved in version 0.20.22 🎉

The release is available on GitHub release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants