Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9cf4d0d
refactor: rename workspace to task in renderer
rabanspiegel Dec 13, 2025
2de539e
refactor: rename workspaceId to taskId throughout codebase
rabanspiegel Dec 13, 2025
a93f43a
refactor: rename workspacePath to taskPath
rabanspiegel Dec 13, 2025
9b71ee4
refactor: rename workspaceName to taskName
rabanspiegel Dec 13, 2025
ef7f8d5
refactor: rename workspaceMetadata to taskMetadata
rabanspiegel Dec 13, 2025
5a6b63d
refactor: rename workspace handler functions to task
rabanspiegel Dec 13, 2025
92f8eec
refactor: rename workspace state variables to task
rabanspiegel Dec 13, 2025
abbcb74
refactor: rename workspace IPC methods to task
rabanspiegel Dec 13, 2025
d2b66b4
refactor: rename project.workspaces to project.tasks
rabanspiegel Dec 13, 2025
394b27a
refactor: rename remaining workspace variables and messages to task
rabanspiegel Dec 13, 2025
4873ab1
refactor: rename workspace to task in main process
rabanspiegel Dec 13, 2025
c23812d
refactor: rename workspace HTML IDs to task
rabanspiegel Dec 13, 2025
584bd9b
refactor: rename workspace CSS classes to task
rabanspiegel Dec 13, 2025
b9ba8ae
refactor: update workspace fallback strings and comments to task
rabanspiegel Dec 13, 2025
a265d31
refactor: rename workspace relation to task in schema
rabanspiegel Dec 13, 2025
aec7a99
db: rename workspaces table to tasks
rabanspiegel Dec 13, 2025
aa4ed25
refactor: rename workspace internal variables and functions to task
rabanspiegel Dec 16, 2025
ac76146
refactor: rename workspace refs to task in renderer components
rabanspiegel Dec 16, 2025
86f45d6
refactor: rename workspace types and functions to task in main process
rabanspiegel Dec 16, 2025
974a5db
test: update tests for renamed workspace functions
rabanspiegel Dec 16, 2025
81c1898
refactor: rename workspace telemetry events and components to task
rabanspiegel Dec 16, 2025
5dfc6cb
test: update workspace paths to task in test files
rabanspiegel Dec 16, 2025
5635602
docs: update workspace references to task in comments
rabanspiegel Dec 16, 2025
52156b0
refactor: update workspace UI strings to task
rabanspiegel Dec 16, 2025
3dbd9ac
refactor: rename absWorkspace to absTaskPath
rabanspiegel Dec 16, 2025
3e1891c
refactor: rename workspace storage keys to task
rabanspiegel Dec 16, 2025
0772b32
refactor: rename workspace local variables to task
rabanspiegel Dec 16, 2025
f0b3f54
refactor: rename workspace PTY IDs to task
rabanspiegel Dec 16, 2025
94ac7d0
refactor: rename c7WorkspaceEnabled to c7TaskEnabled
rabanspiegel Dec 16, 2025
c0badf2
Merge origin/main into refactor/workspace-to-task-rename
rabanspiegel Dec 16, 2025
44b741c
format
rabanspiegel Dec 16, 2025
6ea4e3f
refactor: rename generatePrContent workspacePath to taskPath
rabanspiegel Dec 16, 2025
b8823fb
fix: revert Linear workspaceName rename
rabanspiegel Dec 16, 2025
40a1fb0
format
rabanspiegel Dec 16, 2025
d8047e6
Merge origin/main into refactor/workspace-to-task-rename
rabanspiegel Dec 18, 2025
dcbae42
fix: rename remaining workspace references to task
rabanspiegel Dec 18, 2025
277f8fa
format
rabanspiegel Dec 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions drizzle/0002_lyrical_impossible_man.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
ALTER TABLE `workspaces` RENAME TO `tasks`;--> statement-breakpoint
PRAGMA foreign_keys=OFF;--> statement-breakpoint
CREATE TABLE `__new_tasks` (
`id` text PRIMARY KEY NOT NULL,
`project_id` text NOT NULL,
`name` text NOT NULL,
`branch` text NOT NULL,
`path` text NOT NULL,
`status` text DEFAULT 'idle' NOT NULL,
`agent_id` text,
`metadata` text,
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
FOREIGN KEY (`project_id`) REFERENCES `projects`(`id`) ON UPDATE no action ON DELETE cascade
);
--> statement-breakpoint
INSERT INTO `__new_tasks`("id", "project_id", "name", "branch", "path", "status", "agent_id", "metadata", "created_at", "updated_at") SELECT "id", "project_id", "name", "branch", "path", "status", "agent_id", "metadata", "created_at", "updated_at" FROM `tasks`;--> statement-breakpoint
DROP TABLE `tasks`;--> statement-breakpoint
ALTER TABLE `__new_tasks` RENAME TO `tasks`;--> statement-breakpoint
PRAGMA foreign_keys=ON;--> statement-breakpoint
CREATE INDEX `idx_tasks_project_id` ON `tasks` (`project_id`);--> statement-breakpoint
CREATE TABLE `__new_conversations` (
`id` text PRIMARY KEY NOT NULL,
`task_id` text NOT NULL,
`title` text NOT NULL,
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
FOREIGN KEY (`task_id`) REFERENCES `tasks`(`id`) ON UPDATE no action ON DELETE cascade
);
--> statement-breakpoint
INSERT INTO `__new_conversations`("id", "task_id", "title", "created_at", "updated_at") SELECT "id", "workspace_id", "title", "created_at", "updated_at" FROM `conversations`;--> statement-breakpoint
DROP TABLE `conversations`;--> statement-breakpoint
ALTER TABLE `__new_conversations` RENAME TO `conversations`;--> statement-breakpoint
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: SQLite migration drops table with FKs enabled

PRAGMA foreign_keys=ON is re-enabled before recreating conversations, but the migration later executes DROP TABLE conversations while messages still has a foreign key referencing conversations. With foreign keys enforced, SQLite commonly rejects dropping the referenced table, causing the migration (and app startup) to fail.

Fix in Cursor Fix in Web

CREATE INDEX `idx_conversations_task_id` ON `conversations` (`task_id`);
2 changes: 1 addition & 1 deletion drizzle/meta/0001_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "7",
"version": "6",
"dialect": "sqlite",
"id": "ec5ad35e-22ec-4c0b-9d48-cfb1033d9d93",
"prevId": "b932945e-f26a-4c07-9c63-08179d95d5bc",
Expand Down
347 changes: 347 additions & 0 deletions drizzle/meta/0002_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,347 @@
{
"version": "6",
"dialect": "sqlite",
"id": "f61fcd81-f000-4e2d-84f2-2f79133ae5d6",
"prevId": "ec5ad35e-22ec-4c0b-9d48-cfb1033d9d93",
"tables": {
"conversations": {
"name": "conversations",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"task_id": {
"name": "task_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
}
},
"indexes": {
"idx_conversations_task_id": {
"name": "idx_conversations_task_id",
"columns": ["task_id"],
"isUnique": false
}
},
"foreignKeys": {
"conversations_task_id_tasks_id_fk": {
"name": "conversations_task_id_tasks_id_fk",
"tableFrom": "conversations",
"tableTo": "tasks",
"columnsFrom": ["task_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"messages": {
"name": "messages",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"conversation_id": {
"name": "conversation_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"sender": {
"name": "sender",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"timestamp": {
"name": "timestamp",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
},
"metadata": {
"name": "metadata",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {
"idx_messages_conversation_id": {
"name": "idx_messages_conversation_id",
"columns": ["conversation_id"],
"isUnique": false
},
"idx_messages_timestamp": {
"name": "idx_messages_timestamp",
"columns": ["timestamp"],
"isUnique": false
}
},
"foreignKeys": {
"messages_conversation_id_conversations_id_fk": {
"name": "messages_conversation_id_conversations_id_fk",
"tableFrom": "messages",
"tableTo": "conversations",
"columnsFrom": ["conversation_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"projects": {
"name": "projects",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"path": {
"name": "path",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"git_remote": {
"name": "git_remote",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"git_branch": {
"name": "git_branch",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"base_ref": {
"name": "base_ref",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"github_repository": {
"name": "github_repository",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"github_connected": {
"name": "github_connected",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
}
},
"indexes": {
"idx_projects_path": {
"name": "idx_projects_path",
"columns": ["path"],
"isUnique": true
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"tasks": {
"name": "tasks",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"project_id": {
"name": "project_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"branch": {
"name": "branch",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"path": {
"name": "path",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'idle'"
},
"agent_id": {
"name": "agent_id",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"metadata": {
"name": "metadata",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"created_at": {
"name": "created_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
},
"updated_at": {
"name": "updated_at",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "CURRENT_TIMESTAMP"
}
},
"indexes": {
"idx_tasks_project_id": {
"name": "idx_tasks_project_id",
"columns": ["project_id"],
"isUnique": false
}
},
"foreignKeys": {
"tasks_project_id_projects_id_fk": {
"name": "tasks_project_id_projects_id_fk",
"tableFrom": "tasks",
"tableTo": "projects",
"columnsFrom": ["project_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
}
},
"views": {},
"enums": {},
"_meta": {
"schemas": {},
"tables": {
"\"workspaces\"": "\"tasks\""
},
"columns": {
"\"conversations\".\"workspace_id\"": "\"conversations\".\"task_id\""
}
},
"internal": {
"indexes": {}
}
}
Loading