detached 59edcdf

improve(webkit): enhance logging for GUI stylesheet

commit
59edcdf267d3e38f36a49f1d28e5483340fb0689
author
bamen · · 2025-09-16 16:53 UTC
committer
bamen · · 2025-09-16 17:14 UTC
parent
933a721
signature
unsigned
1 file · +5 -2
M pkg/webkit/webview_cgo.go +5 -2
@@ -1557,7 +1557,8 @@ func (w *WebView) enableUserContentManager(cfg *Config) {
15571557 log.Printf("[webkit] ERROR: Failed to load GUI bundle from assets: %v", err)
15581558 }
15591559
1560- // Add GUI CSS styles as user stylesheet using WebKit native API
1560+ // Add GUI CSS styles as user stylesheet when a legacy bundle is present.
1561+ // Modern builds inline Tailwind output inside gui.min.js, so this file is optional.
15611562 if cssBytes, err := cfg.Assets.ReadFile("assets/gui/style.css"); err == nil {
15621563 cssContent := string(cssBytes)
15631564 cCss := C.CString(cssContent)
@@ -1576,8 +1577,10 @@ func (w *WebView) enableUserContentManager(cfg *Config) {
15761577 } else {
15771578 log.Printf("[webkit] ERROR: Failed to create GUI stylesheet")
15781579 }
1580+ } else if errors.Is(err, os.ErrNotExist) {
1581+ log.Printf("[webkit] GUI stylesheet not found; assuming inline Tailwind bundle and skipping separate injection")
15791582 } else {
1580- log.Printf("[webkit] ERROR: Failed to load GUI CSS from assets: %v", err)
1583+ log.Printf("[webkit] Warning: Failed to load GUI CSS from assets, skipping separate stylesheet injection: %v", err)
15811584 }
15821585 }
15831586
@@ -1557,7 +1557,8 @@ func (w *WebView) enableUserContentManager(cfg *Config) {
1557 log.Printf("[webkit] ERROR: Failed to load GUI bundle from assets: %v", err)1557 log.Printf("[webkit] ERROR: Failed to load GUI bundle from assets: %v", err)
1558 }1558 }
1559 1559
1560- // Add GUI CSS styles as user stylesheet using WebKit native API1560+ // Add GUI CSS styles as user stylesheet when a legacy bundle is present.
1561+ // Modern builds inline Tailwind output inside gui.min.js, so this file is optional.
1561 if cssBytes, err := cfg.Assets.ReadFile("assets/gui/style.css"); err == nil {1562 if cssBytes, err := cfg.Assets.ReadFile("assets/gui/style.css"); err == nil {
1562 cssContent := string(cssBytes)1563 cssContent := string(cssBytes)
1563 cCss := C.CString(cssContent)1564 cCss := C.CString(cssContent)
@@ -1576,8 +1577,10 @@ func (w *WebView) enableUserContentManager(cfg *Config) {
1576 } else {1577 } else {
1577 log.Printf("[webkit] ERROR: Failed to create GUI stylesheet")1578 log.Printf("[webkit] ERROR: Failed to create GUI stylesheet")
1578 }1579 }
1580+ } else if errors.Is(err, os.ErrNotExist) {
1581+ log.Printf("[webkit] GUI stylesheet not found; assuming inline Tailwind bundle and skipping separate injection")
1579 } else {1582 } else {
1580- log.Printf("[webkit] ERROR: Failed to load GUI CSS from assets: %v", err)1583+ log.Printf("[webkit] Warning: Failed to load GUI CSS from assets, skipping separate stylesheet injection: %v", err)
1581 }1584 }
1582 }1585 }
1583 1586

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