Redesign default tree controls

This commit is contained in:
Storm Dragon
2026-09-05 00:34:40 -04:00
parent db2d441dfc
commit ef19a558d2
7 changed files with 160 additions and 31 deletions
+14
View File
@@ -4,8 +4,22 @@ import (
"testing"
"git.stormux.org/storm/barnard/gumble/gumble"
"git.stormux.org/storm/barnard/uiterm"
)
func TestMatchesVolumeResetKeyAcceptsBothTerminalBackspaces(t *testing.T) {
configured := uiterm.KeyBackspace
if !matchesVolumeResetKey(&configured, uiterm.KeyBackspace) {
t.Fatal("configured backspace did not match itself")
}
if !matchesVolumeResetKey(&configured, uiterm.KeyBackspace2) {
t.Fatal("configured backspace did not match delete/127 representation")
}
if matchesVolumeResetKey(&configured, uiterm.KeyDelete) {
t.Fatal("delete key unexpectedly matched volume reset")
}
}
// Regression: rebuilding the channel tree ranged protocol-owned maps without
// Client.Do while TCP handlers could add or remove users/channels.
func TestTreeItemBuildReadsMapsUnderClientSnapshot(t *testing.T) {