fix: 't' key tag editing on fresh entries and allow last-tag removal#115
Open
manato-tajiri wants to merge 1 commit into
Open
fix: 't' key tag editing on fresh entries and allow last-tag removal#115manato-tajiri wants to merge 1 commit into
manato-tajiri wants to merge 1 commit into
Conversation
Author
|
Hi @Adembc — this PR fixes two bugs in the tag editing flow (
CC: I've also filed issue #116 documenting this bug from a user report. Would appreciate a review when you have a moment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes two bugs related to the
tkey tag editing feature:Bug 1:
tkey silently fails on fresh entries (never edited viae)Root cause: In
handlers.go:411, theshowEditTagsFormsave callback discards the error fromUpdateServerwith_ = t.serverService.UpdateServer(...). If the SSH config write fails (e.g., permissions issue), the tags are never saved but the UI shows "Tags updated" as if it succeeded.Fix: The error is now properly surfaced via an error modal, matching the behavior of
handleServerSave(used by theekey).Bug 2: Selection jumps to first entry after tag save
Root cause: In
server_list.go:85,UpdateServersalways resets the selected item to index 0 after refreshing the list, making it appear that tags were not saved on the edited server.Fix:
UpdateServersnow tracks the currently selected server alias before refresh and restores the selection to that same server afterward.Notes
metadata_manager.go(for clearing the last tag) was already present in the codebase — no changes needed there.Closes #(issue if applicable)