feat(multi-run): add a runs sheet with inline fusion

Replace the centered Multi-run dialog and the stacked Fusion dialog with one
right-side runs sheet, turn fusion into an inline selection mode, and
pre-approve each selected source workspace for the fusion session.

- Move MultiRunDialog into a SideDrawer with Runs / New run tabs; add
  MultiRunCard, FusionComposer and an optimistic starting fusion.
- Add buildFusionSourcePermissionRuleset (external_directory allow, edit deny)
  and thread permissions through SessionLauncher.launch.
- Apply the default permission mode to fusion sessions after launch.
- Let ModelCombobox and BranchCombobox take a listClassName; make SideDrawer
  ignore an Escape already handled by a nested layer.
This commit is contained in:
Chris Scott committed 2026-10-07 11:36:36 -04:00
1 parent b0361cd98b
commit f2e06abb62
23 files changed
+2122 -1736

No files matched your search

@@ -2,6 +2,7 @@ import { useCallback, useMemo } from 'react'
import { Combobox, type ComboboxOption } from '@/components/ui/combobox'
import { useModelSections } from '@/hooks/useModelSections'
import { filterModelSections, toModelComboboxOptions } from '@/lib/modelSections'
import { cn } from '@/lib/utils'
interface ModelComboboxProps {
value: string
@@ -15,6 +16,8 @@ interface ModelComboboxProps {
id?: string
disabled?: boolean
className?: string
listClassName?: string
emptyMeansDefault?: boolean
}
export function ModelCombobox({
@@ -29,8 +32,11 @@ export function ModelCombobox({
id,
disabled,
className,
listClassName,
emptyMeansDefault = true,
}: ModelComboboxProps) {
const { sections, defaultModel } = useModelSections(directory, { enabled })
const { sections, defaultModel: openCodeDefaultModel } = useModelSections(directory, { enabled })
const defaultModel = emptyMeansDefault ? openCodeDefaultModel : null
const options = useMemo(() => toModelComboboxOptions(sections, defaultModel), [sections, defaultModel])
@@ -53,7 +59,7 @@ export function ModelCombobox({
ariaLabel={ariaLabel}
disabled={disabled}
className={className}
listClassName="max-h-[min(24rem,60vh)]"
listClassName={cn('max-h-[min(24rem,60vh)]', listClassName)}
/>
)
}