Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,6 @@ export function sessionWorkspacePanelReducer(
return {
...state,
taskPanelIds,
promptFocusTaskId:
action.selectedTaskId ??
action.taskIds.find((taskId) => taskId !== action.selectedTaskId) ??
null,
};
}
case 'add-tasks': {
Expand All @@ -157,15 +153,12 @@ export function sessionWorkspacePanelReducer(
);
insertionIndex += 1;
}
const shouldFocus =
const shouldShowTaskPanels =
state.utilityPanel === null || state.utilityPanel.kind === 'tasks';
return {
...state,
utilityPanel: shouldFocus ? null : state.utilityPanel,
utilityPanel: shouldShowTaskPanels ? null : state.utilityPanel,
taskPanelIds,
promptFocusTaskId: shouldFocus
? (action.taskIds[0] ?? state.promptFocusTaskId)
: state.promptFocusTaskId,
};
}
case 'open-task': {
Expand Down Expand Up @@ -216,7 +209,6 @@ export function sessionWorkspacePanelReducer(
(taskId) => taskId !== action.selectedTaskId,
),
taskArtifacts: {},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opening side-by-side from the native Button moves browser focus to that button before this reducer runs. This action now removes the task-focus request but never restores the Session composer, so a real pointer click still interrupts typing (the new fireEvent.click test does not emulate native focus transfer). Preserve the existing prompt focus on pointer activation, or explicitly restore it after the panels mount.

promptFocusTaskId: action.selectedTaskId ?? action.taskIds[0] ?? null,
};
case 'show-main':
return {
Expand Down
Loading