Skip to content

[Fix] Session prompt loses focus when task panels expand - #2533

Draft
roomote-roomote[bot] wants to merge 1 commit into
developfrom
fix/session-panel-focus-2qviv9ghngqaq
Draft

[Fix] Session prompt loses focus when task panels expand#2533
roomote-roomote[bot] wants to merge 1 commit into
developfrom
fix/session-panel-focus-2qviv9ghngqaq

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

​Created by Roomote. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

  • Keep focus on the main Session prompt when task panels expand automatically on load, when newly delegated tasks appear, or when tasks are opened side by side.
  • Continue focusing a task prompt when its task card is explicitly selected.
  • Add regression coverage for automatic expansion, the side-by-side action, explicit task-card selection, and existing keyboard focus navigation.

Why this change was made

Expanding task panels reused the explicit task-selection focus path, unexpectedly moving users away from the Session composer even though they had not selected a task.

Impact

Sessions can display running tasks side by side without interrupting typing in the main prompt. Direct task selection and Alt/Option + Arrow prompt navigation retain their existing behavior.

@roomote-community

roomote-community Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

1 issue outstanding. See task

  • Side-by-side opening does not preserve Session composer focus for a real pointer click. (apps/web/src/app/(sandbox)/sessions/[sessionId]/use-session-workspace-panels.ts:211)

Reviewed 7b3610d

@@ -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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant