Files
opencode-manager/frontend/src/components/session/MinimizedFormIndicator.tsx
T
Chris Scott 27860224dc refactor(ui): unify branch pickers into searchable BranchCombobox
Rename BaseBranchSelect to BranchCombobox and rebuild it on the shared
Combobox with an include filter, configurable remote prefixing, and
clearing. Add a useRepoBranches hook and migrate the worktree, integrate,
multi-run, and schedule dialogs onto it. Expose id and ARIA listbox/option
roles from Combobox, and add bg-background to the form prompt panels.
2026-10-04 16:34:22 -04:00

32 lines
1.2 KiB
TypeScript

import { X } from 'lucide-react'
import type { FormInfo } from '@opencode-manager/shared/opencode'
import { getFormText } from '@opencode-manager/shared/notifications'
interface MinimizedFormIndicatorProps {
form: FormInfo
onRestore: () => void
onDismiss: () => void
}
export function MinimizedFormIndicator({ form, onRestore, onDismiss }: MinimizedFormIndicatorProps) {
return (
<div className="w-full bg-background bg-gradient-to-br from-highlight/10 to-highlight/20 border-2 border-highlight/40 rounded-lg shadow-lg mb-2 overflow-hidden">
<div className="flex items-center px-3 py-2 sm:px-4 sm:py-2.5 border-b border-highlight/20 bg-highlight/5">
<button
onClick={onRestore}
className="flex-1 text-left text-xs font-semibold text-highlight"
>
{getFormText(form) || 'Form pending'}
</button>
<button
onClick={onDismiss}
aria-label="Dismiss form"
className="p-1.5 hover:bg-destructive/20 text-muted-foreground hover:text-destructive transition-colors hidden sm:block"
>
<X className="w-3.5 h-3.5" />
</button>
</div>
</div>
)
}