detached 928cfae

docs(webview): fix misleading navigation comments and interface docs

commit
928cfae8dc57abcf31791efed58492db29b9b3a4
author
bnema · · 2026-01-08 17:24 UTC
parent
f105e30
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +4 -4
M internal/application/port/webview.go +2 -2
@@ -143,11 +143,11 @@ type WebView interface {
143143 Stop(ctx context.Context) error
144144
145145 // GoBack navigates back in history.
146- // Returns error if back navigation is not possible.
146+ // Uses WebKit native navigation if available, falls back to JavaScript history.back() for SPA compatibility.
147147 GoBack(ctx context.Context) error
148148
149149 // GoForward navigates forward in history.
150- // Returns error if forward navigation is not possible.
150+ // Uses WebKit native navigation if available, falls back to JavaScript history.forward() for SPA compatibility.
151151 GoForward(ctx context.Context) error
152152
153153 // --- State Queries ---
@@ -143,11 +143,11 @@ type WebView interface {
143 Stop(ctx context.Context) error143 Stop(ctx context.Context) error
144 144
145 // GoBack navigates back in history.145 // GoBack navigates back in history.
146- // Returns error if back navigation is not possible.146+ // Uses WebKit native navigation if available, falls back to JavaScript history.back() for SPA compatibility.
147 GoBack(ctx context.Context) error147 GoBack(ctx context.Context) error
148 148
149 // GoForward navigates forward in history.149 // GoForward navigates forward in history.
150- // Returns error if forward navigation is not possible.150+ // Uses WebKit native navigation if available, falls back to JavaScript history.forward() for SPA compatibility.
151 GoForward(ctx context.Context) error151 GoForward(ctx context.Context) error
152 152
153 // --- State Queries ---153 // --- State Queries ---
M internal/infrastructure/webkit/webview.go +2 -2
@@ -761,7 +761,7 @@ func (wv *WebView) Stop(ctx context.Context) error {
761761 }
762762
763763 // GoBack navigates back in history.
764-// Uses JavaScript history.back() first for SPA compatibility, falls back to WebKit native.
764+// Uses WebKit native navigation first, falls back to JavaScript history.back() for SPA compatibility.
765765 func (wv *WebView) GoBack(ctx context.Context) error {
766766 if wv.destroyed.Load() {
767767 return fmt.Errorf("webview %d is destroyed", wv.id)
@@ -783,7 +783,7 @@ func (wv *WebView) GoBack(ctx context.Context) error {
783783 }
784784
785785 // GoForward navigates forward in history.
786-// Uses JavaScript history.forward() first for SPA compatibility, falls back to WebKit native.
786+// Uses WebKit native navigation first, falls back to JavaScript history.forward() for SPA compatibility.
787787 func (wv *WebView) GoForward(ctx context.Context) error {
788788 if wv.destroyed.Load() {
789789 return fmt.Errorf("webview %d is destroyed", wv.id)
@@ -761,7 +761,7 @@ func (wv *WebView) Stop(ctx context.Context) error {
761 }761 }
762 762
763 // GoBack navigates back in history.763 // GoBack navigates back in history.
764-// Uses JavaScript history.back() first for SPA compatibility, falls back to WebKit native.764+// Uses WebKit native navigation first, falls back to JavaScript history.back() for SPA compatibility.
765 func (wv *WebView) GoBack(ctx context.Context) error {765 func (wv *WebView) GoBack(ctx context.Context) error {
766 if wv.destroyed.Load() {766 if wv.destroyed.Load() {
767 return fmt.Errorf("webview %d is destroyed", wv.id)767 return fmt.Errorf("webview %d is destroyed", wv.id)
@@ -783,7 +783,7 @@ func (wv *WebView) GoBack(ctx context.Context) error {
783 }783 }
784 784
785 // GoForward navigates forward in history.785 // GoForward navigates forward in history.
786-// Uses JavaScript history.forward() first for SPA compatibility, falls back to WebKit native.786+// Uses WebKit native navigation first, falls back to JavaScript history.forward() for SPA compatibility.
787 func (wv *WebView) GoForward(ctx context.Context) error {787 func (wv *WebView) GoForward(ctx context.Context) error {
788 if wv.destroyed.Load() {788 if wv.destroyed.Load() {
789 return fmt.Errorf("webview %d is destroyed", wv.id)789 return fmt.Errorf("webview %d is destroyed", wv.id)

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