Repository navigation
fix(console): validate name and cwd client-side before submit - #342
Merged
Merged
Conversation
codeaholicguy
force-pushed
the
fix/323-field-validation
branch
2 times, most recently
from
October 6, 2026 15:35
02f116f to
d746d35
Compare
Name format and cwd existence were only checked inside the spawned agent start subprocess, surfacing as a slow single undifferentiated error. The pane now validates per-field on submit: empty fields, the name regex (same as the CLI), and cwd existence. Errors render inline under the offending field and clear as the user edits. Closes #323 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
codeaholicguy
force-pushed
the
fix/323-field-validation
branch
from
October 6, 2026 18:42
d746d35 to
9510e17
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Name regex and cwd existence were only validated inside the spawned
agent startsubprocess — slow feedback shown as one undifferentiated error.Approach
validateStartAgentValues(with injectablecwdExists, defaulting tofs.existsSync(path.resolve(cwd))) checks: non-empty name/cwd, the same name regex asagent.ts, and cwd existence. Submit is blocked while errors exist; each error renders inline under its field and clears on edit.Closes #323
Validation
vitest run src/__tests__/tui/console/StartAgentPane.test.ts— 8 passednpm run lint+npm run testgreenGenerated with Devin