feat: Add initiative review gate before push
When all phases complete, the initiative now transitions to pending_review status instead of silently stopping. The user reviews the full initiative diff and chooses: - Push Branch: push cw/<name> to remote for PR workflows - Merge & Push: merge into default branch and push Changes: - Schema: Add pending_review to initiative status enum - BranchManager: Add pushBranch port + SimpleGit adapter - Events: initiative:pending_review, initiative:review_approved - Orchestrator: checkInitiativeCompletion + approveInitiative - tRPC: getInitiativeReviewDiff, getInitiativeReviewCommits, getInitiativeCommitDiff, approveInitiativeReview - Frontend: InitiativeReview component in ReviewTab - Subscriptions: Add initiative events + missing preview/conversation event types and subscription procedures
This commit is contained in:
@@ -48,7 +48,7 @@ export interface InitiativeRepository {
|
||||
* Find all initiatives with a specific status.
|
||||
* Returns empty array if none exist.
|
||||
*/
|
||||
findByStatus(status: 'active' | 'completed' | 'archived'): Promise<Initiative[]>;
|
||||
findByStatus(status: 'active' | 'completed' | 'archived' | 'pending_review'): Promise<Initiative[]>;
|
||||
|
||||
/**
|
||||
* Update an initiative.
|
||||
|
||||
@@ -19,7 +19,7 @@ import { relations, type InferInsertModel, type InferSelectModel } from 'drizzle
|
||||
export const initiatives = sqliteTable('initiatives', {
|
||||
id: text('id').primaryKey(),
|
||||
name: text('name').notNull(),
|
||||
status: text('status', { enum: ['active', 'completed', 'archived'] })
|
||||
status: text('status', { enum: ['active', 'completed', 'archived', 'pending_review'] })
|
||||
.notNull()
|
||||
.default('active'),
|
||||
mergeRequiresApproval: integer('merge_requires_approval', { mode: 'boolean' })
|
||||
|
||||
Reference in New Issue
Block a user