mirivlad
d285f9ad8b
sync_apply FS-first rewrite; CreateNodeFromTemplate rollback; DeleteNodeAndChildren fail on trash errors; PLAN.md update
...
- applyRemoteNodeUpdate: FS-first with SafeVaultPath validation, must-fail os.Rename
- applyRemoteNodeMove: FS-first for folders and notes/files
- moveNodeFiles: rewritten FS-first with atomic DB transaction
- applyRemoteNoteMove: delegates to moveNodeFiles
- CreateNodeFromTemplate: rollbackChildren on any child creation failure
- DeleteToTrash: skip rename if source file already missing
- DeleteNodeAndChildren: fail on deleteFileRecords errors and trash move failures
- docs/PLAN.md: update step 14 status with known gaps
2026-06-03 02:22:49 +08:00
mirivlad
a31f5fd702
fix: third stabilization pass — template children as nodes, atomicity, fs_path validation, sync_apply compat, smoke test
2026-06-03 02:05:53 +08:00
mirivlad
0b26f7e5b3
refactor: implement template-driven node tree and human-readable vault layout
...
Unified Node model: added template_id, fs_path, archived, sort_order fields.
Template registry: system templates embedded as JSON (folder/project/client/
document/recipe), with Registry for enabled/disabled/filtered access.
SafeDisplayNameToPathSegment: human-readable path segments with Cyrillic
support, illegal char replacement, uniqueness via numeric suffixes.
Sidebar refactored: system views (Today/Inbox/Activity) separate from
workspace tree. Creation menu built dynamically from enabled templates.
Create/Rename/Move: physical folder operations with fs_path update,
recursive descendant path updates.
DB migration 012: adds template_id, fs_path, archived columns.
Vault migration command: rebuilds fs_path for existing nodes.
Tests: safename, registry, node model, repository integration.
Docs: VAULT_LAYOUT.md, TEMPLATES.md, PLAN.md updated.
i18n: nav.system, nav.workspace, template.*, common.rename/archive,
migrate.* keys added to ru.json and en.json.
2026-06-02 12:47:06 +08:00
mirivlad
ee708d30bb
docs: sync documentation with current codebase state
...
- Architecture: Wails v3→v2, removed TUI/sync/security from diagram
- UI/UX: layout updated to sidebar+header, sync marked future
- Roadmap: Wails v3→v2 migration note, milestones 10+ PAUSED
- MVP Checklist: mark implemented features as done
- PLAN.md: bindings list synced, repo structure fixed, progress updated
- Medium-term steps documented (sync, scanner, TUI, Lua, etc.)
2026-06-01 22:17:29 +08:00
mirivlad
4a8f4e3319
docs: mark Wails vertical MVP as current stage
2026-05-31 20:15:45 +08:00
mirivlad
3e07e611dd
docs: update PLAN.md with Wails v2 build instructions
2026-05-31 19:42:43 +08:00
mirivlad
2e50e95b68
docs: update PLAN.md — Wails v3→v2 migration note, PAUSED status
2026-05-31 18:46:24 +08:00
mirivlad
537e8a126e
plan: rewrite for Wails GUI + full file/folder workflow
...
- Archive browser prototype as legacy (step 6)
- New steps 11-14: Wails GUI, Files/Folders, D&D, stabilization
- Steps 15+ paused until step 14 complete
- DokuWiki moved to contrib/plugins/ (optional)
- Full architecture: Wails bindings → Go core → vault+SQLite
- Detailed acceptance criteria for each step
2026-05-31 12:10:58 +08:00
mirivlad
752b1bb4b8
fix: file upload via GUI + API endpoint
...
- Replace stub file modal with working file path input
- PUT /api/files/upload — copies external file into vault
- submitFile() JS: posts path to API, refreshes node view
- Button '+ Файл' now opens functional modal
2026-05-31 11:38:49 +08:00
mirivlad
b800bce7e4
step 10: plugins system (Lua + templates) + DokuWiki as optional plugin
...
Plugin Manager:
- Discover plugins from .verstak/plugins/<name>/plugin.json
- Enable/disable per plugin
- Template definitions (JSON) → pre-filled node trees
- SQL migrations from plugins
- Built-in templates loaded from internal/core/plugins/builtin/templates/
Lua Runtime:
- Stub (gopher-lua placeholder) — ready for real implementation
- When dep added: hooks (on_init, on_vault_open, on_node_create),
sandbox (no io/os.execute), Plugin API
GUI:
- Template selector in create node modal
- POST /api/nodes/from-template creates tree from template
- Built-in "Клиент" template: Overview note + Документы/Переписка/Скриншоты
CLI:
- verstak plugin list/enable/disable/templates
DokuWiki Importer:
- Moved to contrib/plugins/importer-dokuwiki/ (optional plugin)
- plugin.json + migration + README
DokuWiki removed from MVP core — now an opt-in plugin.
Acceptance: go build ./... pass, go test ./... pass (all packages).
2026-05-31 11:20:45 +08:00
mirivlad
d6f7f1a9b8
steps 8+9: worklog + FTS5 search
...
STEP 8 — Worklog:
- Migration 006: worklog_entries table (node_id, date, minutes,
approximate, billable, summary, details)
- WorklogService: Add, Get, Update, Delete, ListByNode, SumMinutes,
Report (text report generator with total time)
- CLI: verstak log add/list/report (verstak log --help for usage)
- GUI tab: entries list with date/time/approx, add form with
minutes+text+approx checkbox, total minutes counter
STEP 9 — FTS5 Search:
- FTS5 virtual table created lazily by search.Rebuild()
(works with/without FTS5 compiled in — graceful fallback)
- SearchService: Index, Remove, Rebuild, Search (with FTS5 MATCH)
- CLI: verstak index rebuild — builds search index from node titles
- GUI search bar uses /api/search?q= (FTS5 when available,
fallback to LIKE on node titles)
Acceptance: go build ./... pass, go test ./... pass (all packages).
2026-05-31 02:25:25 +08:00
mirivlad
9ee6df0d3f
feat: node section assignment for sidebar filtering + search fix
...
Backend:
- Migration 004: add 'section' column to nodes table
(NULL=inbox, values: clients/projects/recipes/documents/archive)
- Create(parentID, type, title, section) — section stored on root nodes
- ListRoots(includeDeleted, section) — filters by section
(section='inbox' returns nodes with NULL section)
- GET /api/nodes?section=X filters root nodes by section
- POST /api/nodes accepts 'section' field in body
Frontend:
- Sidebar separates 'НАВИГАЦИЯ' (virtual sections) from 'ДЕЛА' (real nodes)
- Each section loads only its own nodes: GET /api/nodes?section=clients etc.
- Creating from a section sets the section automatically
- Inbox shows only nodes with no section
- selectBySearch(id) closes result dropdown after selection
- All types shown in Russian (Дело, Заметка, Папка, etc.)
Acceptance: go build pass, go test pass (all packages),
manual: Pro projects section shows only project-nodes,
clients only client-nodes, inbox only unsectioned nodes.
2026-05-31 01:26:46 +08:00
mirivlad
168625671a
step 6 redesign: dashboard, sidebar sections, add menu, editor UX
...
Per 10-point UX spec:
- Contrast boosted (text #e4e4ef instead of #ccc)
- Dashboard view: badges, quick-actions, grouped sub-items/notes/files
- Notes tab filters by type=note, Files tab shows only files
- Tab placeholders: Actions, Worklog, Activity
- Single + Add button with dropdown menu (case/note/file/action/worklog)
- Sidebar navigation: Today, Inbox, Clients, Projects, Recipes, Docs, Archive
- Russian type labels (no raw CASE/note)
- Note editor: breadcrumb, title, readable-width textarea (720px)
- Wails-ready SPA: inline JS, fetch to /api/*, no external deps
2026-05-30 21:04:18 +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
mirivlad
69eb909d48
step 3: nodes repository + CRUD + CLI node commands
...
- types.go: TypeSpace/Case/Folder/Note/... + Slugify()
- node.go: Node struct, Meta, IsDeleted/IsRoot helpers
- repository.go: full CRUD (Create, Get, GetActive, ListChildren,
ListRoots, UpdateTitle, Move, SoftDelete) + Meta KV (MetaSet,
MetaGet, MetaList)
- node_cmd.go: thin wrappers around repository
- main.go: verstak node create/list/get/move/delete subcommands
- repository_test.go: 12 tests covering all CRUD paths
Acceptance: go build pass, go test pass (12 tests),
CLI create+list+get+move+delete all working.
2026-05-30 19:09:25 +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