Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 52a13aa6b7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!isVisible || focusRequestVersion === 0) { | ||
| return; | ||
| } | ||
| pendingFocusRef.current = true; | ||
| focusTerminalIfRequested(); |
There was a problem hiding this comment.
Consume focus requests exactly once
This effect treats focusRequestVersion as a boolean (!= 0) instead of a monotonic request id, so once any focus request has ever happened, every later isVisible transition to true will set pendingFocusRef again and re-focus the terminal. That reintroduces unsolicited focus for non-focus open paths (for example programmatic opens that intentionally call plain openTerminal), because the old request is effectively replayed indefinitely rather than consumed once.
Useful? React with 👍 / 👎.
| terminal.refresh(0, lastRow); | ||
| terminal.focus(); | ||
| }, []); | ||
| focusTerminalIfRequested(); |
There was a problem hiding this comment.
Preserve shortcut-open focus behavior
refreshTerminal no longer focuses by default, so opening the panel now depends on an explicit requestTerminalFocus() call. The keyboard shortcut path still goes through usePanelShortcuts -> useLayoutController -> raw handleToggleTerminal (no focus request), so opening terminal via the configured shortcut leaves focus in the previous element and users cannot type until they click the terminal.
Useful? React with 👍 / 👎.
|
@Dimillian codex reviewed but that focuss thing is intentional, if you are OK with that i think its good to go. |

on every conversation change or some other actions the attention focussed on the terminal and it was really annoying.
Left it to focuss on user actions for terminal.