detached a462fed

refactor(main): simplify entry point to 61 lines with modular architecture

commit
a462fed340732d2bdc27cfbe97a4062955c36513
author
bamen · · 2025-09-12 13:55 UTC
parent
8b9bad5
signature
unsigned
1 file · +5 -1
M main.go +5 -1
@@ -7,6 +7,7 @@ import (
77
88 "github.com/bnema/dumber/internal/app/browser"
99 "github.com/bnema/dumber/internal/app/cli"
10+ "github.com/bnema/dumber/internal/logging"
1011 "github.com/bnema/dumber/pkg/webkit"
1112 )
1213
@@ -21,6 +22,9 @@ var (
2122 )
2223
2324 func main() {
25+ // Setup basic crash handling early (before any potential crashes)
26+ logging.SetupCrashHandler()
27+
2428 // Check if we should run the CLI mode
2529 if shouldRunCLI() {
2630 cli.Execute(version, commit, buildDate)
@@ -58,4 +62,4 @@ func shouldRunCLI() bool {
5862
5963 // Any other arguments mean CLI mode
6064 return true
61-}⏎̸
65+}
@@ -7,6 +7,7 @@ import (
7 7
8 "github.com/bnema/dumber/internal/app/browser"8 "github.com/bnema/dumber/internal/app/browser"
9 "github.com/bnema/dumber/internal/app/cli"9 "github.com/bnema/dumber/internal/app/cli"
10+ "github.com/bnema/dumber/internal/logging"
10 "github.com/bnema/dumber/pkg/webkit"11 "github.com/bnema/dumber/pkg/webkit"
11 )12 )
12 13
@@ -21,6 +22,9 @@ var (
21 )22 )
22 23
23 func main() {24 func main() {
25+ // Setup basic crash handling early (before any potential crashes)
26+ logging.SetupCrashHandler()
27+
24 // Check if we should run the CLI mode28 // Check if we should run the CLI mode
25 if shouldRunCLI() {29 if shouldRunCLI() {
26 cli.Execute(version, commit, buildDate)30 cli.Execute(version, commit, buildDate)
@@ -58,4 +62,4 @@ func shouldRunCLI() bool {
58 62
59 // Any other arguments mean CLI mode63 // Any other arguments mean CLI mode
60 return true64 return true
61-}⏎̸65+}

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