detached 3a62712

chore: address follow-up review comments

commit
3a6271253c8506772b46f35e751725ee720c9f45
author
brice · · 2026-04-28 04:43 UTC
parent
1c13f3e
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +5 -4
M README.md +3 -2
@@ -85,14 +85,15 @@ To use it on Arch:
8585 sudo pacman -S cef
8686 ```
8787
88-Dumber discovers CEF in the following order: `CEF_DIR` environment variable, `/usr/lib/cef`, or `~/.local/share/cef`. Override via:
88+CEF runtime precedence is deterministic: `CEF_DIR` wins first, then `engine.cef.cef_dir`, then `/usr/lib/cef`, then `~/.local/share/cef`.
89+Set `engine.cef.cef_dir` in config when `CEF_DIR` is unset:
8990
9091 ```toml
9192 [engine.cef]
9293 cef_dir = "/custom/path"
9394 ```
9495
95-Or set the `CEF_DIR` environment variable:
96+Or set the higher-precedence `CEF_DIR` environment variable:
9697
9798 ```bash
9899 CEF_DIR=/custom/path dumber browse
@@ -85,14 +85,15 @@ To use it on Arch:
85 sudo pacman -S cef85 sudo pacman -S cef
86 ```86 ```
87 87
88-Dumber discovers CEF in the following order: `CEF_DIR` environment variable, `/usr/lib/cef`, or `~/.local/share/cef`. Override via:88+CEF runtime precedence is deterministic: `CEF_DIR` wins first, then `engine.cef.cef_dir`, then `/usr/lib/cef`, then `~/.local/share/cef`.
89+Set `engine.cef.cef_dir` in config when `CEF_DIR` is unset:
89 90
90 ```toml91 ```toml
91 [engine.cef]92 [engine.cef]
92 cef_dir = "/custom/path"93 cef_dir = "/custom/path"
93 ```94 ```
94 95
95-Or set the `CEF_DIR` environment variable:96+Or set the higher-precedence `CEF_DIR` environment variable:
96 97
97 ```bash98 ```bash
98 CEF_DIR=/custom/path dumber browse99 CEF_DIR=/custom/path dumber browse
M internal/infrastructure/cef/scheme_handler_test.go +2 -2
@@ -173,7 +173,7 @@ func TestHandleMessageAPIRequiresTrustedOriginOrReferrer(t *testing.T) {
173173 cefNewResourceHandler = func(impl purecef.ResourceHandler) purecef.ResourceHandler { return impl }
174174 defer func() { cefNewResourceHandler = oldNewResourceHandler }()
175175
176- h, err := newDumbSchemeHandler(context.Background(), NewMessageRouter(context.Background()), func() ([]byte, error) { return []byte(`{}`), nil }, func() ([]byte, error) { return []byte(`{}`), nil })
176+ h, err := newDumbSchemeHandler(context.Background(), NewMessageRouter(context.Background()), noopConfigPayload(), noopConfigPayload())
177177 require.NoError(t, err)
178178
179179 trusted := cefmocks.NewMockRequest(t)
@@ -205,7 +205,7 @@ func TestHandleConfigAPIUsesPrivateNoCORSHeaders(t *testing.T) {
205205 cefNewResourceHandler = func(impl purecef.ResourceHandler) purecef.ResourceHandler { return impl }
206206 defer func() { cefNewResourceHandler = oldNewResourceHandler }()
207207
208- h, err := newDumbSchemeHandler(context.Background(), nil, func() ([]byte, error) { return []byte(`{"ok":true}`), nil }, func() ([]byte, error) { return []byte(`{}`), nil })
208+ h, err := newDumbSchemeHandler(context.Background(), nil, func() ([]byte, error) { return []byte(`{"ok":true}`), nil }, noopConfigPayload())
209209 require.NoError(t, err)
210210
211211 response := cefmocks.NewMockResponse(t)
@@ -173,7 +173,7 @@ func TestHandleMessageAPIRequiresTrustedOriginOrReferrer(t *testing.T) {
173 cefNewResourceHandler = func(impl purecef.ResourceHandler) purecef.ResourceHandler { return impl }173 cefNewResourceHandler = func(impl purecef.ResourceHandler) purecef.ResourceHandler { return impl }
174 defer func() { cefNewResourceHandler = oldNewResourceHandler }()174 defer func() { cefNewResourceHandler = oldNewResourceHandler }()
175 175
176- h, err := newDumbSchemeHandler(context.Background(), NewMessageRouter(context.Background()), func() ([]byte, error) { return []byte(`{}`), nil }, func() ([]byte, error) { return []byte(`{}`), nil })176+ h, err := newDumbSchemeHandler(context.Background(), NewMessageRouter(context.Background()), noopConfigPayload(), noopConfigPayload())
177 require.NoError(t, err)177 require.NoError(t, err)
178 178
179 trusted := cefmocks.NewMockRequest(t)179 trusted := cefmocks.NewMockRequest(t)
@@ -205,7 +205,7 @@ func TestHandleConfigAPIUsesPrivateNoCORSHeaders(t *testing.T) {
205 cefNewResourceHandler = func(impl purecef.ResourceHandler) purecef.ResourceHandler { return impl }205 cefNewResourceHandler = func(impl purecef.ResourceHandler) purecef.ResourceHandler { return impl }
206 defer func() { cefNewResourceHandler = oldNewResourceHandler }()206 defer func() { cefNewResourceHandler = oldNewResourceHandler }()
207 207
208- h, err := newDumbSchemeHandler(context.Background(), nil, func() ([]byte, error) { return []byte(`{"ok":true}`), nil }, func() ([]byte, error) { return []byte(`{}`), nil })208+ h, err := newDumbSchemeHandler(context.Background(), nil, func() ([]byte, error) { return []byte(`{"ok":true}`), nil }, noopConfigPayload())
209 require.NoError(t, err)209 require.NoError(t, err)
210 210
211 response := cefmocks.NewMockResponse(t)211 response := cefmocks.NewMockResponse(t)

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