detached 026a7ae

fix: address Greptile review feedback

- Fix color-picker.svelte: use $state instead of $derived.by() for bindable hex value
- Fix keybindings_gateway.go: add bounds checking for non-global modes in getDefaultKeys
- Fix watcher.go: reorder log and unlock for consistency (not a deadlock but cleaner)
commit
026a7ae9c93e31ea9c7437d7ba6618bcebf0d861
author
brice · · 2026-01-24 16:32 UTC
parent
381a26d
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
3 files · +20 -7
M internal/infrastructure/config/keybindings_gateway.go +12 -4
@@ -229,13 +229,21 @@ func (*KeybindingsGateway) getDefaultKeys(defaults *Config, mode, action string)
229229 return binding.Keys
230230 }
231231 case "pane":
232- return defaults.Workspace.PaneMode.Actions[action].Keys
232+ if binding, ok := defaults.Workspace.PaneMode.Actions[action]; ok {
233+ return binding.Keys
234+ }
233235 case "tab":
234- return defaults.Workspace.TabMode.Actions[action].Keys
236+ if binding, ok := defaults.Workspace.TabMode.Actions[action]; ok {
237+ return binding.Keys
238+ }
235239 case "resize":
236- return defaults.Workspace.ResizeMode.Actions[action].Keys
240+ if binding, ok := defaults.Workspace.ResizeMode.Actions[action]; ok {
241+ return binding.Keys
242+ }
237243 case "session":
238- return defaults.Session.SessionMode.Actions[action].Keys
244+ if binding, ok := defaults.Session.SessionMode.Actions[action]; ok {
245+ return binding.Keys
246+ }
239247 }
240248 return nil
241249 }
@@ -229,13 +229,21 @@ func (*KeybindingsGateway) getDefaultKeys(defaults *Config, mode, action string)
229 return binding.Keys229 return binding.Keys
230 }230 }
231 case "pane":231 case "pane":
232- return defaults.Workspace.PaneMode.Actions[action].Keys232+ if binding, ok := defaults.Workspace.PaneMode.Actions[action]; ok {
233+ return binding.Keys
234+ }
233 case "tab":235 case "tab":
234- return defaults.Workspace.TabMode.Actions[action].Keys236+ if binding, ok := defaults.Workspace.TabMode.Actions[action]; ok {
237+ return binding.Keys
238+ }
235 case "resize":239 case "resize":
236- return defaults.Workspace.ResizeMode.Actions[action].Keys240+ if binding, ok := defaults.Workspace.ResizeMode.Actions[action]; ok {
241+ return binding.Keys
242+ }
237 case "session":243 case "session":
238- return defaults.Session.SessionMode.Actions[action].Keys244+ if binding, ok := defaults.Session.SessionMode.Actions[action]; ok {
245+ return binding.Keys
246+ }
239 }247 }
240 return nil248 return nil
241 }249 }
M internal/infrastructure/config/watcher.go +1 -1
@@ -40,8 +40,8 @@ func (m *Manager) Watch() error {
4040
4141 log.Debug().Msg("reloading config from external change")
4242 if err := m.reload(); err != nil {
43- m.mu.Unlock()
4443 log.Warn().Err(err).Msg("failed to reload config")
44+ m.mu.Unlock()
4545 return
4646 }
4747 m.notifyCallbacksLocked()
@@ -40,8 +40,8 @@ func (m *Manager) Watch() error {
40 40
41 log.Debug().Msg("reloading config from external change")41 log.Debug().Msg("reloading config from external change")
42 if err := m.reload(); err != nil {42 if err := m.reload(); err != nil {
43- m.mu.Unlock()
44 log.Warn().Err(err).Msg("failed to reload config")43 log.Warn().Err(err).Msg("failed to reload config")
44+ m.mu.Unlock()
45 return45 return
46 }46 }
47 m.notifyCallbacksLocked()47 m.notifyCallbacksLocked()
M webui/src/lib/components/ui/color-picker/color-picker.svelte +7 -2
@@ -21,8 +21,13 @@
2121
2222 let open = $state(false);
2323
24- // svelte-awesome-color-picker uses hex binding - use writable derived to sync with value
25- let hex = $derived.by(() => value);
24+ // svelte-awesome-color-picker uses hex binding - use state to sync with value
25+ let hex = $state(value);
26+
27+ // Sync hex when value changes externally
28+ $effect(() => {
29+ hex = value;
30+ });
2631
2732 function handleInput(event: { hex: string | null }) {
2833 if (event.hex) {
@@ -21,8 +21,13 @@
21 21
22 let open = $state(false);22 let open = $state(false);
23 23
24- // svelte-awesome-color-picker uses hex binding - use writable derived to sync with value24+ // svelte-awesome-color-picker uses hex binding - use state to sync with value
25- let hex = $derived.by(() => value);25+ let hex = $state(value);
26+
27+ // Sync hex when value changes externally
28+ $effect(() => {
29+ hex = value;
30+ });
26 31
27 function handleInput(event: { hex: string | null }) {32 function handleInput(event: { hex: string | null }) {
28 if (event.hex) {33 if (event.hex) {

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 8

Tags 42

↑↓ moveenter openesc close