detached 36a2a06

fix(browser): correct printf format specifiers for WebView.ID()

WebView.ID() returns uint64, not string. Changed all log.Printf format
specifiers from %s to %d to fix compilation errors.

Affected files:
- stacked_panes.go: lines 582, 585
- window_shortcuts.go: lines 340, 343
- workspace_manager.go: lines 423, 538
- workspace_navigation.go: line 37
- workspace_utils.go: line 310

This fixes "format %s has arg webView.ID() of wrong type uint64" errors
that were preventing tests from compiling.
commit
36a2a06e781cdfc44735f1957c16c31ecda64c96
author
bamen · · 2025-10-09 16:30 UTC
committer
bamen · · 2025-10-09 18:27 UTC
parent
9f75a78
signature
unsigned
5 files · +8 -8
M internal/app/browser/stacked_panes.go +2 -2
@@ -579,10 +579,10 @@ func (spm *StackedPaneManager) UpdateTitleBar(webView *webkit.WebView, title str
579579 if paneIndex != -1 && paneIndex != activeIndex {
580580 // This is an INACTIVE pane - safe to update title bar
581581 spm.updateTitleBarLabel(node, title)
582- log.Printf("[workspace] updated title bar for INACTIVE WebView %s: %s", webView.ID(), title)
582+ log.Printf("[workspace] updated title bar for INACTIVE WebView %d: %s", webView.ID(), title)
583583 } else {
584584 // This is the ACTIVE pane - title bar should remain hidden
585- log.Printf("[workspace] skipped title bar update for ACTIVE WebView %s: %s", webView.ID(), title)
585+ log.Printf("[workspace] skipped title bar update for ACTIVE WebView %d: %s", webView.ID(), title)
586586 }
587587 }
588588 }
@@ -579,10 +579,10 @@ func (spm *StackedPaneManager) UpdateTitleBar(webView *webkit.WebView, title str
579 if paneIndex != -1 && paneIndex != activeIndex {579 if paneIndex != -1 && paneIndex != activeIndex {
580 // This is an INACTIVE pane - safe to update title bar580 // This is an INACTIVE pane - safe to update title bar
581 spm.updateTitleBarLabel(node, title)581 spm.updateTitleBarLabel(node, title)
582- log.Printf("[workspace] updated title bar for INACTIVE WebView %s: %s", webView.ID(), title)582+ log.Printf("[workspace] updated title bar for INACTIVE WebView %d: %s", webView.ID(), title)
583 } else {583 } else {
584 // This is the ACTIVE pane - title bar should remain hidden584 // This is the ACTIVE pane - title bar should remain hidden
585- log.Printf("[workspace] skipped title bar update for ACTIVE WebView %s: %s", webView.ID(), title)585+ log.Printf("[workspace] skipped title bar update for ACTIVE WebView %d: %s", webView.ID(), title)
586 }586 }
587 }587 }
588 }588 }
M internal/app/browser/window_shortcuts.go +2 -2
@@ -337,10 +337,10 @@ func (h *WindowShortcutHandler) handleClosePane() {
337337 for webView := range h.app.workspace.viewToNode {
338338 if webView != nil {
339339 isActive := webView.IsActive()
340- log.Printf("[window-shortcuts] WebView %s: IsActive=%t", webView.ID(), isActive)
340+ log.Printf("[window-shortcuts] WebView %d: IsActive=%t", webView.ID(), isActive)
341341 if isActive {
342342 activeWebView = webView
343- log.Printf("[window-shortcuts] Found active WebView: %s", webView.ID())
343+ log.Printf("[window-shortcuts] Found active WebView: %d", webView.ID())
344344 break
345345 }
346346 }
@@ -337,10 +337,10 @@ func (h *WindowShortcutHandler) handleClosePane() {
337 for webView := range h.app.workspace.viewToNode {337 for webView := range h.app.workspace.viewToNode {
338 if webView != nil {338 if webView != nil {
339 isActive := webView.IsActive()339 isActive := webView.IsActive()
340- log.Printf("[window-shortcuts] WebView %s: IsActive=%t", webView.ID(), isActive)340+ log.Printf("[window-shortcuts] WebView %d: IsActive=%t", webView.ID(), isActive)
341 if isActive {341 if isActive {
342 activeWebView = webView342 activeWebView = webView
343- log.Printf("[window-shortcuts] Found active WebView: %s", webView.ID())343+ log.Printf("[window-shortcuts] Found active WebView: %d", webView.ID())
344 break344 break
345 }345 }
346 }346 }
M internal/app/browser/workspace_manager.go +2 -2
@@ -420,7 +420,7 @@ func (wm *WorkspaceManager) OnWorkspaceMessage(source *webkit.WebView, msg messa
420420 cleanupScript := fmt.Sprintf(`
421421 try {
422422 // Clean up popup_mapping_<parentId> (from Go code)
423- localStorage.removeItem('popup_mapping_%s');
423+ localStorage.removeItem('popup_mapping_%d');
424424
425425 // Clean up popup_<requestId>_* entries (from JavaScript)
426426 const requestId = '%s';
@@ -535,5 +535,5 @@ func (wm *WorkspaceManager) RegisterNavigationHandler(webView *webkit.WebView) {
535535 return
536536 }
537537
538- log.Printf("[workspace] Registered navigation handler for webview: %s", webView.ID())
538+ log.Printf("[workspace] Registered navigation handler for webview: %d", webView.ID())
539539 }
@@ -420,7 +420,7 @@ func (wm *WorkspaceManager) OnWorkspaceMessage(source *webkit.WebView, msg messa
420 cleanupScript := fmt.Sprintf(`420 cleanupScript := fmt.Sprintf(`
421 try {421 try {
422 // Clean up popup_mapping_<parentId> (from Go code)422 // Clean up popup_mapping_<parentId> (from Go code)
423- localStorage.removeItem('popup_mapping_%s');423+ localStorage.removeItem('popup_mapping_%d');
424 424
425 // Clean up popup_<requestId>_* entries (from JavaScript)425 // Clean up popup_<requestId>_* entries (from JavaScript)
426 const requestId = '%s';426 const requestId = '%s';
@@ -535,5 +535,5 @@ func (wm *WorkspaceManager) RegisterNavigationHandler(webView *webkit.WebView) {
535 return535 return
536 }536 }
537 537
538- log.Printf("[workspace] Registered navigation handler for webview: %s", webView.ID())538+ log.Printf("[workspace] Registered navigation handler for webview: %d", webView.ID())
539 }539 }
M internal/app/browser/workspace_navigation.go +1 -1
@@ -34,7 +34,7 @@ func (wm *WorkspaceManager) DispatchPaneFocusEvent(node *paneNode, active bool)
3434 if err := node.pane.webView.DispatchCustomEvent("dumber:workspace-focus", detail); err != nil {
3535 log.Printf("[workspace] failed to dispatch focus event: %v", err)
3636 } else if wm.app.config != nil && wm.app.config.Debug.EnableWorkspaceDebug {
37- log.Printf("[workspace] dispatched focus event for webview %s (active=%v)", node.pane.webView.ID(), active)
37+ log.Printf("[workspace] dispatched focus event for webview %d (active=%v)", node.pane.webView.ID(), active)
3838 }
3939 }
4040
@@ -34,7 +34,7 @@ func (wm *WorkspaceManager) DispatchPaneFocusEvent(node *paneNode, active bool)
34 if err := node.pane.webView.DispatchCustomEvent("dumber:workspace-focus", detail); err != nil {34 if err := node.pane.webView.DispatchCustomEvent("dumber:workspace-focus", detail); err != nil {
35 log.Printf("[workspace] failed to dispatch focus event: %v", err)35 log.Printf("[workspace] failed to dispatch focus event: %v", err)
36 } else if wm.app.config != nil && wm.app.config.Debug.EnableWorkspaceDebug {36 } else if wm.app.config != nil && wm.app.config.Debug.EnableWorkspaceDebug {
37- log.Printf("[workspace] dispatched focus event for webview %s (active=%v)", node.pane.webView.ID(), active)37+ log.Printf("[workspace] dispatched focus event for webview %d (active=%v)", node.pane.webView.ID(), active)
38 }38 }
39 }39 }
40 40
M internal/app/browser/workspace_utils.go +1 -1
@@ -307,7 +307,7 @@ func formatPaneInfo(node *paneNode) string {
307307 if node.isLeaf {
308308 info = fmt.Sprintf("leaf(container=%p", node.container)
309309 if node.pane != nil && node.pane.webView != nil {
310- info += fmt.Sprintf(" webview=%s", node.pane.webView.ID())
310+ info += fmt.Sprintf(" webview=%d", node.pane.webView.ID())
311311 }
312312 if node.windowType == webkit.WindowTypePopup {
313313 info += " popup"
@@ -307,7 +307,7 @@ func formatPaneInfo(node *paneNode) string {
307 if node.isLeaf {307 if node.isLeaf {
308 info = fmt.Sprintf("leaf(container=%p", node.container)308 info = fmt.Sprintf("leaf(container=%p", node.container)
309 if node.pane != nil && node.pane.webView != nil {309 if node.pane != nil && node.pane.webView != nil {
310- info += fmt.Sprintf(" webview=%s", node.pane.webView.ID())310+ info += fmt.Sprintf(" webview=%d", node.pane.webView.ID())
311 }311 }
312 if node.windowType == webkit.WindowTypePopup {312 if node.windowType == webkit.WindowTypePopup {
313 info += " popup"313 info += " popup"

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