Skip to content

Commit 2759893

Browse files
Merge branch 'notifications-jsyz'
2 parents 645b458 + f4e266e commit 2759893

5 files changed

Lines changed: 45 additions & 54 deletions

File tree

cli/src/commands/current-task.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { CliError, ExitCodes } from '../utils/errors'
44
import type { TaskStatus } from '@shared/types'
55

66
const STATUS_MAP: Record<string, TaskStatus> = {
7-
done: 'DONE',
87
review: 'IN_REVIEW',
98
cancel: 'CANCELED',
109
'in-progress': 'IN_PROGRESS',
@@ -104,7 +103,7 @@ export async function handleCurrentTaskCommand(
104103
if (!newStatus) {
105104
throw new CliError(
106105
'INVALID_ACTION',
107-
`Unknown action: ${action}. Valid actions: done, review, cancel, in-progress, pr, linear`,
106+
`Unknown action: ${action}. Valid actions: review, cancel, in-progress, pr, linear`,
108107
ExitCodes.INVALID_ARGS
109108
)
110109
}

cli/src/commands/tasks.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import { output } from '../utils/output'
44
import { CliError, ExitCodes } from '../utils/errors'
55
import type { TaskStatus } from '@shared/types'
66

7-
const VALID_STATUSES: TaskStatus[] = ['IN_PROGRESS', 'IN_REVIEW', 'DONE', 'CANCELED']
7+
// DONE is intentionally excluded - tasks complete automatically when PRs merge
8+
const VALID_STATUSES: TaskStatus[] = ['IN_PROGRESS', 'IN_REVIEW', 'CANCELED']
89

910
export async function handleTasksCommand(
1011
action: string | undefined,

server/routes/tasks.ts

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -118,47 +118,8 @@ function initializeWorktreeForVibora(worktreePath: string): void {
118118
const claudeLocalPath = path.join(worktreePath, 'CLAUDE.local.md')
119119
const gitignorePath = path.join(worktreePath, '.gitignore')
120120

121-
const viboraSection = `
122-
## Vibora Task Management
123-
124-
You are working inside a Vibora task worktree. Use the \`vibora\` CLI to manage this task:
125-
126-
\`\`\`bash
127-
# View current task info
128-
vibora current-task
129-
130-
# Associate a PR with this task (enables auto-completion when merged)
131-
vibora current-task pr https://github.com/owner/repo/pull/123
132-
133-
# Associate a Linear ticket with this task
134-
vibora current-task linear https://linear.app/team/issue/TEAM-123
135-
136-
# Update task status when work is complete
137-
vibora current-task review # Ready for review
138-
vibora current-task done # Task complete
139-
140-
# Send a notification to the user
141-
vibora notify "Title" "Message body"
142-
\`\`\`
143-
144-
When you create a PR for this work, run \`vibora current-task pr <url>\` to link it.
145-
The task will automatically complete when the PR is merged.
146-
147-
### Notifications
148-
149-
All \`vibora current-task\` status changes automatically send notifications, so use those for status updates:
150-
151-
\`\`\`bash
152-
vibora current-task review # Notifies: "Task Ready for Review"
153-
vibora current-task done # Notifies: "Task Completed"
154-
\`\`\`
155-
156-
For other communications (questions, issues, or anything not a status change), use:
157-
158-
\`\`\`bash
159-
vibora notify "Title" "Message body"
160-
\`\`\`
161-
`
121+
const templatePath = path.join(__dirname, '../templates/CLAUDE.local.template.md')
122+
const viboraSection = fs.readFileSync(templatePath, 'utf-8')
162123

163124
// Handle CLAUDE.local.md - create or append
164125
let claudeContent = ''

server/services/task-status.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { killClaudeInTerminalsForWorktree } from '../terminal/pty-instance'
1313
* - Database update (status, position, updatedAt)
1414
* - WebSocket broadcast
1515
* - Linear ticket sync
16-
* - Notifications (for IN_REVIEW, DONE)
16+
* - Notifications (for IN_REVIEW only)
1717
* - Kill Claude processes (for DONE, CANCELED)
1818
*/
1919
export async function updateTaskStatus(
@@ -57,7 +57,7 @@ export async function updateTaskStatus(
5757
})
5858
}
5959

60-
// Send notifications for specific status transitions
60+
// Send notification when task moves to review
6161
if (newStatus === 'IN_REVIEW') {
6262
sendNotification({
6363
title: 'Task Ready for Review',
@@ -66,14 +66,6 @@ export async function updateTaskStatus(
6666
taskTitle: updated.title,
6767
type: 'task_status_change',
6868
})
69-
} else if (newStatus === 'DONE') {
70-
sendNotification({
71-
title: 'Task Completed',
72-
message: `Task "${updated.title}" marked as done`,
73-
taskId: updated.id,
74-
taskTitle: updated.title,
75-
type: 'task_status_change',
76-
})
7769
}
7870

7971
// Kill Claude processes for terminal statuses
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
## Vibora Task Management
3+
4+
You are working inside a Vibora task worktree. Use the `vibora` CLI to manage this task:
5+
6+
```bash
7+
# View current task info
8+
vibora current-task
9+
10+
# Associate a PR with this task (enables auto-completion when merged)
11+
vibora current-task pr https://github.com/owner/repo/pull/123
12+
13+
# Associate a Linear ticket with this task
14+
vibora current-task linear https://linear.app/team/issue/TEAM-123
15+
16+
# Mark task ready for review (sends notification)
17+
vibora current-task review
18+
19+
# Send a notification to the user
20+
vibora notify "Title" "Message body"
21+
```
22+
23+
When you create a PR for this work, run `vibora current-task pr <url>` to link it.
24+
The task will automatically complete when the PR is merged (you cannot mark it done manually).
25+
26+
### Notifications
27+
28+
Moving to review automatically sends a notification:
29+
30+
```bash
31+
vibora current-task review # Notifies: "Task Ready for Review"
32+
```
33+
34+
For other communications (questions, issues, or anything not a status change), use:
35+
36+
```bash
37+
vibora notify "Title" "Message body"
38+
```

0 commit comments

Comments
 (0)