detached 940a0b9

fix(cef): correct systemviews asset paths

commit
940a0b9c9458f8d8e478cd42b41582d5fa753c63
author
brice · · 2026-04-11 18:43 UTC
committer
brice · · 2026-04-12 04:52 UTC
parent
4a71c89
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +9 -9
M internal/infrastructure/cef/scheme_handler.go +4 -5
@@ -33,16 +33,15 @@ const (
3333 webrtcPath = "webrtc"
3434 errorPath = "error"
3535 indexHTML = "index.html"
36- systemviewsIndexHTML = "systemviews/index.html"
3736 maxSchemeTruncatedURLLength = 240
3837 )
3938
4039 // pageRootFiles maps internal page hosts/paths to their HTML entry points.
4140 var pageRootFiles = map[string]string{
4241 homePath: indexHTML,
43- historyPath: systemviewsIndexHTML,
44- favoritesPath: systemviewsIndexHTML,
45- configPath: systemviewsIndexHTML,
42+ historyPath: indexHTML,
43+ favoritesPath: indexHTML,
44+ configPath: indexHTML,
4645 webrtcPath: "webrtc.html",
4746 errorPath: "error.html",
4847 }
@@ -382,7 +381,7 @@ func resolveActualAssetPath(u *url.URL) (assetDir, relPath string, ok bool) {
382381 if page == homePath && parts[1] == "crash" {
383382 return "", "", false
384383 }
385- return assetDirForPageHost(page), path, true
384+ return assetDirForPageHost(page), parts[1], true
386385 }
387386
388387 if strings.HasPrefix(path, "api/") {
@@ -33,16 +33,15 @@ const (
33 webrtcPath = "webrtc"33 webrtcPath = "webrtc"
34 errorPath = "error"34 errorPath = "error"
35 indexHTML = "index.html"35 indexHTML = "index.html"
36- systemviewsIndexHTML = "systemviews/index.html"
37 maxSchemeTruncatedURLLength = 24036 maxSchemeTruncatedURLLength = 240
38 )37 )
39 38
40 // pageRootFiles maps internal page hosts/paths to their HTML entry points.39 // pageRootFiles maps internal page hosts/paths to their HTML entry points.
41 var pageRootFiles = map[string]string{40 var pageRootFiles = map[string]string{
42 homePath: indexHTML,41 homePath: indexHTML,
43- historyPath: systemviewsIndexHTML,42+ historyPath: indexHTML,
44- favoritesPath: systemviewsIndexHTML,43+ favoritesPath: indexHTML,
45- configPath: systemviewsIndexHTML,44+ configPath: indexHTML,
46 webrtcPath: "webrtc.html",45 webrtcPath: "webrtc.html",
47 errorPath: "error.html",46 errorPath: "error.html",
48 }47 }
@@ -382,7 +381,7 @@ func resolveActualAssetPath(u *url.URL) (assetDir, relPath string, ok bool) {
382 if page == homePath && parts[1] == "crash" {381 if page == homePath && parts[1] == "crash" {
383 return "", "", false382 return "", "", false
384 }383 }
385- return assetDirForPageHost(page), path, true384+ return assetDirForPageHost(page), parts[1], true
386 }385 }
387 386
388 if strings.HasPrefix(path, "api/") {387 if strings.HasPrefix(path, "api/") {
M internal/infrastructure/cef/scheme_handler_systemviews_test.go +5 -4
@@ -14,10 +14,11 @@ func TestResolveAssetPath_SystemviewsRootsUseSystemviewsShell(t *testing.T) {
1414 wantDir string
1515 wantRel string
1616 }{
17- {name: "history host", raw: "https://dumber.invalid/history", wantDir: "systemviews", wantRel: systemviewsIndexHTML},
18- {name: "favorites host", raw: "https://dumber.invalid/favorites", wantDir: "systemviews", wantRel: systemviewsIndexHTML},
19- {name: "config host", raw: "https://dumber.invalid/config", wantDir: "systemviews", wantRel: systemviewsIndexHTML},
20- {name: "history opaque", raw: "dumb:history", wantDir: "systemviews", wantRel: systemviewsIndexHTML},
17+ {name: "history host", raw: "https://dumber.invalid/history", wantDir: "systemviews", wantRel: indexHTML},
18+ {name: "favorites host", raw: "https://dumber.invalid/favorites", wantDir: "systemviews", wantRel: indexHTML},
19+ {name: "config host", raw: "https://dumber.invalid/config", wantDir: "systemviews", wantRel: indexHTML},
20+ {name: "history opaque", raw: "dumb:history", wantDir: "systemviews", wantRel: indexHTML},
21+ {name: "history sub-asset", raw: "https://dumber.invalid/history/wasm_exec.js", wantDir: "systemviews", wantRel: "wasm_exec.js"},
2122 }
2223
2324 for _, tt := range tests {
@@ -14,10 +14,11 @@ func TestResolveAssetPath_SystemviewsRootsUseSystemviewsShell(t *testing.T) {
14 wantDir string14 wantDir string
15 wantRel string15 wantRel string
16 }{16 }{
17- {name: "history host", raw: "https://dumber.invalid/history", wantDir: "systemviews", wantRel: systemviewsIndexHTML},17+ {name: "history host", raw: "https://dumber.invalid/history", wantDir: "systemviews", wantRel: indexHTML},
18- {name: "favorites host", raw: "https://dumber.invalid/favorites", wantDir: "systemviews", wantRel: systemviewsIndexHTML},18+ {name: "favorites host", raw: "https://dumber.invalid/favorites", wantDir: "systemviews", wantRel: indexHTML},
19- {name: "config host", raw: "https://dumber.invalid/config", wantDir: "systemviews", wantRel: systemviewsIndexHTML},19+ {name: "config host", raw: "https://dumber.invalid/config", wantDir: "systemviews", wantRel: indexHTML},
20- {name: "history opaque", raw: "dumb:history", wantDir: "systemviews", wantRel: systemviewsIndexHTML},20+ {name: "history opaque", raw: "dumb:history", wantDir: "systemviews", wantRel: indexHTML},
21+ {name: "history sub-asset", raw: "https://dumber.invalid/history/wasm_exec.js", wantDir: "systemviews", wantRel: "wasm_exec.js"},
21 }22 }
22 23
23 for _, tt := range tests {24 for _, tt := range tests {

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