mirivlad
b4010a5a24
gui: Wails v2 vertical MVP — bindings + UI
...
Go bindings (cmd/verstak-gui/app.go):
- Wire notes.Service, files.Service, actions.Service, worklog.Service
- CreateNote, ListNotes, ReadNote, SaveNote
- ListFiles, ListActions, RunAction
- ListWorklog, CreateWorklog
- Fix DTO mappings for core types
Frontend (frontend/src/):
- api/verstak.js: Wails v2 API wrapper (window.go.main.App)
- App.svelte: full rewrite with sidebar + 6 tabs + notes editor
- Section filtering → nodes by section
- Notes: create, open textarea editor, save, dirty tracking
- Quick actions, worklog entries, empty states
- Node creation modal with section select
Build:
cd frontend && npm run build
rm -rf cmd/verstak-gui/frontend-dist && cp -r frontend/dist cmd/verstak-gui/frontend-dist
go build -tags 'gui production webkit2_41' -o verstak-gui ./cmd/verstak-gui
./verstak-gui
2026-05-31 20:37:46 +08:00
mirivlad
ee503c338f
gui: fix layout — full viewport, dark theme, sidebar+main
...
Problem: UI appeared as narrow dark panel on white background with scrollbar.
Root causes:
- html/body had no reset — default browser margin/padding = white borders
- index.html referenced non-existent /style.css
- .app used height:100vh but no width:100vw or overflow:hidden
- sidebar used fixed width instead of flexbox
Fixed:
- index.html: added critical CSS reset (html/body/#app = 100%, margin:0, overflow:hidden, dark bg)
- index.html: removed /style.css ref, changed lang to ru, title to Верстак
- App.svelte: complete layout rewrite
- .app = flex, 100vw x 100vh, overflow:hidden
- sidebar = 260px width, full height, flex column
- main = flex:1, full height, flex column (header + content)
- sidebar nav with sections + nodes using <button> elements
- content area fills remaining space
- proper dark theme colors throughout
- Rebuilt frontend/dist and cmd/verstak-gui/frontend-dist
2026-05-31 19:54:07 +08:00
mirivlad
39271fc28f
steps 4-6 + doc overhaul: files, notes, GUI, plugins docs
...
DOCUMENTATION (shift from personal to universal product):
- README.md: rewritten with 'one product, different doors' framing,
universal entities table, audience segments
- 01_Product_Spec.md: removed personal references (sshkeeper, Godot,
DokuWiki, servers), added audience segments (freelancer, repairmaster,
developer, maker, consultant), universal scenarios
- 02_Architecture.md: added 'Plugins (Extensibility)' section with
calendar/kanban/importer/template examples
- 03_Data_Model_Storage.md: added section 6 on plugin extensibility
(node_meta, type registry, SQL migrations per plugin)
- 09_Extensibility.md (NEW): full plugin architecture — Lua runtime,
plugin.json, hooks, sandbox, templates, registry
- PLAN.md: added step 16 (plugins), updated status table
- 00_README.md: rewritten product index with plugin principle
CODE — STEP 4 (Files):
- migration 002: files table (id, node_id, filename, path,
storage_mode, size, sha256, mime, ...)
- FileService: AddExternal, CopyIntoVault, Get, ListByNode,
MarkMissing, DeleteToTrash, Open (xdg-open)
- file_test.go: 5 tests (external, copy-vault, list-node,
delete-trash, MIME guess)
CODE — STEP 5 (Notes):
- migration 003: notes table (node_id PK, file_id, format,
original_format, encrypted)
- NoteService: Create (node+file+link), Read, Save (with backup to
.verstak/history/), Delete, Load
- note_test.go: 3 tests (create-read, save-backup, delete)
CODE — STEP 6 (GUI):
- cmd/verstak-gui/main.go: launches GUI server, opens browser
- internal/gui/server.go: HTTP API for nodes/notes/files/search
- internal/gui/index.html.go: full inline SPA frontend (dark theme,
sidebar tree, cards grid, note editor, search, create modals)
- Navigation: sidebar tree → click node → detail view with
children + files cards → tab switch (overview/notes/files)
→ create node/note via modal → edit note in fullscreen
textarea → save (with history backup)
Acceptance: go build ./... pass, go build -tags gui ./cmd/verstak-gui pass,
go test ./... pass (20+ tests). GUI serves on random port, opens browser.
API returns JSON for all resource types.
2026-05-30 20:35:04 +08:00