detached 82dcb2d

feat(webkit): implement DevToolsOpener and Printer on WebView

Add OpenDevTools() and PrintPage() wrapper methods on *webkit.WebView
so it satisfies the port.DevToolsOpener and port.Printer interfaces.
Add compile-time checks alongside the existing port.WebView check.
commit
82dcb2db2df363b6139b58da4561580aa070b233
author
brice · · 2026-03-15 16:14 UTC
parent
005fae9
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +13 -1
M internal/infrastructure/webkit/webview.go +13 -1
@@ -24,8 +24,10 @@ import (
2424 "github.com/rs/zerolog"
2525 )
2626
27-// Compile-time interface check: WebView must implement port.WebView.
27+// Compile-time interface checks.
2828 var _ port.WebView = (*WebView)(nil)
29+var _ port.DevToolsOpener = (*WebView)(nil)
30+var _ port.Printer = (*WebView)(nil)
2931
3032 // WebViewID is an alias to port.WebViewID for clean architecture compliance.
3133 // Infrastructure layer uses the type defined in the application port.
@@ -1580,6 +1582,16 @@ func (wv *WebView) Print() error {
15801582 return nil
15811583 }
15821584
1585+// OpenDevTools implements port.DevToolsOpener.
1586+func (wv *WebView) OpenDevTools() {
1587+ _ = wv.ShowDevTools()
1588+}
1589+
1590+// PrintPage implements port.Printer.
1591+func (wv *WebView) PrintPage() {
1592+ _ = wv.Print()
1593+}
1594+
15831595 // IsDestroyed returns true if the WebView has been destroyed.
15841596 func (wv *WebView) IsDestroyed() bool {
15851597 return wv.destroyed.Load()
@@ -24,8 +24,10 @@ import (
24 "github.com/rs/zerolog"24 "github.com/rs/zerolog"
25 )25 )
26 26
27-// Compile-time interface check: WebView must implement port.WebView.27+// Compile-time interface checks.
28 var _ port.WebView = (*WebView)(nil)28 var _ port.WebView = (*WebView)(nil)
29+var _ port.DevToolsOpener = (*WebView)(nil)
30+var _ port.Printer = (*WebView)(nil)
29 31
30 // WebViewID is an alias to port.WebViewID for clean architecture compliance.32 // WebViewID is an alias to port.WebViewID for clean architecture compliance.
31 // Infrastructure layer uses the type defined in the application port.33 // Infrastructure layer uses the type defined in the application port.
@@ -1580,6 +1582,16 @@ func (wv *WebView) Print() error {
1580 return nil1582 return nil
1581 }1583 }
1582 1584
1585+// OpenDevTools implements port.DevToolsOpener.
1586+func (wv *WebView) OpenDevTools() {
1587+ _ = wv.ShowDevTools()
1588+}
1589+
1590+// PrintPage implements port.Printer.
1591+func (wv *WebView) PrintPage() {
1592+ _ = wv.Print()
1593+}
1594+
1583 // IsDestroyed returns true if the WebView has been destroyed.1595 // IsDestroyed returns true if the WebView has been destroyed.
1584 func (wv *WebView) IsDestroyed() bool {1596 func (wv *WebView) IsDestroyed() bool {
1585 return wv.destroyed.Load()1597 return wv.destroyed.Load()

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