Skip to content

bugfix #7 : delete useless "k" and "j" char in manual mode, indeed "…#13

Merged
tianzhou merged 1 commit into
pgplex:mainfrom
kenyhenry:bugfix/7-invalid-chars-manual-connection
Jul 11, 2026
Merged

bugfix #7 : delete useless "k" and "j" char in manual mode, indeed "…#13
tianzhou merged 1 commit into
pgplex:mainfrom
kenyhenry:bugfix/7-invalid-chars-manual-connection

Conversation

@kenyhenry

Copy link
Copy Markdown
Contributor

bugfix #7 : delete "k" and "j" char indeed "up" and "down" is enough.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to fix issue #7 in the connection dialog’s manual input mode by ensuring certain keys (notably j/k) are not consumed as navigation shortcuts, so they can be typed as normal characters.

Changes:

  • Removed j/k handling from connection dialog navigation so those characters can be entered in manual mode.
  • Minor formatting-only adjustments (alignment/spacing) in a few places.
Comments suppressed due to low confidence (1)

internal/app/app.go:3284

  • In manual mode, the "/" key is still intercepted by case "/", "ctrl+f" and the handler returns without delegating to connectionDialog.Update, which means users still can’t type "/" (part of issue #7). Similarly, up/down are consumed even in manual mode. Consider only handling these keys in discovery mode and delegating to the text input when ManualMode is true.
	case "/", "ctrl+f":
		// Enter search mode (only in discovery mode)
		if !a.connectionDialog.ManualMode {
			a.connectionDialog.EnterSearchMode()
		}
		return a, nil

	case "up":
		if !a.connectionDialog.ManualMode {
			a.connectionDialog.MoveSelection(-1)
		}
		return a, nil

	case "down":
		if !a.connectionDialog.ManualMode {
			a.connectionDialog.MoveSelection(1)
		}
		return a, nil

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/app/app.go
Comment on lines +2121 to 2124
Width(a.state.Width-2).
Background(lipgloss.Color("#313244")).
Foreground(lipgloss.Color("#cdd6f4")).
Border(lipgloss.RoundedBorder()).
Comment thread internal/app/app.go
Comment on lines +2217 to 2220
Width(a.state.Width-2).
Background(lipgloss.Color("#313244")).
Foreground(lipgloss.Color("#cdd6f4")).
Border(lipgloss.RoundedBorder()).

@tianzhou tianzhou left a comment

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.

LGTM. Thanks for the contribution.

@tianzhou
tianzhou merged commit 83ed207 into pgplex:main Jul 11, 2026
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.

3 participants