fix: add missing branching files and TypeScript fix

- Add BranchRevivalCard, BranchTransitionBar, useHandoff, useResolutionOutputs, SessionQueuePage
- Fix useFlowPilotSession: add is_branching/active_branch_id defaults

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-03-24 13:40:13 +00:00
parent c8778bb4e7
commit 19283fdeb6
6 changed files with 196 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
import { RotateCcw } from 'lucide-react'
import type { BranchResponse } from '@/types/branching'
interface BranchRevivalCardProps {
branch: BranchResponse
evidenceSource: BranchResponse | null
}
export function BranchRevivalCard({ branch, evidenceSource }: BranchRevivalCardProps) {
if (branch.status !== 'revived') return null
return (
<div className="bg-yellow-400/5 border border-yellow-400/20 rounded-md px-3 py-2 my-2">
<div className="flex items-center gap-2 text-sm">
<RotateCcw size={14} className="text-yellow-400" />
<span className="text-yellow-400 font-medium">Branch Revived</span>
</div>
{branch.evidence_description && (
<p className="text-xs text-secondary mt-1">{branch.evidence_description}</p>
)}
{evidenceSource && (
<p className="text-xs text-muted mt-0.5">Evidence from: {evidenceSource.label}</p>
)}
</div>
)
}

View File

@@ -0,0 +1,22 @@
import { ArrowRight } from 'lucide-react'
import type { BranchResponse } from '@/types/branching'
interface BranchTransitionBarProps {
fromBranch: BranchResponse | null
toBranch: BranchResponse
}
export function BranchTransitionBar({ fromBranch, toBranch }: BranchTransitionBarProps) {
return (
<div className="bg-accent-dim border border-accent/20 rounded-md px-3 py-2 my-2 flex items-center gap-2 text-sm">
<span className="text-muted">Switched to</span>
<span className="text-accent-text font-medium">{toBranch.label}</span>
{fromBranch && (
<>
<ArrowRight size={12} className="text-muted" />
<span className="text-muted">from {fromBranch.label}</span>
</>
)}
</div>
)
}