feat(KB-640): add role editing UI and restore KB task prefix
- Add inline role editing to AgentListModal with clickable role icons - Add handleRoleChange and handleRoleKeyDown handlers for role updates - Persist view toggle (board/list) with localStorage alongside role editing - Restore task prefix from FN back to KB for generated task IDs - Restore branch naming from fusion/ back to kb/ for task branches - Update branch name references in executor, merger, scheduler, and CLI - Add touch gesture detection support to TaskCard component - Update worktree grouping labels to use KB prefix
This commit is contained in:
@@ -350,7 +350,7 @@ export class TaskExecutor {
|
||||
* than being named after the task ID. This decouples directory names from
|
||||
* tasks, enabling worktree reuse across dependency chains. When resuming
|
||||
* a task that already has `task.worktree` set, the existing path is used
|
||||
* as-is. Branches remain task-scoped (`fusion/{task-id}`).
|
||||
* as-is. Branches remain task-scoped (`kb/{task-id}`).
|
||||
*/
|
||||
async execute(task: Task): Promise<void> {
|
||||
if (this.executing.has(task.id)) return;
|
||||
@@ -399,7 +399,7 @@ export class TaskExecutor {
|
||||
}
|
||||
|
||||
// Create or reuse worktree — try pool first when recycling is enabled
|
||||
const branchName = `fusion/${task.id.toLowerCase()}`;
|
||||
const branchName = `kb/${task.id.toLowerCase()}`;
|
||||
// Use generateWorktreeName for human-friendly directory names (adjective-noun pattern)
|
||||
// instead of task.id, so worktrees are named like ".worktrees/swift-falcon"
|
||||
let isResume = existsSync(worktreePath);
|
||||
@@ -1049,7 +1049,7 @@ export class TaskExecutor {
|
||||
}
|
||||
|
||||
// Delete the branch
|
||||
const branch = `fusion/${taskId.toLowerCase()}`;
|
||||
const branch = `kb/${taskId.toLowerCase()}`;
|
||||
try {
|
||||
execSync(`git branch -D "${branch}"`, { cwd: this.rootDir, stdio: "pipe" });
|
||||
} catch {
|
||||
@@ -1070,9 +1070,9 @@ export class TaskExecutor {
|
||||
/**
|
||||
* Create a git worktree at `path` on a new branch.
|
||||
*
|
||||
* @param branch — Branch name (e.g., `fusion/fn-042`)
|
||||
* @param branch — Branch name (e.g., `kb/kb-042`)
|
||||
* @param path — Absolute worktree directory path
|
||||
* @param startPoint — Optional git ref to branch from (e.g., `fusion/fn-041`).
|
||||
* @param startPoint — Optional git ref to branch from (e.g., `kb/kb-041`).
|
||||
* When provided, the worktree starts from that ref instead of HEAD.
|
||||
*/
|
||||
/**
|
||||
@@ -1268,7 +1268,7 @@ If issues are found that need attention, describe them clearly.`;
|
||||
* Create a git worktree with automatic recovery from conflicts.
|
||||
* Implements retry logic with exponential backoff for transient failures.
|
||||
*
|
||||
* @param branch - The branch name to create (e.g., "fusion/fn-123")
|
||||
* @param branch - The branch name to create (e.g., "kb/kb-123")
|
||||
* @param path - The desired worktree path
|
||||
* @param taskId - The task ID for logging
|
||||
* @param startPoint - Optional base branch/commit for new branch
|
||||
|
||||
@@ -538,7 +538,7 @@ export async function aiMergeTask(
|
||||
);
|
||||
}
|
||||
|
||||
const branch = `fusion/${taskId.toLowerCase()}`;
|
||||
const branch = `kb/${taskId.toLowerCase()}`;
|
||||
const worktreePath = task.worktree;
|
||||
const result: MergeResult = {
|
||||
task,
|
||||
|
||||
@@ -253,7 +253,7 @@ export class Scheduler {
|
||||
for (const depId of task.dependencies) {
|
||||
const dep = allTasks.find((t) => t.id === depId);
|
||||
if (dep && dep.column === "in-review" && dep.worktree) {
|
||||
return `fusion/${dep.id.toLowerCase()}`;
|
||||
return `kb/${dep.id.toLowerCase()}`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ export class Scheduler {
|
||||
if (task.blockedBy) {
|
||||
const blocker = allTasks.find((t) => t.id === task.blockedBy);
|
||||
if (blocker && blocker.column === "in-review" && blocker.worktree) {
|
||||
return `fusion/${blocker.id.toLowerCase()}`;
|
||||
return `kb/${blocker.id.toLowerCase()}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -111,8 +111,8 @@ export class WorktreePool {
|
||||
* 3. `git checkout -B <branchName> <startPoint>` — create/reset branch from start point
|
||||
*
|
||||
* @param worktreePath — Absolute path to the recycled worktree
|
||||
* @param branchName — Branch name for the new task (e.g., `fusion/fn-042`)
|
||||
* @param startPoint — Git ref to branch from (e.g., `fusion/fn-041`). Defaults to `main`.
|
||||
* @param branchName — Branch name for the new task (e.g., `kb/kb-042`)
|
||||
* @param startPoint — Git ref to branch from (e.g., `kb/kb-041`). Defaults to `main`.
|
||||
*/
|
||||
prepareForTask(worktreePath: string, branchName: string, startPoint?: string): void {
|
||||
// Clean tracked modifications
|
||||
|
||||
Reference in New Issue
Block a user