detached a363a97

refactor: address final lint issues

commit
a363a97920364ab3888d9ab279594fdbe99c39c7
author
brice · · 2026-04-11 13:28 UTC
parent
e97d131
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
3 files · +59 -16
M internal/infrastructure/cef/engine_init.go +12 -1
@@ -71,7 +71,18 @@ func NewEngine(
7171 }
7272 os.Args = savedArgs
7373
74- return wireEngine(ctx, eng, cfg, transcodingCfg, windowlessFrameRate, audioFactory, logger, deps.MediaClassifier, deps.CurrentConfigPayload, deps.DefaultConfigPayload)
74+ return wireEngine(
75+ ctx,
76+ eng,
77+ cfg,
78+ transcodingCfg,
79+ windowlessFrameRate,
80+ audioFactory,
81+ logger,
82+ deps.MediaClassifier,
83+ deps.CurrentConfigPayload,
84+ deps.DefaultConfigPayload,
85+ )
7586 }
7687
7788 func resolvedStateRoot(opts port.EngineOptions) string {
@@ -71,7 +71,18 @@ func NewEngine(
71 }71 }
72 os.Args = savedArgs72 os.Args = savedArgs
73 73
74- return wireEngine(ctx, eng, cfg, transcodingCfg, windowlessFrameRate, audioFactory, logger, deps.MediaClassifier, deps.CurrentConfigPayload, deps.DefaultConfigPayload)74+ return wireEngine(
75+ ctx,
76+ eng,
77+ cfg,
78+ transcodingCfg,
79+ windowlessFrameRate,
80+ audioFactory,
81+ logger,
82+ deps.MediaClassifier,
83+ deps.CurrentConfigPayload,
84+ deps.DefaultConfigPayload,
85+ )
75 }86 }
76 87
77 func resolvedStateRoot(opts port.EngineOptions) string {88 func resolvedStateRoot(opts port.EngineOptions) string {
M internal/infrastructure/cef/factory.go +1 -1
@@ -218,6 +218,6 @@ func (f *WebViewFactory) configureInitialBrowserCreation(
218218 // CreateRelated creates a WebView that shares session/cookies with the parent.
219219 // TODO(phase2): look up the parent browser by parentID and use the same
220220 // request context so cookies and session state are shared.
221-func (f *WebViewFactory) CreateRelated(ctx context.Context, _ port.WebViewID) (port.WebView, error) {
221+func (f *WebViewFactory) CreateRelated(_ context.Context, _ port.WebViewID) (port.WebView, error) {
222222 return nil, ErrRelatedWebViewUnsupported
223223 }
@@ -218,6 +218,6 @@ func (f *WebViewFactory) configureInitialBrowserCreation(
218 // CreateRelated creates a WebView that shares session/cookies with the parent.218 // CreateRelated creates a WebView that shares session/cookies with the parent.
219 // TODO(phase2): look up the parent browser by parentID and use the same219 // TODO(phase2): look up the parent browser by parentID and use the same
220 // request context so cookies and session state are shared.220 // request context so cookies and session state are shared.
221-func (f *WebViewFactory) CreateRelated(ctx context.Context, _ port.WebViewID) (port.WebView, error) {221+func (f *WebViewFactory) CreateRelated(_ context.Context, _ port.WebViewID) (port.WebView, error) {
222 return nil, ErrRelatedWebViewUnsupported222 return nil, ErrRelatedWebViewUnsupported
223 }223 }
M internal/ui/coordinator/content/popup.go +46 -14
@@ -301,19 +301,8 @@ func (c *Coordinator) handlePopupCreate(
301301 }
302302
303303 parentID := parentWV.ID()
304- if existing, ok := c.lookupReusableNamedPopup(parentPaneID, req.FrameName); ok {
305- c.updatePendingPopupTarget(existing.WebView.ID(), req.TargetURI)
306- if err := existing.WebView.LoadURI(ctx, req.TargetURI); err != nil {
307- log.Warn().Err(err).
308- Str("target_uri", logging.TruncateURL(req.TargetURI, logURLMaxLen)).
309- Msg("failed to load target URI in reused popup")
310- }
311- log.Info().
312- Str("parent_pane", string(parentPaneID)).
313- Str("frame_name", req.FrameName).
314- Str("target_uri", logging.TruncateURL(req.TargetURI, logURLMaxLen)).
315- Msg("reused named popup")
316- return existing.WebView
304+ if reused, ok := c.reuseNamedPopup(ctx, parentPaneID, req.FrameName, req.TargetURI); ok {
305+ return reused
317306 }
318307
319308 // Create related WebView for session sharing (created hidden)
@@ -337,10 +326,53 @@ func (c *Coordinator) handlePopupCreate(
337326 // Create popup pane entity
338327 paneID, popupPane := c.createPopupPane(popupID, parentPaneID, req.TargetURI)
339328
340- // Check OAuth configuration
329+ return c.finishPopupCreate(ctx, parentPaneID, parentID, popupID, popupWV, popupPane, paneID, popupType, behavior, placement, req)
330+}
331+
332+func (c *Coordinator) reuseNamedPopup(
333+ ctx context.Context,
334+ parentPaneID entity.PaneID,
335+ frameName string,
336+ targetURI string,
337+) (port.WebView, bool) {
338+ log := logging.FromContext(ctx)
339+
340+ if existing, ok := c.lookupReusableNamedPopup(parentPaneID, frameName); ok {
341+ c.updatePendingPopupTarget(existing.WebView.ID(), targetURI)
342+ if err := existing.WebView.LoadURI(ctx, targetURI); err != nil {
343+ log.Warn().Err(err).
344+ Str("target_uri", logging.TruncateURL(targetURI, logURLMaxLen)).
345+ Msg("failed to load target URI in reused popup")
346+ }
347+ log.Info().
348+ Str("parent_pane", string(parentPaneID)).
349+ Str("frame_name", frameName).
350+ Str("target_uri", logging.TruncateURL(targetURI, logURLMaxLen)).
351+ Msg("reused named popup")
352+ return existing.WebView, true
353+ }
354+
355+ return nil, false
356+}
357+
358+func (c *Coordinator) finishPopupCreate(
359+ ctx context.Context,
360+ parentPaneID entity.PaneID,
361+ parentID port.WebViewID,
362+ popupID port.WebViewID,
363+ popupWV port.WebView,
364+ popupPane *entity.Pane,
365+ paneID entity.PaneID,
366+ popupType PopupType,
367+ behavior entity.PopupBehavior,
368+ placement string,
369+ req port.PopupRequest,
370+) port.WebView {
371+ log := logging.FromContext(ctx)
341372 hasConfig := c.popupConfig != nil
342373 oauthEnabled := hasConfig && c.popupConfig.OAuthAutoClose
343374 isOAuth := IsOAuthURL(req.TargetURI)
375+
344376 log.Debug().
345377 Bool("has_config", hasConfig).
346378 Bool("oauth_enabled", oauthEnabled).
@@ -301,19 +301,8 @@ func (c *Coordinator) handlePopupCreate(
301 }301 }
302 302
303 parentID := parentWV.ID()303 parentID := parentWV.ID()
304- if existing, ok := c.lookupReusableNamedPopup(parentPaneID, req.FrameName); ok {304+ if reused, ok := c.reuseNamedPopup(ctx, parentPaneID, req.FrameName, req.TargetURI); ok {
305- c.updatePendingPopupTarget(existing.WebView.ID(), req.TargetURI)305+ return reused
306- if err := existing.WebView.LoadURI(ctx, req.TargetURI); err != nil {
307- log.Warn().Err(err).
308- Str("target_uri", logging.TruncateURL(req.TargetURI, logURLMaxLen)).
309- Msg("failed to load target URI in reused popup")
310- }
311- log.Info().
312- Str("parent_pane", string(parentPaneID)).
313- Str("frame_name", req.FrameName).
314- Str("target_uri", logging.TruncateURL(req.TargetURI, logURLMaxLen)).
315- Msg("reused named popup")
316- return existing.WebView
317 }306 }
318 307
319 // Create related WebView for session sharing (created hidden)308 // Create related WebView for session sharing (created hidden)
@@ -337,10 +326,53 @@ func (c *Coordinator) handlePopupCreate(
337 // Create popup pane entity326 // Create popup pane entity
338 paneID, popupPane := c.createPopupPane(popupID, parentPaneID, req.TargetURI)327 paneID, popupPane := c.createPopupPane(popupID, parentPaneID, req.TargetURI)
339 328
340- // Check OAuth configuration329+ return c.finishPopupCreate(ctx, parentPaneID, parentID, popupID, popupWV, popupPane, paneID, popupType, behavior, placement, req)
330+}
331+
332+func (c *Coordinator) reuseNamedPopup(
333+ ctx context.Context,
334+ parentPaneID entity.PaneID,
335+ frameName string,
336+ targetURI string,
337+) (port.WebView, bool) {
338+ log := logging.FromContext(ctx)
339+
340+ if existing, ok := c.lookupReusableNamedPopup(parentPaneID, frameName); ok {
341+ c.updatePendingPopupTarget(existing.WebView.ID(), targetURI)
342+ if err := existing.WebView.LoadURI(ctx, targetURI); err != nil {
343+ log.Warn().Err(err).
344+ Str("target_uri", logging.TruncateURL(targetURI, logURLMaxLen)).
345+ Msg("failed to load target URI in reused popup")
346+ }
347+ log.Info().
348+ Str("parent_pane", string(parentPaneID)).
349+ Str("frame_name", frameName).
350+ Str("target_uri", logging.TruncateURL(targetURI, logURLMaxLen)).
351+ Msg("reused named popup")
352+ return existing.WebView, true
353+ }
354+
355+ return nil, false
356+}
357+
358+func (c *Coordinator) finishPopupCreate(
359+ ctx context.Context,
360+ parentPaneID entity.PaneID,
361+ parentID port.WebViewID,
362+ popupID port.WebViewID,
363+ popupWV port.WebView,
364+ popupPane *entity.Pane,
365+ paneID entity.PaneID,
366+ popupType PopupType,
367+ behavior entity.PopupBehavior,
368+ placement string,
369+ req port.PopupRequest,
370+) port.WebView {
371+ log := logging.FromContext(ctx)
341 hasConfig := c.popupConfig != nil372 hasConfig := c.popupConfig != nil
342 oauthEnabled := hasConfig && c.popupConfig.OAuthAutoClose373 oauthEnabled := hasConfig && c.popupConfig.OAuthAutoClose
343 isOAuth := IsOAuthURL(req.TargetURI)374 isOAuth := IsOAuthURL(req.TargetURI)
375+
344 log.Debug().376 log.Debug().
345 Bool("has_config", hasConfig).377 Bool("has_config", hasConfig).
346 Bool("oauth_enabled", oauthEnabled).378 Bool("oauth_enabled", oauthEnabled).

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