Q166: workspaces can be edited, made primary and removed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-09 03:32:03 -04:00
1 parent 20c37362f3
commit e8722cd815
12 files changed
+247 -9

No files matched your search

@@ -56,6 +56,9 @@ export const organizationContracts = {
runTask: z.strictObject({ orgId: id, taskId: id }) satisfies z.ZodType<C.RunTaskInput>,
createGoal: z.strictObject({ orgId: id, title: z.string(), description: z.string(), ownerAgentId: nullableId, dueAt: z.string().nullable().optional() }) satisfies z.ZodType<C.CreateGoalInput>,
setGoalDueDate: z.strictObject({ orgId: id, goalId: id, dueAt: z.string().nullable() }) satisfies z.ZodType<C.SetGoalDueDateInput>,
updateWorkspace: z.strictObject({ orgId: id, workspaceId: id, name: z.string(), localPath: z.string(), projectId: nullableId }) satisfies z.ZodType<C.UpdateWorkspaceInput>,
setPrimaryWorkspace: z.strictObject({ orgId: id, workspaceId: id }),
deleteWorkspace: z.strictObject({ orgId: id, workspaceId: id }),
updateOrganization: z.strictObject({
orgId: id, name: z.string(), description: z.string(), mission: z.string(), goal: z.string(),
executionMode: z.enum(["ai_ceo", "ai_cofounder"]), autoApproveHires: z.boolean(), reviewDeliverables: z.boolean(),
+4
View File
@@ -39,6 +39,7 @@ import { resumeGoal } from "../services/goal-review-service";
import { stopAllRuns, stopRun } from "../services/run-control";
import { cancelQueuedRun } from "../services/run-cancel";
import { runHistory } from "../services/run-history";
import { deleteWorkspace, setPrimaryWorkspace, updateWorkspace } from "../services/workspace-admin";
export interface IpcDeps {
connection: DatabaseConnection;
@@ -185,6 +186,9 @@ export function registerIpcHandlers(deps: IpcDeps): void {
handle("createGoal", (input) => mutate(() => organization.createGoal(input)));
handle("setGoalDueDate", (input) => mutate(() => organization.setGoalDueDate(input)));
handle("updateOrganization", (input) => mutate(() => organization.updateOrganization(input)));
handle("updateWorkspace", (input) => mutate(() => updateWorkspace(deps.connection.db, input)));
handle("setPrimaryWorkspace", (input) => mutate(() => setPrimaryWorkspace(deps.connection.db, input.orgId, input.workspaceId)));
handle("deleteWorkspace", (input) => mutate(() => deleteWorkspace(deps.connection.db, input.orgId, input.workspaceId)));
handle("createProject", (input) => mutate(() => organization.createProject(input)));
handle("createWorkspace", (input) => mutate(() => organization.createWorkspace(input)));
handle("createDocument", (input) => mutate(() => documents.create(input)));