Feat: Add YAML validation for compose content in deployment flows#46
Feat: Add YAML validation for compose content in deployment flows#46austin047 wants to merge 2 commits intoflatrun:mainfrom
Conversation
austin047
commented
Feb 19, 2026
- Add a method to validate compose Yaml
- Use validation in NewDeploymentModal and DeploymentDetailView before submission
Code Review SummaryThis PR introduces YAML syntax validation for Docker Compose content before it is sent to the backend. It also includes UI improvements for password fields and updates the environment configuration. 🚀 Key Improvements
💡 Minor Suggestions
|
| return { valid: false, error: "Compose content is empty" }; | ||
| } | ||
| try { | ||
| parse(trimmed); |
There was a problem hiding this comment.
By default, the yaml package's parse function might only throw for critical syntax errors. For stricter validation (e.g., catching duplicate keys which are common in Compose files), it is better to check for warnings or use a stricter parsing configuration if available in the version installed.
| parse(trimmed); | |
| parse(trimmed, { uniqueKeys: true }); |
| @@ -1 +1 @@ | |||
| VITE_API_URL=http://localhost:8080 | |||
There was a problem hiding this comment.
The API URL has been changed from port 8080 to 8090 and appended with /api. Ensure this change is intentional for the example environment and matched in server-side configurations.
| VITE_API_URL=http://localhost:8080 | |
| VITE_API_URL=http://localhost:8090/api |