mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 16:59:43 +02:00
feat(tiles): sessions Run from this tab join the open grid; + offers a new session in the tile's case
Every Run path makes each session it created visible through _ensureCreatedSessionVisible and then selects the first one, a human selection that used to leave the grid for the single view. That helper now hands the new session to _joinTileGridFromRun: with the grid open it joins the next free slot, so Run's selection focuses its tile. No Attach overlay flashes on it while Run starts its pane. Sessions created elsewhere (agents, other devices, cron) arrive only by session:created and never join; a grid already holding what the window fits does not take it, and a hint says the new session opens on its own. A tile's + adds "New session in this case": the normal Run (current run mode) for the case the tile's session belongs to, with the toolbar's case put back afterwards; the session it creates joins the grid like any Run from this tab. Disabled for a session outside every case. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -219,7 +219,7 @@ const context = vm.createContext({
|
||||
removeEventListener: documentRemoveEventListener,
|
||||
documentElement: { dataset: {} },
|
||||
createElement: () => new FakeEl(),
|
||||
getElementById: (id: string) => (id === 'tileGrid' ? section : null),
|
||||
getElementById: (id: string) => (id === 'tileGrid' ? section : (bySelector.get(`#${id}`) ?? null)),
|
||||
body,
|
||||
querySelector: (sel: string) =>
|
||||
bySelector.get(sel) ?? (sel === '.main' ? main : sel === '.terminal-wrap' ? wrap : null),
|
||||
|
||||
Reference in New Issue
Block a user