mirivlad
87c8dfcbea
sync: overhaul sync system — device pairing, server_sequence, auto-sync, dashboards
...
BREAKING: replace legacy API keys with device tokens via pairing flow.
- Server: /api/client/pair, revoke, me endpoints; server_sequence + tombstones + idempotency
- Desktop client: PairDevice, GetMe, RevokeCurrent; auto-sync loop every 60s
- Config: device_token stored in separate file (0600), not config.yml
- Client DB: last_pull_seq migration for incremental pull
- Frontend (Svelte): settings modal with connect/disconnect/interval
- User dashboard (/dashboard): device list with status, revoke with password
- Admin dashboard (/admin/dashboard): devices table from /admin/api/devices
- CLI (cmd/verstak): updated for ServerSequence/GetState changes
- Fix: autoSyncLoop falls back to SQLite sync_state for server URL
- Fix: SyncSetInterval preserves server_url/device_id from SQLite
2026-06-02 02:26:05 +08:00
mirivlad
c65187f656
gui: add Wails v2 app skeleton
...
- Install Wails v2.12.0 CLI (go install github.com/wailsapp/wails/v2/cmd/wails@latest)
- Add go.mod require: github.com/wailsapp/wails/v2 v2.12.0
- Create cmd/verstak-gui/main.go: Wails v2 entry point (go:build gui)
- Uses wails.Run() with AssetServer + Bind
- embed frontend-dist (copy of frontend/dist for build)
- Init core services: nodes, files, notes, actions, worklog, search, plugins
- Create cmd/verstak-gui/app.go: App struct with Wails v2 bindings
- ListSections, ListRootNodes, ListChildren, ListNodesBySection
- GetNodeDetail, CreateNode, DeleteNode
- PickFile, PickFiles, PickDirectory (runtime dialogs)
- Stubs for: Notes, Files, Actions, Worklog, Search
- Legacy HTTP GUI preserved in internal/gui/
- Build: go build -tags "gui production webkit2_41" -o verstak-gui ./cmd/verstak-gui
- Wails v2 window opens on Linux desktop (no SIGSEGV!)
- Core tests pass: go test ./...
2026-05-31 19:11:20 +08:00
mirivlad
ae970e5bca
gui: remove Wails v3 dependencies and v3-specific files
...
- Remove guimain.go (Wails v3 entry point with //go:build gui)
- Remove wails_service.go (Wails v3 binding stubs)
- Remove go.mod requires for wails/v3, webview2, and all v3 indirect deps
- Remove vendor/ directory (leftover from Wails v3 init)
- Clean go.mod to only core dependencies: sqlite3, uuid, yaml.v3
- Core tests still pass: go test ./...
2026-05-31 18:44:04 +08:00
mirivlad
600b67bc1e
gui: add Wails v3 desktop app skeleton
...
- Go upgraded to 1.25.10 (required by Wails v3)
- Wails v3 installed (alpha.96)
- Frontend: Svelte+Vite scaffold in frontend/
- guimain.go: Wails GUI entry point (compiled with -tags gui)
- wails_service.go: stub service for Wails bindings
- Verstak desktop binary builds: go build -tags gui -o verstak-gui .
- CLI (./cmd/verstak/) unaffected
- Legacy HTTP GUI (internal/gui/) preserved as prototype
- Build: 24MB ELF binary with GTK4/WebKit2GTK-6
Build commands:
CLI: go build -o verstak ./cmd/verstak/
GUI: cd frontend && npm run build && go build -tags gui -o verstak-gui .
2026-05-31 15:45:52 +08:00
mirivlad
b8d8427c46
step 2: init command + SQLite storage + migrations + config
...
- storage.go: DB wrapper, migration runner (in-code SQL strings)
- migrations.go: 001_init (nodes + node_meta + indexes)
- vault.go: Init() creates .verstak/ dirs, config.yml, index.db
- config.go: YAML config read/write
- util/uuid.go: UUIDv7 generator
- cmd/verstak/main.go: init --vault PATH command
- main_test.go: TestInitCreatesVault, TestInitConfigYAML
Acceptance: go build ./... pass, go test ./... pass
Init creates test-vault with .verstak/index.db + config.yml
Repeat Init is safe.
2026-05-30 18:58:47 +08:00
mirivlad
982f3064ac
step 1: skeleton - go module, CLI stub with --version, structure
2026-05-30 18:42:19 +08:00