4.8 KiB
4.8 KiB
Session summary
Bugs fixed (this session)
- webkit2_41 build tag — binary wouldn't start without it. Added to build instructions.
- Sidebar refresh —
reloadTreePreservingExpandedpatches children in-place so expand/collapse state stays intact. - Context menu off-screen — changed to
position: fixedwith cursor coordinates. - "Show in explorer" only for folder types —
OpenFolderin backend falls back to file record path forTypeFilenodes. - Context menu not closing on action —
handleShowInFoldercallscloseMenu(). - Wrong folder when opening file's parent folder —
OpenFolderchecksn.FsPath == ""for TypeFile and uses first file record path. - Tab highlight not updating visually — was using
class={tabClass(tab.id)}which didn't trigger reactive class updates in Svelte. Switched toclass="tab" class:active={activeTab === tab.id}. - Journal table expand/collapse — added explicit ▸/▾ toggle column so it's clear rows are expandable.
- Per-node worklog entries — made entries expandable with ▸/▾, showing details + billable/approximate tags.
- Manual worklog entry form — converted inline form to modal dialog ("+ Добавить запись") with all fields: date, summary, minutes, details, billable, approximate.
- "С подзадачами" → "Учитывать вложенные дела" — renamed, now hidden when no node selected.
- Filter/export layout — split into separate "Фильтры" and "Экспорт отчёта" sections with headings.
- Suggestion events — added "Показать в проводнике" button for file-type events in suggestion detail.
- Removed duplicate i18n keys in
ru.js(worklog.suggestions, worklog.apply). - Removed unused CSS (
.journal-filters,.wl-meta,.worklog-form). - Added
openNodeFolder(nodeOrId)— accepts both string ID and node object. - Added
resetJournalFilters()— resets all filters and reloads. - Source field — added
worklog_entries.sourcecolumn (migration 014). Values: manual, suggestion. Old entries default to 'unknown'. - Suggestions now use worklog_entry_events instead of
HasTodayEntries— only events already linked to worklog entries are excluded. Repeated activity on the same node today now produces new suggestions. - Activity target navigation — clicking activity events for notes opens the note tab and loads the specific note. File events open the files tab.
- Source display — detail sections now show accurate source: "Ручная запись", "Из предложения", "Из предложения, но связанные события отсутствуют", or "Источник неизвестен".
- Wails
[]stringmarshalling bug — Wails v2.12.0 silently drops[]stringpositional args from JS→Go. Fix: pass all string arrays asJSON.stringify()→string→json.Unmarshalon Go side. - Event link validation —
AcceptSuggestionWithpre-checks each eventID againstactivity_events, uses plainINSERT(notINSERT OR IGNORE), and verifies with JOINCOUNT(*)after commit. - GetWorklogEntryEvents column fix — query used
e.details_jsonbut the column ise.metadata. Fixed toCOALESCE(e.metadata,''). - "Посмотреть" button —
openActivityTarget(ev)navigates to the specific target: note tab + open note fortargetType=note, files tab +OpenFolder(targetPath)forfile/folder. - End-to-end test —
TestAcceptSuggestionWithEndToEndcreates node, 3 activity events, accepts suggestion, verifies all 3 linked viaworklog_entry_events+ JOIN.
Key patterns
- Always use explicit toggle icons (▸/▾) on expandable rows.
CreateWorklogFullsupports all fields: nodeID, summary, details, date, minutes, approximate, billable.openNodeFolder(id)accepts a string ID or a node object.GetSuggestionsfilters out only events already inworklog_entry_events, not entire nodes.- New worklog entries get
source=manualviaAdd/AddWithDate; suggestion entries getsource=suggestionviaAcceptSuggestionWith. - NEVER pass
[]stringthrough Wails v2 bindings — always JSON-serialize tostringfirst. 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.
Build instructions
GUI binary (Wails v2)
# From project root:
cp -r frontend/dist/* cmd/verstak-gui/frontend-dist/
go build -tags "webkit2_41 desktop production" -ldflags="-s -w" -o build/verstak-gui-linux-amd64 ./cmd/verstak-gui/
Server binary
go build -ldflags="-s -w" -o build/verstak-server-linux-amd64 ./cmd/verstak-server/