fix: Address code review feedback and fix lint errors

This commit is contained in:
gsxdsm
2026-02-17 00:13:38 -08:00
parent b9653d6338
commit a09a2c76ae
15 changed files with 183 additions and 165 deletions

View File

@@ -37,7 +37,7 @@ export function createCheckoutBranchHandler() {
}
// Validate branch name (basic validation)
const invalidChars = /[\s~^:?*\[\\]/;
const invalidChars = /[\s~^:?*[\\]/;
if (invalidChars.test(branchName)) {
res.status(400).json({
success: false,

View File

@@ -125,19 +125,14 @@ export function createOpenInEditorHandler() {
`Failed to open in editor, falling back to file manager: ${getErrorMessage(editorError)}`
);
try {
const result = await openInFileManager(worktreePath);
res.json({
success: true,
result: {
message: `Opened ${worktreePath} in ${result.editorName}`,
editorName: result.editorName,
},
});
} catch (fallbackError) {
// Both editor and file manager failed
throw fallbackError;
}
const result = await openInFileManager(worktreePath);
res.json({
success: true,
result: {
message: `Opened ${worktreePath} in ${result.editorName}`,
editorName: result.editorName,
},
});
}
} catch (error) {
logError(error, 'Open in editor failed');