detached 7c11dec

fix: move content_termination_test.go to content/ and fix app.go type mismatches

commit
7c11dec61f35d114d971c4bc16731d485f8383f6
author
brice · · 2026-03-15 18:03 UTC
parent
75beae6
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
3 files · +23 -10
M internal/ui/app.go +3 -3
@@ -153,7 +153,7 @@ type floatingWorkspaceSession struct {
153153 paneID entity.PaneID
154154 pane *component.FloatingPane
155155 paneView *component.PaneView
156- webView *webkit.WebView
156+ webView port.WebView
157157 overlay layout.OverlayWidget
158158 widget layout.Widget
159159 focusWidget layout.Widget
@@ -1559,7 +1559,7 @@ func (a *App) initCoordinators(ctx context.Context) {
15591559 a.tabCoord.SetOnQuit(a.Quit)
15601560 a.tabCoord.SetOnStateChanged(a.MarkDirty)
15611561 // Wire popup tab WebView attachment
1562- a.tabCoord.SetOnAttachPopupToTab(func(ctx context.Context, tabID entity.TabID, pane *entity.Pane, wv *webkit.WebView) {
1562+ a.tabCoord.SetOnAttachPopupToTab(func(ctx context.Context, tabID entity.TabID, pane *entity.Pane, wv port.WebView) {
15631563 a.attachPopupToTab(ctx, tabID, pane, wv)
15641564 })
15651565
@@ -2149,7 +2149,7 @@ func (a *App) getActiveWebViewTarget() port.TextInputTarget {
21492149
21502150 // attachPopupToTab attaches a popup WebView to a newly created tab.
21512151 // This is called when a popup uses tabbed behavior.
2152-func (a *App) attachPopupToTab(ctx context.Context, tabID entity.TabID, pane *entity.Pane, wv *webkit.WebView) {
2152+func (a *App) attachPopupToTab(ctx context.Context, tabID entity.TabID, pane *entity.Pane, wv port.WebView) {
21532153 log := logging.FromContext(ctx)
21542154
21552155 wsView := a.workspaceViews[tabID]
@@ -153,7 +153,7 @@ type floatingWorkspaceSession struct {
153 paneID entity.PaneID153 paneID entity.PaneID
154 pane *component.FloatingPane154 pane *component.FloatingPane
155 paneView *component.PaneView155 paneView *component.PaneView
156- webView *webkit.WebView156+ webView port.WebView
157 overlay layout.OverlayWidget157 overlay layout.OverlayWidget
158 widget layout.Widget158 widget layout.Widget
159 focusWidget layout.Widget159 focusWidget layout.Widget
@@ -1559,7 +1559,7 @@ func (a *App) initCoordinators(ctx context.Context) {
1559 a.tabCoord.SetOnQuit(a.Quit)1559 a.tabCoord.SetOnQuit(a.Quit)
1560 a.tabCoord.SetOnStateChanged(a.MarkDirty)1560 a.tabCoord.SetOnStateChanged(a.MarkDirty)
1561 // Wire popup tab WebView attachment1561 // Wire popup tab WebView attachment
1562- a.tabCoord.SetOnAttachPopupToTab(func(ctx context.Context, tabID entity.TabID, pane *entity.Pane, wv *webkit.WebView) {1562+ a.tabCoord.SetOnAttachPopupToTab(func(ctx context.Context, tabID entity.TabID, pane *entity.Pane, wv port.WebView) {
1563 a.attachPopupToTab(ctx, tabID, pane, wv)1563 a.attachPopupToTab(ctx, tabID, pane, wv)
1564 })1564 })
1565 1565
@@ -2149,7 +2149,7 @@ func (a *App) getActiveWebViewTarget() port.TextInputTarget {
2149 2149
2150 // attachPopupToTab attaches a popup WebView to a newly created tab.2150 // attachPopupToTab attaches a popup WebView to a newly created tab.
2151 // This is called when a popup uses tabbed behavior.2151 // This is called when a popup uses tabbed behavior.
2152-func (a *App) attachPopupToTab(ctx context.Context, tabID entity.TabID, pane *entity.Pane, wv *webkit.WebView) {2152+func (a *App) attachPopupToTab(ctx context.Context, tabID entity.TabID, pane *entity.Pane, wv port.WebView) {
2153 log := logging.FromContext(ctx)2153 log := logging.FromContext(ctx)
2154 2154
2155 wsView := a.workspaceViews[tabID]2155 wsView := a.workspaceViews[tabID]
R internal/ui/coordinator/content_termination_test.go → internal/ui/coordinator/content/content_termination_test.go +6 -6 renamed, 67% similar
@@ -1,17 +1,17 @@
1-package coordinator
1+package content
22
33 import (
44 "testing"
55
6- webkitlib "github.com/bnema/puregotk-webkit/webkit"
6+ "github.com/bnema/dumber/internal/application/port"
77 "github.com/stretchr/testify/assert"
88 )
99
1010 func TestShouldRenderCrashPage(t *testing.T) {
11- assert.True(t, shouldRenderCrashPage(webkitlib.WebProcessCrashedValue))
12- assert.True(t, shouldRenderCrashPage(webkitlib.WebProcessExceededMemoryLimitValue))
13- assert.False(t, shouldRenderCrashPage(webkitlib.WebProcessTerminatedByApiValue))
14- assert.True(t, shouldRenderCrashPage(webkitlib.WebProcessTerminationReason(99)))
11+ assert.True(t, shouldRenderCrashPage(port.WebProcessTerminationCrashed))
12+ assert.True(t, shouldRenderCrashPage(port.WebProcessTerminationExceededMemory))
13+ assert.False(t, shouldRenderCrashPage(port.WebProcessTerminationByAPI))
14+ assert.True(t, shouldRenderCrashPage(port.WebProcessTerminationReason(99)))
1515 }
1616
1717 func TestExtractOriginalURIFromCrashPage(t *testing.T) {
@@ -1,17 +1,17 @@
1-package coordinator1+package content
2 2
3 import (3 import (
4 "testing"4 "testing"
5 5
6- webkitlib "github.com/bnema/puregotk-webkit/webkit"6+ "github.com/bnema/dumber/internal/application/port"
7 "github.com/stretchr/testify/assert"7 "github.com/stretchr/testify/assert"
8 )8 )
9 9
10 func TestShouldRenderCrashPage(t *testing.T) {10 func TestShouldRenderCrashPage(t *testing.T) {
11- assert.True(t, shouldRenderCrashPage(webkitlib.WebProcessCrashedValue))11+ assert.True(t, shouldRenderCrashPage(port.WebProcessTerminationCrashed))
12- assert.True(t, shouldRenderCrashPage(webkitlib.WebProcessExceededMemoryLimitValue))12+ assert.True(t, shouldRenderCrashPage(port.WebProcessTerminationExceededMemory))
13- assert.False(t, shouldRenderCrashPage(webkitlib.WebProcessTerminatedByApiValue))13+ assert.False(t, shouldRenderCrashPage(port.WebProcessTerminationByAPI))
14- assert.True(t, shouldRenderCrashPage(webkitlib.WebProcessTerminationReason(99)))14+ assert.True(t, shouldRenderCrashPage(port.WebProcessTerminationReason(99)))
15 }15 }
16 16
17 func TestExtractOriginalURIFromCrashPage(t *testing.T) {17 func TestExtractOriginalURIFromCrashPage(t *testing.T) {
M webui/package-lock.json +14 -1 generated file: collapsed

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