fix: address code review — error-path tests, edge cases, UX improvements

This commit is contained in:
2026-06-10 18:20:54 +08:00
parent 493775cd1e
commit 8d16fabaed
6 changed files with 77 additions and 10 deletions
+3 -4
View File
@@ -52,10 +52,9 @@ export const workspacesApi = {
release: (wtID: string) =>
request<Worktree>(`/api/v1/worktrees/${enc(wtID)}/release`, { method: 'POST' }),
listBranches(wsID: string): Promise<string[]> {
return request<{ branches: string[] }>(`/api/v1/workspaces/${enc(wsID)}/branches`)
.then(r => r.branches)
},
listBranches: (wsID: string): Promise<string[]> =>
request<{ branches: string[] }>(`/api/v1/workspaces/${enc(wsID)}/branches`)
.then(r => r.branches),
// ===== Git ops =====
statusOnMain: (wsID: string) =>
@@ -36,6 +36,8 @@
:options="baseBranchOptions"
:loading="branchesLoading"
clearable
filterable
tag
placeholder="默认使用 default_branch"
/>
</NFormItem>