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:
26
frontend/src/components/session/BranchRevivalCard.tsx
Normal file
26
frontend/src/components/session/BranchRevivalCard.tsx
Normal 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>
|
||||
)
|
||||
}
|
||||
22
frontend/src/components/session/BranchTransitionBar.tsx
Normal file
22
frontend/src/components/session/BranchTransitionBar.tsx
Normal 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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user