detached 1ee31e6

fix(popup): satisfy routing lint checks

commit
1ee31e617df70806e137b2b0ed3d88d8d671113e
author
brice · · 2026-07-25 08:32 UTC
committer
brice · · 2026-07-26 16:42 UTC
parent
82824ac
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
3 files · +18 -10
M internal/infrastructure/cef/webview_handlers.go +2 -0
@@ -638,6 +638,8 @@ func mapCEFWindowDisposition(disposition purecef.WindowOpenDisposition) dto.Wind
638638 // client back to CEF and allow native popup creation so opener semantics are
639639 // preserved. Otherwise we keep blocking and let the coordinator's fallback
640640 // pane handle the navigation.
641+//
642+//nolint:funlen // Popup ownership transitions stay linear to keep CEF callback semantics auditable.
641643 func (h *handlerSet) OnBeforePopup(
642644 browser purecef.Browser, frame purecef.Frame, popupID int32, targetURL, targetFrameName string,
643645 targetDisposition purecef.WindowOpenDisposition, userGesture int32, popupFeatures *purecef.PopupFeatures,
@@ -638,6 +638,8 @@ func mapCEFWindowDisposition(disposition purecef.WindowOpenDisposition) dto.Wind
638 // client back to CEF and allow native popup creation so opener semantics are638 // client back to CEF and allow native popup creation so opener semantics are
639 // preserved. Otherwise we keep blocking and let the coordinator's fallback639 // preserved. Otherwise we keep blocking and let the coordinator's fallback
640 // pane handle the navigation.640 // pane handle the navigation.
641+//
642+//nolint:funlen // Popup ownership transitions stay linear to keep CEF callback semantics auditable.
641 func (h *handlerSet) OnBeforePopup(643 func (h *handlerSet) OnBeforePopup(
642 browser purecef.Browser, frame purecef.Frame, popupID int32, targetURL, targetFrameName string,644 browser purecef.Browser, frame purecef.Frame, popupID int32, targetURL, targetFrameName string,
643 targetDisposition purecef.WindowOpenDisposition, userGesture int32, popupFeatures *purecef.PopupFeatures,645 targetDisposition purecef.WindowOpenDisposition, userGesture int32, popupFeatures *purecef.PopupFeatures,
M internal/ui/app.go +5 -5
@@ -615,16 +615,16 @@ func (a *App) ownerOrLastFocusedBrowserWindow(tabID entity.TabID, paneID entity.
615615 return a.lastFocusedBrowserWindow()
616616 }
617617
618-func (a *App) openPopupNativeWindow(ctx context.Context, input content.NativePopupInput) error {
619- if err := a.openNativePopupWindow(ctx, input); err != nil {
618+func (a *App) openPopupNativeWindow(ctx context.Context, popupInput content.NativePopupInput) error {
619+ if err := a.openNativePopupWindow(ctx, popupInput); err != nil {
620620 return err
621621 }
622622 // Deferred WebKit classification runs from ready-to-show. The native host
623623 // is attached after that signal, so it must be revealed immediately rather
624624 // than waiting for an already-delivered lifecycle callback.
625- if input.Request.Engine == dto.BrowserEngineWebKit &&
626- input.Request.PopupFeatures.State == dto.PopupFeaturesSpecified {
627- a.showNativePopupWindow(input.PopupWebView.ID())
625+ if popupInput.Request.Engine == dto.BrowserEngineWebKit &&
626+ popupInput.Request.PopupFeatures.State == dto.PopupFeaturesSpecified {
627+ a.showNativePopupWindow(popupInput.PopupWebView.ID())
628628 }
629629 return nil
630630 }
@@ -615,16 +615,16 @@ func (a *App) ownerOrLastFocusedBrowserWindow(tabID entity.TabID, paneID entity.
615 return a.lastFocusedBrowserWindow()615 return a.lastFocusedBrowserWindow()
616 }616 }
617 617
618-func (a *App) openPopupNativeWindow(ctx context.Context, input content.NativePopupInput) error {618+func (a *App) openPopupNativeWindow(ctx context.Context, popupInput content.NativePopupInput) error {
619- if err := a.openNativePopupWindow(ctx, input); err != nil {619+ if err := a.openNativePopupWindow(ctx, popupInput); err != nil {
620 return err620 return err
621 }621 }
622 // Deferred WebKit classification runs from ready-to-show. The native host622 // Deferred WebKit classification runs from ready-to-show. The native host
623 // is attached after that signal, so it must be revealed immediately rather623 // is attached after that signal, so it must be revealed immediately rather
624 // than waiting for an already-delivered lifecycle callback.624 // than waiting for an already-delivered lifecycle callback.
625- if input.Request.Engine == dto.BrowserEngineWebKit &&625+ if popupInput.Request.Engine == dto.BrowserEngineWebKit &&
626- input.Request.PopupFeatures.State == dto.PopupFeaturesSpecified {626+ popupInput.Request.PopupFeatures.State == dto.PopupFeaturesSpecified {
627- a.showNativePopupWindow(input.PopupWebView.ID())627+ a.showNativePopupWindow(popupInput.PopupWebView.ID())
628 }628 }
629 return nil629 return nil
630 }630 }
M internal/ui/coordinator/content/popup_deferred.go +11 -5
@@ -89,17 +89,17 @@ func (pm *popupManager) cancelDeferredPopupsMatching(match func(*deferredPending
8989 return
9090 }
9191 pm.mu.Lock()
92- cancelled := make([]*deferredPendingPopup, 0)
92+ canceled := make([]*deferredPendingPopup, 0)
9393 for popupID, pending := range pm.deferredPopups {
9494 if pending == nil || !match(pending) {
9595 continue
9696 }
9797 delete(pm.deferredPopups, popupID)
9898 delete(pm.pendingPopups, popupID)
99- cancelled = append(cancelled, pending)
99+ canceled = append(canceled, pending)
100100 }
101101 pm.mu.Unlock()
102- for _, pending := range cancelled {
102+ for _, pending := range canceled {
103103 pm.cleanupDeferredPending(pending)
104104 }
105105 }
@@ -181,9 +181,15 @@ func (pm *popupManager) resolvePendingPopupFeatures(
181181 transferred := false
182182 switch decision.Kind {
183183 case dto.HostDecisionCreateBrowserWindow:
184- transferred = pm.openExistingPopupInBrowserWindow(ctx, hooks, pending.ParentPaneID, pending.ParentWebViewID, pending.WebView, request, decision, true)
184+ transferred = pm.openExistingPopupInBrowserWindow(
185+ ctx, hooks, pending.ParentPaneID, pending.ParentWebViewID,
186+ pending.WebView, request, decision, true,
187+ )
185188 case dto.HostDecisionCreateNativePopup:
186- transferred = pm.openExistingPopupInNativePopup(ctx, hooks, pending.ParentPaneID, pending.ParentWebViewID, parentURIAtOpen, pending.WebView, request, decision)
189+ transferred = pm.openExistingPopupInNativePopup(
190+ ctx, hooks, pending.ParentPaneID, pending.ParentWebViewID,
191+ parentURIAtOpen, pending.WebView, request, decision,
192+ )
187193 case dto.HostDecisionReuseNamedPane:
188194 // Reuse transfers no ownership: the existing context is navigated while
189195 // the newly staged WebView remains ours and must be discarded below.
@@ -89,17 +89,17 @@ func (pm *popupManager) cancelDeferredPopupsMatching(match func(*deferredPending
89 return89 return
90 }90 }
91 pm.mu.Lock()91 pm.mu.Lock()
92- cancelled := make([]*deferredPendingPopup, 0)92+ canceled := make([]*deferredPendingPopup, 0)
93 for popupID, pending := range pm.deferredPopups {93 for popupID, pending := range pm.deferredPopups {
94 if pending == nil || !match(pending) {94 if pending == nil || !match(pending) {
95 continue95 continue
96 }96 }
97 delete(pm.deferredPopups, popupID)97 delete(pm.deferredPopups, popupID)
98 delete(pm.pendingPopups, popupID)98 delete(pm.pendingPopups, popupID)
99- cancelled = append(cancelled, pending)99+ canceled = append(canceled, pending)
100 }100 }
101 pm.mu.Unlock()101 pm.mu.Unlock()
102- for _, pending := range cancelled {102+ for _, pending := range canceled {
103 pm.cleanupDeferredPending(pending)103 pm.cleanupDeferredPending(pending)
104 }104 }
105 }105 }
@@ -181,9 +181,15 @@ func (pm *popupManager) resolvePendingPopupFeatures(
181 transferred := false181 transferred := false
182 switch decision.Kind {182 switch decision.Kind {
183 case dto.HostDecisionCreateBrowserWindow:183 case dto.HostDecisionCreateBrowserWindow:
184- transferred = pm.openExistingPopupInBrowserWindow(ctx, hooks, pending.ParentPaneID, pending.ParentWebViewID, pending.WebView, request, decision, true)184+ transferred = pm.openExistingPopupInBrowserWindow(
185+ ctx, hooks, pending.ParentPaneID, pending.ParentWebViewID,
186+ pending.WebView, request, decision, true,
187+ )
185 case dto.HostDecisionCreateNativePopup:188 case dto.HostDecisionCreateNativePopup:
186- transferred = pm.openExistingPopupInNativePopup(ctx, hooks, pending.ParentPaneID, pending.ParentWebViewID, parentURIAtOpen, pending.WebView, request, decision)189+ transferred = pm.openExistingPopupInNativePopup(
190+ ctx, hooks, pending.ParentPaneID, pending.ParentWebViewID,
191+ parentURIAtOpen, pending.WebView, request, decision,
192+ )
187 case dto.HostDecisionReuseNamedPane:193 case dto.HostDecisionReuseNamedPane:
188 // Reuse transfers no ownership: the existing context is navigated while194 // Reuse transfers no ownership: the existing context is navigated while
189 // the newly staged WebView remains ours and must be discarded below.195 // the newly staged WebView remains ours and must be discarded below.

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