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

@@ -48,6 +48,20 @@ describe('SideDrawer', () => {
expect(handleClose).toHaveBeenCalled()
})
it('ignores an Escape key already handled by a nested layer', () => {
const handleClose = vi.fn()
render(
<SideDrawer isOpen onClose={handleClose} ariaLabel="Test drawer">
<div>Test content</div>
</SideDrawer>,
)
const handled = (event: KeyboardEvent) => event.preventDefault()
document.addEventListener('keydown', handled, { capture: true })
fireEvent.keyDown(document, { key: 'Escape' })
document.removeEventListener('keydown', handled, { capture: true })
expect(handleClose).not.toHaveBeenCalled()
})
})
describe('SideDrawerHeader', () => {
+1 -1
View File
@@ -35,7 +35,7 @@ export function SideDrawer({
useEffect(() => {
const handleEscape = (e: KeyboardEvent) => {
if (e.key === 'Escape' && isOpen) {
if (e.key === 'Escape' && isOpen && !e.defaultPrevented) {
onClose()
}
}