- resolveActivityTarget uses 'targetId'/'targetPath' for all types
(note, file, folder) instead of type-specific property names
- openActivityTarget for files: resolves the file node via
GetNodeDetail, navigates to its parent folder in the Files tab,
then auto-previews the file if it's a previewable type
- For root-level files (no parent_id): loads root items
- Removed spurious OpenFolder(targetPath) call that silently failed
because OpenFolder expects a node ID, not a filesystem path
selectNode() resets fileItems=[] and activeTab='overview'. Setting
activeTab='files' programmatically does not trigger the tab click
handler that calls loadFolder(), so the file tree stays empty.
Fix: explicitly call await loadFolder(selectedNode.id) in the files
branch of openActivityTarget.
Also: unified resolveActivityTarget return shape to always use
targetId/targetPath regardless of targetType.
- New cmd/verstak-gui/bindings_debug.go: WriteDebugLog(msg) appends a
timestamped line to the vault's .verstak/debug.log
- Frontend: console.log replaced with writeDebugLog() which calls
wailsCall('WriteDebugLog', ...) — works in production Wails builds
- Both acceptTodaySuggestion and acceptJournalSuggestion log eventIds,
events, and errors to the file
Tests added to suggest_test.go:
- TestJournalFullRegression: GetSuggestions -> verify eventIds match
events -> AcceptSuggestionWith -> verify all 3 linked via
worklog_entry_events + JOIN + GetWorklogEntryEvents
- TestSuggestionOnRepeatedActivity: first event accepted, new event
created -> GetSuggestions still returns suggestion for the new event
- TestManualWorklogEntry: CreateWorklogFull -> source=manual,
billable/approximate/details preserved, GetWorklogEntryEvents empty
Frontend:
- resolveActivityTarget(ev) pure function returning { nodeId, tab,
noteId/fileId/targetPath } based on targetType
- openActivityTarget(ev) uses resolveActivityTarget for navigation