Skip to content

fix: merge upstream fixes and repair ssh config writes - #1

Merged
lord-helicon merged 8 commits into
mainfrom
fix/upstream-prs-and-config-bugs
Oct 11, 2026
Merged

lord-helicon merged 8 commits into
mainfrom
fix/upstream-prs-and-config-bugs

Conversation

@lord-helicon

@lord-helicon lord-helicon commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

This PR fixes several SSH configuration persistence issues and improves terminal UI behavior:

  • Preserves symbolic links when updating SSH configs, so dotfile-managed config links remain intact while their target file is updated.
  • Retains negated SSH host patterns (for example, !bastion) when configs are loaded and saved, preventing their meaning from being changed.
  • Adds new servers before the first matching wildcard host block so wildcard settings do not override the new server’s options.
  • Improves server-list navigation and selection behavior:
    • Recognizes focus on either the server list container or its underlying list.
    • Preserves the selected server when the list is refreshed.
    • Selects the first result for a new search query.
  • Shows an error modal when saving tag edits fails instead of silently ignoring the failure.
  • Fixes Windows handling of Backspace versus Ctrl+H, preventing Backspace from triggering previous-tab navigation.
  • Expands valid SSH usernames to allow @ and : in addition to existing supported characters.

GOBERT Romain and others added 8 commits October 11, 2026 17:47
Preserving the selection across list refreshes (previous commit) also
applied to search input, so a previously selected host that still
matched the new query stayed selected instead of the best match.
The Windows console reports Backspace as KeyCtrlH (0x08) without a Ctrl
modifier, so the form treated every Backspace as "previous tab". Only
switch tabs on Windows when Ctrl is actually held. Unix terminals send
DEL for Backspace, so Ctrl+H keeps working there.

Fixes the bug reported in upstream Adembc#106, without disabling
Ctrl+S/Ctrl+L/Esc while an input field has focus.
Saving renamed the temp file over ~/.ssh/config itself, replacing a
symlink (e.g. into a dotfiles repo) with a regular file and leaving the
real file stale. Resolve the link first and atomically replace its
target instead. Backups still go next to the link in ~/.ssh.

Fixes upstream Adembc#96.
New hosts were appended to the end of the file, after a trailing
"Host *". OpenSSH uses the first value it finds for each option, so
anything set under "Host *" (User, IdentityFile, ...) silently
overrode the same option on the new host. Insert the new host before
the first non-global Host block whose patterns match its alias.
The ssh_config parser strips the leading "!" from Pattern.Str and only
tracks the negation internally, so every save rewrote "Host * !foo" as
"Host * foo", inverting its meaning. It also made "Host !foo" show up
as a server named foo. Restore the "!" right after parsing.
@lord-helicon

Copy link
Copy Markdown
Owner Author

@kody start-review

@kody-ai

kody-ai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Kody Review Complete

Great news! 🎉
No issues were found that match your current review configurations.

Keep up the excellent work! 🚀

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ✅

Access your configuration settings here.

​

@lord-helicon
lord-helicon merged commit 6289a23 into main Oct 11, 2026
5 checks passed
@lord-helicon
lord-helicon deleted the fix/upstream-prs-and-config-bugs branch October 11, 2026 16:18
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