Skip to content

fix(ui): focus newly opened terminal sessions - #56

Open
ChrisLauinger77 wants to merge 1 commit into
cheat2001:mainfrom
ChrisLauinger77:codex/fix-terminal-focus
Open

ChrisLauinger77 wants to merge 1 commit into
cheat2001:mainfrom
ChrisLauinger77:codex/fix-terminal-focus

Conversation

@ChrisLauinger77

Copy link
Copy Markdown
Contributor

What & why

Clicking the terminal button for the first time opened the panel without keyboard focus, so typing required another click inside the terminal. Focus was only applied when reattaching an existing session. Apply it after both setup paths so newly opened and reopened terminals accept typing immediately. Extend the terminal flow test to check focus, echoed keystrokes, and retained input after reopening.

Development StrictMode masked the missing call by running the attachment effect twice. The production preview reproduced the failure before the fix and passes afterward.

Screenshots

This changes keyboard focus without changing the visual layout. The browser regression verifies focus and typed input after opening and reopening.

Validation

  • Workspace typecheck passed.
  • All 238 unit tests passed.
  • Desktop production build passed.
  • Production browser checks passed for terminal focus/reopening/context-menu actions and font settings (2 tests, installed Chromium).
  • The focus check failed on the production build before the fix.

Checklist

  • pnpm typecheck && pnpm test pass
  • CLAUDE.md documents the focus behavior and StrictMode testing pitfall
  • Commits carry no trailers from coding tools

Rust, engine integration, undo, and color checks are not applicable to this focus-only frontend change.

This branch has not been deployed

No deployments
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