v0.1 bf7c821

CLAUDE.md RawHistoryFolder

dumb-browser Development Guidelines

Auto-generated from all feature plans. Last updated: 2025-01-21

Active Technologies

  • Go 1.25.1 + WebKit2GTK (native), Cobra, Viper, SQLite3 (003-webkit2gtk-migration)
  • CGO bindings for WebKit2GTK C API integration

Project Structure

pkg/
└── webkit/       # WebKit2GTK Go bindings (extractable)

src/
├── models/       # Data models and entities
├── services/     # Business logic services  
├── cli/         # Command line interface
└── lib/         # Shared libraries

tests/
├── contract/    # Contract tests for WebKit bindings
├── integration/ # Integration tests with WebKit2GTK
└── unit/        # Unit tests

Commands

# Testing and linting
make test
make lint

# Build application
make build

# Development
make dev

# Generate code (SQLC)
make generate

# Database operations
sqlite3 ~/.config/dumber/browser.db

Code Style

Go 1.25.1: Follow standard Go conventions with gofmt

  • Use structured logging (slog)
  • Proper error handling (no panics)
  • SQLC for type-safe database queries
  • CGO memory management with Go finalizers
  • Constitutional simplicity principles

Recent Changes

  • 003-webkit2gtk-migration: Migrating from Wails to native WebKit2GTK with custom CGO bindings
  • 002-browser-controls-ui: Added keyboard/mouse controls, zoom persistence, clipboard integration

WebKit2GTK Integration

  • Reference repository: /home/brice/dev/clone/webkit2gtk-reference
  • pkg/webkit: Reusable WebKit2GTK Go bindings
  • Direct GTK event handling for keyboard shortcuts
  • WebKitUserContentManager for script injection
source
1# dumb-browser Development Guidelines
2
3Auto-generated from all feature plans. Last updated: 2025-01-21
4
5## Active Technologies  
6- Go 1.25.1 + WebKit2GTK (native), Cobra, Viper, SQLite3 (003-webkit2gtk-migration)
7- CGO bindings for WebKit2GTK C API integration
8
9## Project Structure
10```
11pkg/
12└── webkit/       # WebKit2GTK Go bindings (extractable)
13
14src/
15├── models/       # Data models and entities
16├── services/     # Business logic services  
17├── cli/         # Command line interface
18└── lib/         # Shared libraries
19
20tests/
21├── contract/    # Contract tests for WebKit bindings
22├── integration/ # Integration tests with WebKit2GTK
23└── unit/        # Unit tests
24```
25
26## Commands
27```bash
28# Testing and linting
29make test
30make lint
31
32# Build application
33make build
34
35# Development
36make dev
37
38# Generate code (SQLC)
39make generate
40
41# Database operations
42sqlite3 ~/.config/dumber/browser.db
43```
44
45## Code Style
46Go 1.25.1: Follow standard Go conventions with gofmt
47- Use structured logging (slog)
48- Proper error handling (no panics)
49- SQLC for type-safe database queries  
50- CGO memory management with Go finalizers
51- Constitutional simplicity principles
52
53## Recent Changes
54- 003-webkit2gtk-migration: Migrating from Wails to native WebKit2GTK with custom CGO bindings
55- 002-browser-controls-ui: Added keyboard/mouse controls, zoom persistence, clipboard integration
56
57## WebKit2GTK Integration
58- Reference repository: /home/brice/dev/clone/webkit2gtk-reference
59- pkg/webkit: Reusable WebKit2GTK Go bindings
60- Direct GTK event handling for keyboard shortcuts
61- WebKitUserContentManager for script injection
62
63<!-- MANUAL ADDITIONS START -->
64<!-- MANUAL ADDITIONS END -->

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