Skip to content

Bug: 't' key to edit tags does not work on fresh entries (PR #115 has fix) #116

@manato-tajiri

Description

@manato-tajiri

Bug Description

The t key (edit tags) does not work on SSH entries that have never been edited via the e key first. If you:

  1. Open a server entry from ~/.ssh/config that has never been edited via e
  2. Press t to add tags directly
  3. Enter tags and save
  4. The UI says "Tags updated" but tags are not persisted

Additionally, it is impossible to remove the last tag from an entry — clearing all tags and saving does nothing.

Root Cause

Two bugs in the code:

  1. handlers.go:411: The showEditTagsForm save callback silently discards errors with _ = t.serverService.UpdateServer(...). If the SSH config write fails, tags are never saved but the UI says "Tags updated."

  2. server_list.go:85: After refreshing the server list, UpdateServers resets selection to index 0, making it appear tags were not saved on the edited server.

Note: The nil-guard issue in metadata_manager.go (preventing tag clearing) was already fixed — the remaining bugs are in handlers.go and server_list.go.

Fix Available

PR #115 contains the complete fix: #115

The changes are minimal (+25/-3 lines across two files):

  • handlers.go: Replace _ = t.serverService.UpdateServer(...) with proper error handling
  • server_list.go: Track selected server alias and restore selection after refresh

All existing tests pass with these changes applied.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions