diff --git a/AGENTS.md b/AGENTS.md index 76f1860..8287b92 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -27,6 +27,9 @@ 24. **GetWorklogEntryEvents column fix** — query used `e.details_json` but the column is `e.metadata`. Fixed to `COALESCE(e.metadata,'')`. 25. **"Посмотреть" button** — `openActivityTarget(ev)` navigates to the specific target: note tab + open note for `targetType=note`, files tab + `OpenFolder(targetPath)` for `file/folder`. 26. **End-to-end test** — `TestAcceptSuggestionWithEndToEnd` creates node, 3 activity events, accepts suggestion, verifies all 3 linked via `worklog_entry_events` + JOIN. +27. **WriteDebugLog binding** — `bindings_debug.go` writes frontend logs to `/.verstak/debug.log` for production GUI debugging. +28. **Journal regression tests** — `TestJournalFullRegression`, `TestSuggestionOnRepeatedActivity`, `TestManualWorklogEntry`. +29. **resolveActivityTarget helper** — pure function returning `{ nodeId, tab, noteId/fileId/targetPath }`, used by `openActivityTarget`. ## Key patterns - Always use explicit toggle icons (▸/▾) on expandable rows. @@ -36,6 +39,7 @@ - New worklog entries get `source=manual` via `Add`/`AddWithDate`; suggestion entries get `source=suggestion` via `AcceptSuggestionWith`. - **NEVER pass `[]string` through Wails v2 bindings** — always JSON-serialize to `string` first. Wails v2.12.0 silently drops slice arguments. - **Always wrap create-entry + link-events in a transaction** with pre-validation and post-commit verification to prevent orphan entries. +- Frontend debug logs in production: use `wailsCall('WriteDebugLog', msg)` → writes to `/.verstak/debug.log`. # Build instructions