diff --git a/apps/web/src/components/os/apps/chat-blocks/RouteProposalCard.tsx b/apps/web/src/components/os/apps/chat-blocks/RouteProposalCard.tsx index 4911111..ed3f1a4 100644 --- a/apps/web/src/components/os/apps/chat-blocks/RouteProposalCard.tsx +++ b/apps/web/src/components/os/apps/chat-blocks/RouteProposalCard.tsx @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react'; import { - Route, Loader2, CheckCircle2, XCircle, X, ChevronDown, ShieldAlert, ExternalLink, + Route, Loader2, CheckCircle2, XCircle, } from 'lucide-react'; import { adapter } from '@/lib/adapter'; import type { @@ -38,8 +38,6 @@ function revalidationReason(err: unknown): string | null { */ export default function RouteProposalCard({ proposal, onDispatched, onRePropose }: RouteProposalCardProps) { const [phase, setPhase] = useState('proposed'); - const [egressOpen, setEgressOpen] = useState(false); - const [removedFrameIds, setRemovedFrameIds] = useState([]); const [executorId, setExecutorId] = useState(proposal.selected?.id ?? ''); const [dispatchResult, setDispatchResult] = useState(null); const [errorReason, setErrorReason] = useState(null); @@ -48,32 +46,16 @@ export default function RouteProposalCard({ proposal, onDispatched, onRePropose // inherit the previous card's phase or stale executor selection. useEffect(() => { setPhase('proposed'); - setEgressOpen(false); - setRemovedFrameIds([]); setExecutorId(proposal.selected?.id ?? ''); setDispatchResult(null); setErrorReason(null); }, [proposal.routeDecisionId, proposal.selected?.id]); - const blocked = proposal.egress === null && proposal.briefBlocked === true; - const egressItems = proposal.egress?.items ?? []; - const remainingItems = egressItems.filter(i => !removedFrameIds.includes(i.frameId)); - - const removeFrame = (frameId: string) => { - setRemovedFrameIds(prev => (prev.includes(frameId) ? prev : [...prev, frameId])); - }; - - const removeAllFrames = () => { - setRemovedFrameIds(egressItems.map(i => i.frameId)); - }; - - const confirm = async (opts?: { withoutMemory?: boolean }) => { + const confirm = async () => { setPhase('dispatching'); setErrorReason(null); - const removeIds = opts?.withoutMemory ? egressItems.map(i => i.frameId) : removedFrameIds; const body: RouteProposalConfirmBody = { ...(executorId && executorId !== proposal.selected?.id ? { executorId } : {}), - ...(removeIds.length > 0 ? { removeFrameIds: removeIds } : {}), }; try { const result = await adapter.routeProposals.confirm(proposal.routeDecisionId, body); @@ -134,73 +116,8 @@ export default function RouteProposalCard({ proposal, onDispatched, onRePropose

)} - {/* Blocked brief — B1 injection gate: run-without-memory only */} - {blocked && phase !== 'dispatched' && ( -
- - - Memory context was blocked by the safety scan - {proposal.briefBlockedReason ? ` (${proposal.briefBlockedReason})` : ''}. This task can - only run without memory. - -
- )} - - {/* Egress disclosure — only when a brief accompanies the dispatch */} - {!blocked && proposal.egress && phase !== 'dispatched' && ( -
- - {egressOpen && ( -
    - {remainingItems.map(item => ( -
  • - {item.date} · {item.source} - {item.preview} - -
  • - ))} -
- )} - {remainingItems.length > 0 && ( - - )} -
- )} - {/* Alternatives override — rejected greyed with reason tooltip */} - {!blocked && phase === 'proposed' && proposal.selected + {phase === 'proposed' && proposal.selected && (proposal.alternatives.length > 0 || proposal.rejected.length > 0) && (