detached 8ba0228

fix: resolve lint issues (line length, magic number, unused field)

commit
8ba02282ece0e90fd1a8f9ad6dacb5d3683b3c80
author
brice · · 2026-01-01 13:51 UTC
parent
c9e4be8
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
4 files · +10 -3
M internal/infrastructure/webkit/handlers/clipboard.go +7 -1
@@ -71,7 +71,13 @@ func (h *ClipboardHandler) HandleAutoCopySelection() webkit.MessageHandler {
7171 }
7272
7373 // RegisterClipboardHandlers registers clipboard handlers with the router.
74-func RegisterClipboardHandlers(ctx context.Context, router *webkit.MessageRouter, clipboard port.Clipboard, configGetter func() *config.Config, onCopied func(textLen int)) error {
74+func RegisterClipboardHandlers(
75+ ctx context.Context,
76+ router *webkit.MessageRouter,
77+ clipboard port.Clipboard,
78+ configGetter func() *config.Config,
79+ onCopied func(textLen int),
80+) error {
7581 handler := NewClipboardHandler(clipboard, configGetter, onCopied)
7682
7783 // Register auto_copy_selection handler
@@ -71,7 +71,13 @@ func (h *ClipboardHandler) HandleAutoCopySelection() webkit.MessageHandler {
71 }71 }
72 72
73 // RegisterClipboardHandlers registers clipboard handlers with the router.73 // RegisterClipboardHandlers registers clipboard handlers with the router.
74-func RegisterClipboardHandlers(ctx context.Context, router *webkit.MessageRouter, clipboard port.Clipboard, configGetter func() *config.Config, onCopied func(textLen int)) error {74+func RegisterClipboardHandlers(
75+ ctx context.Context,
76+ router *webkit.MessageRouter,
77+ clipboard port.Clipboard,
78+ configGetter func() *config.Config,
79+ onCopied func(textLen int),
80+) error {
75 handler := NewClipboardHandler(clipboard, configGetter, onCopied)81 handler := NewClipboardHandler(clipboard, configGetter, onCopied)
76 82
77 // Register auto_copy_selection handler83 // Register auto_copy_selection handler
M internal/infrastructure/webkit/injector.go +0 -1
@@ -150,7 +150,6 @@ type ContentInjector struct {
150150 colorResolver port.ColorSchemeResolver
151151 themeCSSVars string // CSS custom property declarations for WebUI
152152 findCSS string // CSS for find-in-page highlight styling
153- autoCopyOnSelection bool // Whether to inject auto-copy selection script
154153 autoCopyConfigGetter func() bool // Dynamic getter for auto-copy config
155154 }
156155
@@ -150,7 +150,6 @@ type ContentInjector struct {
150 colorResolver port.ColorSchemeResolver150 colorResolver port.ColorSchemeResolver
151 themeCSSVars string // CSS custom property declarations for WebUI151 themeCSSVars string // CSS custom property declarations for WebUI
152 findCSS string // CSS for find-in-page highlight styling152 findCSS string // CSS for find-in-page highlight styling
153- autoCopyOnSelection bool // Whether to inject auto-copy selection script
154 autoCopyConfigGetter func() bool // Dynamic getter for auto-copy config153 autoCopyConfigGetter func() bool // Dynamic getter for auto-copy config
155 }154 }
156 155
M internal/ui/app.go +1 -1
@@ -156,7 +156,7 @@ func New(deps *Dependencies) (*App, error) {
156156 cb := glib.SourceFunc(func(_ uintptr) bool {
157157 if app.appToaster != nil {
158158 app.appToaster.Show(ctx, "Copied to clipboard", component.ToastInfo,
159- component.WithDuration(800), // Brief notification
159+ component.WithDuration(component.ToastBriefDurationMs),
160160 component.WithPosition(component.ToastPositionBottomRight),
161161 )
162162 }
@@ -156,7 +156,7 @@ func New(deps *Dependencies) (*App, error) {
156 cb := glib.SourceFunc(func(_ uintptr) bool {156 cb := glib.SourceFunc(func(_ uintptr) bool {
157 if app.appToaster != nil {157 if app.appToaster != nil {
158 app.appToaster.Show(ctx, "Copied to clipboard", component.ToastInfo,158 app.appToaster.Show(ctx, "Copied to clipboard", component.ToastInfo,
159- component.WithDuration(800), // Brief notification159+ component.WithDuration(component.ToastBriefDurationMs),
160 component.WithPosition(component.ToastPositionBottomRight),160 component.WithPosition(component.ToastPositionBottomRight),
161 )161 )
162 }162 }
M internal/ui/component/toaster.go +2 -0
@@ -16,6 +16,8 @@ import (
1616 const (
1717 // Default auto-dismiss timeout in milliseconds.
1818 toastDismissTimeoutMs = 1500
19+ // ToastBriefDurationMs is the duration for brief notifications (e.g., clipboard copy).
20+ ToastBriefDurationMs = 800
1921 )
2022
2123 // ToastLevel indicates the visual style of a toast notification.
@@ -16,6 +16,8 @@ import (
16 const (16 const (
17 // Default auto-dismiss timeout in milliseconds.17 // Default auto-dismiss timeout in milliseconds.
18 toastDismissTimeoutMs = 150018 toastDismissTimeoutMs = 1500
19+ // ToastBriefDurationMs is the duration for brief notifications (e.g., clipboard copy).
20+ ToastBriefDurationMs = 800
19 )21 )
20 22
21 // ToastLevel indicates the visual style of a toast notification.23 // ToastLevel indicates the visual style of a toast notification.

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