fix(desktop): mark tile and branch runtimes as background

A tile and a branched session each live in their own worktree and render
from their own SessionView slice, so neither is the main pane's session.
Pass foreground: false at both call sites.
This commit is contained in:
Brooklyn Nicholson 2026-07-30 12:27:23 -05:00
parent dd762d07bb
commit c48d9a9c6d

View file

@ -504,7 +504,9 @@ export function useSessionActions({
upsertOptimisticSession(created, stored, null, null)
}
const runtimeInfo = applyRuntimeInfo(created.info)
// A tile lives in its OWN worktree — it must not publish its cwd/branch
// into the composer atoms the main pane renders from.
const runtimeInfo = applyRuntimeInfo(created.info, { foreground: false })
updateSessionState(created.session_id, state => (runtimeInfo ? { ...state, ...runtimeInfo } : state), stored)
openSessionTile(stored, dir)
@ -1182,7 +1184,9 @@ export function useSessionActions({
routedSessionId
)
const runtimeInfo = applyRuntimeInfo(branched.info)
// The branch opens as its own tile in the parent's worktree, not as the
// primary session — keep its runtime out of the main composer atoms.
const runtimeInfo = applyRuntimeInfo(branched.info, { foreground: false })
patchSessionWorkspace(routedSessionId, runtimeInfo?.cwd)
if (runtimeInfo) {