detached f60e492

test: initialize terminal in fuzzy skill setting test

commit
f60e492e551892e737d24a7eaf7730f1f60b75af
author
patriceckhart · · 2026-09-10 06:18 UTC
parent
71725d9
signature
unsigned
refs
tag: v0.3.72
1 file · +4 -2
M packages/agent/modes/fuzzy_skill_suggest_test.go +4 -2
@@ -114,14 +114,16 @@ func (s *fuzzySkillSettingsStore) SetFuzzySkillSuggest(value bool) error {
114114 }
115115
116116 func TestFuzzySkillSetting(t *testing.T) {
117+ // Exercise the normal repaint path, independent of the developer's terminal.
118+ t.Setenv("TERM_PROGRAM", "")
117119 for _, enabled := range []bool{false, true} {
118- i := NewInteractive(InteractiveConfig{FuzzySkillSuggest: &enabled})
120+ i := NewInteractive(InteractiveConfig{Terminal: &cleanupTestTerminal{}, FuzzySkillSuggest: &enabled})
119121 if i.suggest.fuzzySkills != enabled {
120122 t.Fatal("startup preference ignored")
121123 }
122124 }
123125 store := &fuzzySkillSettingsStore{}
124- i := NewInteractive(InteractiveConfig{SettingsStore: store})
126+ i := NewInteractive(InteractiveConfig{Terminal: &cleanupTestTerminal{}, SettingsStore: store})
125127 if i.suggest.fuzzySkills {
126128 t.Fatal("default must be off")
127129 }
@@ -114,14 +114,16 @@ func (s *fuzzySkillSettingsStore) SetFuzzySkillSuggest(value bool) error {
114 }114 }
115 115
116 func TestFuzzySkillSetting(t *testing.T) {116 func TestFuzzySkillSetting(t *testing.T) {
117+ // Exercise the normal repaint path, independent of the developer's terminal.
118+ t.Setenv("TERM_PROGRAM", "")
117 for _, enabled := range []bool{false, true} {119 for _, enabled := range []bool{false, true} {
118- i := NewInteractive(InteractiveConfig{FuzzySkillSuggest: &enabled})120+ i := NewInteractive(InteractiveConfig{Terminal: &cleanupTestTerminal{}, FuzzySkillSuggest: &enabled})
119 if i.suggest.fuzzySkills != enabled {121 if i.suggest.fuzzySkills != enabled {
120 t.Fatal("startup preference ignored")122 t.Fatal("startup preference ignored")
121 }123 }
122 }124 }
123 store := &fuzzySkillSettingsStore{}125 store := &fuzzySkillSettingsStore{}
124- i := NewInteractive(InteractiveConfig{SettingsStore: store})126+ i := NewInteractive(InteractiveConfig{Terminal: &cleanupTestTerminal{}, SettingsStore: store})
125 if i.suggest.fuzzySkills {127 if i.suggest.fuzzySkills {
126 t.Fatal("default must be off")128 t.Fatal("default must be off")
127 }129 }

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 477

↑↓ moveenter openesc close