detached 386dfa2

find: add Ctrl/Cmd+F find-in-page using omnibox component; native accelerator + JS capture; yellow highlights and match list; update changelog

commit
386dfa2e3066320b3d578b01615c1ee84341efa7
author
bamen · · 2025-09-09 18:52 UTC
committer
bamen · · 2025-09-09 21:09 UTC
parent
35b90d4
signature
unsigned
4 files · +13 -0
M .gitignore +2 -0
@@ -56,6 +56,8 @@ config.local.*
5656
5757 # Build artifacts and caches
5858 .cache/
59+.gocache/
60+.gomod/
5961 *.prof
6062 tmp/go-cache/
6163 tmp/go-mod/
@@ -56,6 +56,8 @@ config.local.*
56 56
57 # Build artifacts and caches57 # Build artifacts and caches
58 .cache/58 .cache/
59+.gocache/
60+.gomod/
59 *.prof61 *.prof
60 tmp/go-cache/62 tmp/go-cache/
61 tmp/go-mod/63 tmp/go-mod/
M CHANGELOG.md +4 -0
@@ -12,6 +12,10 @@ All notable changes to this project will be documented in this file.
1212 - `DUMBER_MEMORY_CONSERVATIVE`, `DUMBER_MEMORY_STRICT`, `DUMBER_MEMORY_KILL`
1313 - `DUMBER_GC_INTERVAL`, `DUMBER_RECYCLE_THRESHOLD`
1414 - Version‑guarded CGO wrappers for memory pressure and GC hooks; safe no‑ops on unsupported WebKitGTK builds.
15+ - Find in page (Ctrl/Cmd+F):
16+ - Reuses omnibox as a reusable component with a dedicated "find" mode.
17+ - Highlights matches in yellow and lists match contexts; Enter/Shift+Enter jumps.
18+ - Native accelerator registered; JS capture fallback ensures reliability.
1519
1620 ### Changed
1721 - Performance‑first defaults retained:
@@ -12,6 +12,10 @@ All notable changes to this project will be documented in this file.
12 - `DUMBER_MEMORY_CONSERVATIVE`, `DUMBER_MEMORY_STRICT`, `DUMBER_MEMORY_KILL`12 - `DUMBER_MEMORY_CONSERVATIVE`, `DUMBER_MEMORY_STRICT`, `DUMBER_MEMORY_KILL`
13 - `DUMBER_GC_INTERVAL`, `DUMBER_RECYCLE_THRESHOLD`13 - `DUMBER_GC_INTERVAL`, `DUMBER_RECYCLE_THRESHOLD`
14 - Version‑guarded CGO wrappers for memory pressure and GC hooks; safe no‑ops on unsupported WebKitGTK builds.14 - Version‑guarded CGO wrappers for memory pressure and GC hooks; safe no‑ops on unsupported WebKitGTK builds.
15+ - Find in page (Ctrl/Cmd+F):
16+ - Reuses omnibox as a reusable component with a dedicated "find" mode.
17+ - Highlights matches in yellow and lists match contexts; Enter/Shift+Enter jumps.
18+ - Native accelerator registered; JS capture fallback ensures reliability.
15 19
16 ### Changed20 ### Changed
17 - Performance‑first defaults retained:21 - Performance‑first defaults retained:
M main.go +5 -0
@@ -554,6 +554,11 @@ func runBrowser() {
554554 log.Printf("Shortcut: Omnibox toggle")
555555 _ = view.InjectScript("window.__dumber_toggle && window.__dumber_toggle()")
556556 })
557+ // Find in page (Ctrl/Cmd+F): open find overlay
558+ _ = view.RegisterKeyboardShortcut("cmdorctrl+f", func() {
559+ log.Printf("Shortcut: Find in page")
560+ _ = view.OpenFind("")
561+ })
557562 // Zoom handled natively in webkit package (built-in shortcuts)
558563 }
559564
@@ -554,6 +554,11 @@ func runBrowser() {
554 log.Printf("Shortcut: Omnibox toggle")554 log.Printf("Shortcut: Omnibox toggle")
555 _ = view.InjectScript("window.__dumber_toggle && window.__dumber_toggle()")555 _ = view.InjectScript("window.__dumber_toggle && window.__dumber_toggle()")
556 })556 })
557+ // Find in page (Ctrl/Cmd+F): open find overlay
558+ _ = view.RegisterKeyboardShortcut("cmdorctrl+f", func() {
559+ log.Printf("Shortcut: Find in page")
560+ _ = view.OpenFind("")
561+ })
557 // Zoom handled natively in webkit package (built-in shortcuts)562 // Zoom handled natively in webkit package (built-in shortcuts)
558 }563 }
559 564
M pkg/webkit/webview_cgo.go +2 -0
@@ -554,6 +554,8 @@ func NewWebView(cfg *Config) (*WebView, error) {
554554 _ = v.SetZoom(nz)
555555 })
556556 _ = v.RegisterKeyboardShortcut("cmdorctrl+0", func() { _ = v.SetZoom(1.0) })
557+ // Find in page (Ctrl/Cmd+F) reuses omnibox component in find mode
558+ _ = v.RegisterKeyboardShortcut("cmdorctrl+f", func() { _ = v.OpenFind("") })
557559 // Navigation with Alt+Arrow keys
558560 _ = v.RegisterKeyboardShortcut("alt+ArrowLeft", func() { _ = v.GoBack() })
559561 _ = v.RegisterKeyboardShortcut("alt+ArrowRight", func() { _ = v.GoForward() })
@@ -554,6 +554,8 @@ func NewWebView(cfg *Config) (*WebView, error) {
554 _ = v.SetZoom(nz)554 _ = v.SetZoom(nz)
555 })555 })
556 _ = v.RegisterKeyboardShortcut("cmdorctrl+0", func() { _ = v.SetZoom(1.0) })556 _ = v.RegisterKeyboardShortcut("cmdorctrl+0", func() { _ = v.SetZoom(1.0) })
557+ // Find in page (Ctrl/Cmd+F) reuses omnibox component in find mode
558+ _ = v.RegisterKeyboardShortcut("cmdorctrl+f", func() { _ = v.OpenFind("") })
557 // Navigation with Alt+Arrow keys559 // Navigation with Alt+Arrow keys
558 _ = v.RegisterKeyboardShortcut("alt+ArrowLeft", func() { _ = v.GoBack() })560 _ = v.RegisterKeyboardShortcut("alt+ArrowLeft", func() { _ = v.GoBack() })
559 _ = v.RegisterKeyboardShortcut("alt+ArrowRight", func() { _ = v.GoForward() })561 _ = v.RegisterKeyboardShortcut("alt+ArrowRight", func() { _ = v.GoForward() })

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