Commit Graph

8 Commits (feature/mouse-back-forward)

Author SHA1 Message Date
mirivlad 8e5690e8f7 feat: intercept GDK button 8/9 for mouse back/forward navigation
WebKitGTK does not propagate XButton1/XButton2 (buttons 8 and 9) into
DOM events — event.button and event.buttons are always 0 for these
clicks. This prevents the frontend from detecting hardware back/forward
mouse buttons for history navigation.

Solution: patch Wails' window.c on Linux to intercept button-press-event
at the GTK signal level (before WebKit processes it). For button 8/9 we
call webkit_web_view_run_javascript() to dispatch a native CustomEvent
('verstak:navigate-back' / 'verstak:navigate-forward') into the page,
allowing the frontend to navigate history without any workaround on the
JS side.

The patch is applied automatically during build via scripts/build.sh:
  go mod vendor → patch -p0 < patches/window.c.button-press.patch
Vendor directory is gitignored.
2026-06-21 13:49:13 +08:00
mirivlad a96ffb5801 chore: split build.sh and update-and-build-all.sh
- build.sh: deterministic local-only build, fail-fast, no git pull
- update-and-build-all.sh: dev helper, pulls all repos, builds official plugins, then builds desktop
- Docs: added Build Scripts section explaining the difference
2026-06-17 17:13:14 +08:00
mirivlad 86eeadd2a9 feat: milestone 5a — frontend plugin host, contribution lifecycle, UI shell
- Contribution Registry: ListByPoint, idempotent Register (Unregister-before-add)
- Flat ContributionSummary types for frontend (no nested .item.)
- Sidebar.svelte: items from ContributionRegistry, sort by position, error boundary
- ViewContainer.svelte: declarative placeholder host with error boundary
- PluginManager.svelte: settings panels from registry, knoppka only with settingsPanel
- PluginCard.svelte: settingsPanels prop, disabled state for Settings button
- Error boundary: ViewContainer + PluginManager catch errors, shell stays stable
- ReloadPlugins: Unregister before Register contributions (no duplicates)
- Smoke: -test-contributions flag, enable/disable/reload lifecycle verification
- Build: global_update() — pull all repos, build official plugins, install to desktop
2026-06-17 17:07:52 +08:00
mirivlad 70d4c75d7e fix: resolve plugin path relative to binary location + copy plugins in build
- main.go: use filepath.Dir(os.Args[0]) instead of ./plugins for discovery
- api/app.go: same fix for ReloadPlugins
- build.sh: copy plugins/ to build/bin/plugins/ after wails build
- Fixes: plugin not found when binary launched from different CWD
2026-06-16 21:00:44 +08:00
mirivlad e39e249556 fix: auto-detect webkit2gtk-4.1 with -tags webkit2_41, show binary path 2026-06-16 13:38:51 +08:00
mirivlad 291f4224fa fix: build.sh auto-installs wails if missing 2026-06-16 12:34:25 +08:00
mirivlad e3b0bf5f4b fix: reorder build — frontend before Go (//go:embed deps), auto-install node_modules/go mod 2026-06-16 12:32:31 +08:00
mirivlad aefb9e9a9c feat: add scripts/build.sh, test.sh, check.sh + gofmt + go mod tidy 2026-06-16 12:11:55 +08:00