8000 Fix: Prevent text input from capturing j/k keys during base branch selection by kbwo · Pull Request #36 · kbwo/ccmanager · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix: Prevent text input from capturing j/k keys during base branch selection #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2025

Conversation

kbwo
Copy link
Owner
@kbwo kbwo commented Jun 25, 2025

Summary

Fix keyboard navigation issue in the new worktree creation form where j/k keys were being captured by the text input field instead of navigating the base branch selection list.

Description

Problem

When creating a new worktree and reaching the base branch selection step, pressing j or k keys would insert text into the branch name input field instead of navigating up/down through the branch list. This occurred because the text input component was still being rendered even during the base branch selection phase.

Solution

Modified the conditional rendering logic in NewWorktree.tsx to ensure that the text input is only displayed during the branch name input step. When the user reaches the base branch selection step (step === 'base-branch'), only the SelectInput component is rendered, allowing j/k keys to properly navigate the branch list as expected.

The fix adds an explicit check for step === 'branch' and returns null for any other step that isn't explicitly handled, preventing the text input from capturing keyboard events during branch selection.
EOF < /dev/null

…lection

When selecting a base branch in the new worktree form, the branch name
text input was still rendered and capturing keyboard input. This fix
ensures only the SelectInput is shown during base branch selection,
allowing j/k keys to properly navigate the branch list.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@kbwo kbwo marked this pull request as ready for review June 25, 2025 04:04
@kbwo kbwo merged commit 587704e into main Jun 25, 2025
3 checks passed
@kbwo kbwo deleted the fix/branch-input--refix branch June 25, 2025 04:04
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
0