feat: add project workspaces (DB, API, service, and UI)

New project_workspaces table with primary workspace designation.
Full CRUD routes, service with auto-primary promotion on delete,
workspace management UI in project properties panel, and workspace
data included in project/issue ancestor responses.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Forgotten
2026-02-25 08:38:46 -06:00
parent 6f7172c028
commit 29af525167
10 changed files with 6273 additions and 15 deletions

View File

@@ -19,3 +19,18 @@ export type CreateProject = z.infer<typeof createProjectSchema>;
export const updateProjectSchema = createProjectSchema.partial();
export type UpdateProject = z.infer<typeof updateProjectSchema>;
export const createProjectWorkspaceSchema = z.object({
name: z.string().min(1),
cwd: z.string().min(1),
repoUrl: z.string().url().optional().nullable(),
repoRef: z.string().optional().nullable(),
metadata: z.record(z.unknown()).optional().nullable(),
isPrimary: z.boolean().optional().default(false),
});
export type CreateProjectWorkspace = z.infer<typeof createProjectWorkspaceSchema>;
export const updateProjectWorkspaceSchema = createProjectWorkspaceSchema.partial();
export type UpdateProjectWorkspace = z.infer<typeof updateProjectWorkspaceSchema>;