From d02d103569c3e91df3cc247e458d52d6c5da2964 Mon Sep 17 00:00:00 2001 From: Jaap-Jan de Wit | DodoTech Date: Tue, 4 Aug 2026 16:39:14 +0200 Subject: [PATCH] Take the group's EDIT and DELETE off the heading row MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A pair of buttons sat at the end of the GROUPS heading, and the card's own right-click menu arrived later offering the same two things. Two controls for one job, and the buttons were the harder of the two to read: a button beside a heading has no card under a pointer to mean, so it had to work its subject out — the selected card, or failing that the group the trail ends with, which once a group is open is not a card on screen at all. The menu never has that problem, because opening it is what aims it. The menu is the whole of Edit and Delete on the desktop now. ShowsGroupActions went with the buttons, since hiding them was all it did. GroupTarget stays: the menu's two entries read it after the code-behind has selected whatever was right-clicked, and its fallback to the open group is what makes + NEW HOST open on the group somebody is standing in rather than on none. One case changes shape. Opening a group with nothing inside it folds the card grid away, so from in there nothing can be right-clicked — renaming that group means pressing the trail back one level, to where it has a card of its own. The buttons used to cover it through the fallback. The trail was already the way out of an empty group, and 3.2a says so now. The test that pressed EDIT through its binding is replaced by one holding that no button on the screen commands either of them, which is the failure worth catching: a button coming back is not a compile error, and it would draw itself in place, aimed at the group the trail ends with. What that test covered — a command that has to accept an empty parameter, and act on the card the pointer was on — the two menu tests beside it already do. --- docs/manual-checks.md | 16 ++++--- .../Views/HostsScreen.axaml | 41 ++++++---------- .../Views/HostsScreen.axaml.cs | 4 +- .../ViewModels/VaultViewModel.cs | 39 +++++++-------- .../HostGridTests.cs | 48 ++++++++----------- 5 files changed, 63 insertions(+), 85 deletions(-) diff --git a/docs/manual-checks.md b/docs/manual-checks.md index 460c146..90d8ef1 100644 --- a/docs/manual-checks.md +++ b/docs/manual-checks.md @@ -324,7 +324,8 @@ phone's, whose list has no room for a row of group cards and draws the whole tre host filed, the grid says so in a sentence rather than sitting empty. **Then press a group card once.** It is marked as chosen and **nothing else happens** — the grid is still the -level it was, and EDIT and DELETE now aim at that group. **Then double-press it.** The group opens: its hosts +level it was, and no buttons appear beside the GROUPS heading: editing and deleting a group are on the card's +own right-click menu, which is 7.9. **Then double-press it.** The group opens: its hosts are the grid, the trail above the cards reads `ALL HOSTS › ›`, each card carrying the group's name as an accent chip, and the card grid shows what is *inside* that group rather than every group in the keychain. Pressing ALL HOSTS goes back to the outermost level. @@ -347,9 +348,9 @@ Make two groups and file one under the other with the parent picker in the group **Pass:** only the outer group has a card to start with. Double-press it and the inner one is the only card shown, with the trail reading `ALL HOSTS › ›`. Double-press that, and the cards disappear entirely — -it has nothing inside it — while the trail, EDIT and DELETE stay: with no card selected the two buttons act -on the group the trail ends with, so a group with nothing in it can still be renamed after being opened. -Pressing the **middle** crumb goes back one level rather than all the way out. +it has nothing inside it — while the trail stays. Pressing the **middle** crumb goes back one level rather +than all the way out, which is also how a group with nothing inside it is renamed: back out to the level +where it has a card, and right-click that. **Failure means:** cards for groups that are not at this level is `VisibleGroups` having been bound past — the flat `Groups` is the phone's and the lookups'. A group that cannot be reached at all is worse and is the @@ -370,7 +371,7 @@ takes only the group that is open. ### 3.3 Deleting a group with hosts in it -Select a group with hosts and press DELETE. +Right-click a group with hosts in it and choose **Delete…**. **Pass:** the question names how many hosts are filed under it and says they stay. Agreeing removes the group; the hosts lose their chip and are otherwise unchanged. @@ -802,8 +803,9 @@ Delete. card, rather than back out to ALL HOSTS. Right-clicking the space around the group cards opens no menu. **Failure means:** the menu is reading `GroupTarget`'s fallback, which is the group whose contents are on -screen. That fallback is right for the EDIT and DELETE buttons beside the heading and wrong for a menu that -opened on a card. +screen rather than the card the pointer is on. This menu is the only way to edit or delete a group on the +desktop — there are no buttons beside the GROUPS heading any more — so a menu aimed wrongly is the whole of +the mistake. ### 7.10 Clicking a host in the palette connects diff --git a/src/DodoSSH.Client.App/Views/HostsScreen.axaml b/src/DodoSSH.Client.App/Views/HostsScreen.axaml index 7a3cc5d..e55b92e 100644 --- a/src/DodoSSH.Client.App/Views/HostsScreen.axaml +++ b/src/DodoSSH.Client.App/Views/HostsScreen.axaml @@ -226,25 +226,14 @@ - - - - - -