Commit Graph

96 Commits (64e6c6f735b4afe0295958970906dd11240bfab9)

Author SHA1 Message Date
mirivlad 64e6c6f735 fix: trash file preview, visual CSS, virtual folder model
- Added resolveTrashPath() backend function: walks ancestor chain to find
  files inside deleted/moved folders (flat trash directory)
- Added TrashFsPath to TrashNodeDTO, computed during ListTrash via
  parent-to-child propagation of physical trash path
- Fixed visual CSS for trash rows: button reset (no white bg, transparent,
  inherit font/color), hover styles match app dark theme
- Root view filters out descendant nodes (only shows top-level items)
2026-06-05 17:05:35 +08:00
mirivlad 5257789a4d fix: trash duplicate path, journal tabs, today undefined, mouse back, inbox search
- Trash: removed duplicate fsPath display, folders/files open by clicking icon/name
- Trash: removed separate 'Open' button, only restore/delete right-aligned
- Trash: added ReadTrashFileContent binding + preview for files
- Trash: breadcrumb path under title, compact date display
- Journal: split into 'Предложения' + 'Журнал работы' tabs
- Journal: suggestions tab opens by default
- Today: fixed undefined in feed (null-guard on eventType/title)
- Today: improved event type label readability (blue badge style)
- Today: folder_deleted clicks navigate to trash
- Mouse Back: added mouseup fallback for Wails compat, handle button 3/4
- SearchNodes: case-insensitive with LOWER()
- Inbox assign: added search hint placeholder
2026-06-05 16:49:00 +08:00
mirivlad c512ada386 cleanup: remove stale frontend-dist assets, fix warnings 2026-06-05 16:21:21 +08:00
mirivlad ceee03959b cleanup: remove stale frontend-dist assets 2026-06-05 16:17:31 +08:00
mirivlad 2ed2ecf77a Today screen: tabs (feed, suggestions, in-progress, captured) + inbox sort/group
- Новый экран 'Сегодня' разбит на 4 вкладки: Лента, Предложения,
  В работе, Захвачено
- Лента отображает события за сегодня с кликабельными сущностями
- Предложения вынесены в отдельную вкладку (только предложения)
- В работе: изменённые файлы/заметки/действия за сегодня с сортировками
- Захвачено: захваченные элементы за сегодня с сортировками
- Неразобранное: сортировка по дате/имени/типу с направлением
- Неразобранное: переключатель 'Группировать по месту захвата'
- TodayScreen.svelte: новый компонент с 4 вкладками
- Новые i18n ключи для вкладок и сортировок
- Backend: ListTodayInProgress, ListTodayCaptures bindings
- Все переходы из вкладок ведут в соответствующее место программы
2026-06-05 16:17:22 +08:00
mirivlad c8aaf36533 fix: stabilize trash navigation and action icons 2026-06-05 14:41:40 +08:00
mirivlad 1fa009b1e2 feat: complete trash restore and batch actions 2026-06-05 12:43:30 +08:00
mirivlad 10b287de7b feat: aggregate journals across node subtrees 2026-06-05 12:37:25 +08:00
mirivlad 23f517dee3 feat: simplify inbox actions and group task tabs 2026-06-05 12:32:36 +08:00
mirivlad 6d15639b41 fix: normalize bare URLs in capture flow 2026-06-05 12:29:19 +08:00
mirivlad 56ef211418 chore: move app icons into frontend assets 2026-06-05 12:25:47 +08:00
mirivlad 91b5629e01 fix: open inbox artifacts by type 2026-06-05 08:06:06 +08:00
mirivlad 4755d3199d chore: update embedded gui assets 2026-06-05 07:51:00 +08:00
mirivlad 9e70e36f7f feat: add native clipboard capture bridge 2026-06-05 07:34:45 +08:00
mirivlad bcb093d453 feat: resolve inbox links separately 2026-06-05 07:33:10 +08:00
mirivlad 336037d887 feat: track capture context in inbox 2026-06-05 07:30:00 +08:00
mirivlad 6eaa4cda49 feat: assign and delete inbox artifacts 2026-06-05 02:15:27 +08:00
mirivlad a96a316883 feat: capture files and images in inbox 2026-06-05 02:06:21 +08:00
mirivlad 326f6f283d feat: capture clipboard links in inbox gui 2026-06-05 01:55:38 +08:00
mirivlad 44d0be2649 feat: add text and url inbox capture 2026-06-05 01:46:22 +08:00
mirivlad d6ef3a973a feat: model inbox capture artifacts 2026-06-05 01:40:08 +08:00
mirivlad 2e86229350 fix: restrict inbox to captured artifacts 2026-06-05 01:35:27 +08:00
mirivlad cc83cd3476 feat: expose trash in gui 2026-06-05 01:05:57 +08:00
mirivlad 035f877280 feat: add interactive inbox view 2026-06-05 00:59:57 +08:00
mirivlad 02d68ca3f4 feat: edit suggestions before accepting worklog 2026-06-05 00:53:13 +08:00
mirivlad eb6a861310 feat: edit and delete worklog entries 2026-06-05 00:48:12 +08:00
mirivlad cc59f928a8 test: harden file manager regressions 2026-06-04 19:44:28 +08:00
mirivlad cb6c06fdc5 fix: style workspace settings actions 2026-06-04 19:34:03 +08:00
mirivlad cc157a2d36 fix: stabilize settings icons and back label 2026-06-04 07:47:40 +08:00
mirivlad c40d8c9dd3 fix: show sync warnings in settings 2026-06-04 03:53:17 +08:00
mirivlad 7e709e140d build: refresh embedded gui assets 2026-06-04 03:49:12 +08:00
mirivlad e2aad19cc4 fix: avoid outgoing ops during remote template apply 2026-06-04 03:36:44 +08:00
mirivlad a526661825 docs: align vault storage documentation with code 2026-06-04 03:32:02 +08:00
mirivlad 58795b66b2 fix: keep default templates and plugins folder working 2026-06-04 03:28:32 +08:00
mirivlad 9d14ba50af test: restore vault and worklog test baseline 2026-06-04 03:25:04 +08:00
mirivlad a69dc845e6 fix: vault init on startup; add nil guards to all bindings; fix SA_ONSTACK signal crash; deduplicate settings button; add i18n for vault error 2026-06-04 00:37:14 +08:00
mirivlad f92394e3d7 feat: settings window polish, sync widget fix, dark form controls
- Fix: settings overlay uses on:click|self so sidebar clicks don't close it
- Fix: openSettings(section) supports opening at specific tab
- Fix: 'Настроить' opens Settings → Синхронизация instead of Общие
- Style: dark theme select with custom arrow, global :global() CSS
- Style: settings cards, section descriptions, button/layout polish
- Style: settings gear buttons (icon-button pattern, 32px, soft hover)
- Style: settings sidebar with disabled stubs, consistent icons
- i18n: add generalDesc, workspaceDesc, appearance, localization keys
2026-06-03 23:09:40 +08:00
mirivlad e30a75c5a0 fix: openActivityTarget navigates to parent folder and previews files
- 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
2026-06-03 17:32:18 +08:00
mirivlad 4ec03c849f fix: openActivityTarget now loads fileItems before showing Files tab
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.
2026-06-03 17:23:42 +08:00
mirivlad 3e55b08e6f feat: WriteDebugLog binding writes frontend logs to <vault>/.verstak/debug.log
- 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
2026-06-03 17:06:17 +08:00
mirivlad 9338b0a851 test: add journal regression, repeated activity, manual entry tests + resolveActivityTarget helper
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
2026-06-03 16:49:30 +08:00
mirivlad b42aa35ee8 fix: bypass Wails v2 []string marshalling via JSON.stringify + end-to-end test
Root cause: Wails v2.12.0 cannot reliably marshal []string arguments
from JavaScript to Go when called through positional binding.
The event IDs array arrived empty on the Go side, causing no
worklog_entry_events INSERTs.

Fix:
- AcceptSuggestionWith now accepts eventIDsJSON (string) instead of
  eventIDs ([]string). Frontend passes JSON.stringify(eventIds).
- Backend json.Unmarshal into []string before validation.
- Pre-insert validation: each eventID checked in activity_events.
- Atomic tx: entry create + linking in single Begin/Commit.
- INSERT (not INSERT OR IGNORE) — failure is a hard error.
- Post-commit verification: JOIN COUNT(*) must match len(eventIDs).
- End-to-end test: TestAcceptSuggestionWithEndToEnd creates a node,
  3 activity events, accepts suggestion, verifies all 3 linked.

Other changes:
- GetWorklogEntryEvents: fixed column name (details_json -> metadata).
- openActivityTarget(ev): new function for 'Посмотреть' button that
  navigates to specific note/file/folder instead of just opening node.
- All 'openNodeById(ev.nodeId)' in event contexts replaced with
  'openActivityTarget(ev)'.
2026-06-03 16:00:17 +08:00
mirivlad 21a595c3ce fix: transaction-safe AcceptSuggestionWith + safe eventIds fallback + debug logging
Root cause: s.eventIds may be undefined in JavaScript even when s.events
has data (Wails v2 marshalling of []string in nested struct response).
On calling AcceptSuggestionWith(eventIDs []string), empty array reached Go,
no INSERTs executed, events silently lost.

Changes:
- Frontend: extractEventIds() fallback — s.eventIds || s.events[].id || []
- Frontend: console.log debug for eventIds/events in accept handler
- Backend: AcceptSuggestionWith wrapped in tx (Begin/Commit/Rollback) so
  entry creation + event linking is atomic
- Backend: AddWithSourceTx method for transaction-aware insert
- Backend: buildEntry helper extracted
- Backend: fmt.Printf debug logging for received eventIDs + link count
- Backend: verification query after commit
- Cleanup: removed stale frontend-dist assets, .gitignore build.log
2026-06-03 15:10:25 +08:00
mirivlad 7076980954 fix: AcceptSuggestionWith uses flat fields to avoid Wails marshalling issues; human-readable event labels
- AcceptSuggestionWith now accepts nodeID, summary, minutes, date, eventIDs
  as separate args instead of the entire Suggestion struct (Wails v2 skips
  nested struct fields during JS→Go marshalling)
- Error handling: event link failures now return an error instead of silent ignore
- Event type labels in suggestion detail and journal row detail now use
  eventLabel() which maps snake_case types to human-readable i18n labels
  (e.g. note_updated → 'Заметка изменена')
- Added missing event labels: note_deleted, node_deleted, folder_moved,
  action_created, action_done, worklog_added
2026-06-03 12:35:13 +08:00
mirivlad fd99dd4f5c feat: worklog source field, suggestion logic fix, modal form, activity navigation
- Add source column to worklog_entries (migration 014): manual/suggestion/unknown
- GetSuggestions now excludes only events linked in worklog_entry_events,
  not entire nodes — repeated activity same day now produces suggestions
- Manual entry form replaced with '+' button + modal dialog
- Source display shows correct origin (manual/suggestion/unknown/no-events)
- Include-children checkbox hidden when no node selected
- Activity events navigate to specific notes/files instead of just case
- Expandable row reactivity fixed (journalRows/worklog reassignment)
2026-06-03 12:27:50 +08:00
mirivlad 1472bb3e6f feat: journal UX overhaul — picker, export dialog, events, readability
- Sidebar i18n: added missing nav.journal to backend ru.json
- Export: SaveWorklogReport binding with native SaveFileDialog + os.WriteFile
- Filter: better IncludeChildren label with disabled tooltip
- Filter: renamed billable→К оплате, approximate→Тип времени with hints
- worklog_entry_events table (migration 013) linking entries to activity events
- Suggestion: EventIDs + Events details, expandable cards with timestamps
- Journal rows: expandable with details, source, linked events
- Contrast: improved readability for dates, timestamps, hover states
- i18n: added worklog.*, journal.*, suggest.* keys to ru.js/en.js
2026-06-03 11:24:59 +08:00
mirivlad d34100e2ed feat: node search picker, ByNode grouping fix, PDF export
- node picker: Search/Path on Repository, SearchNodes binding,
  debounced search dropdown showing title + full path
- ByNode summary groups by nodeID with NodePath as label (not NodeTitle)
- PDF export for worklog reports with embedded DejaVuSans fonts
- ExportWorklogPDF binding + button on Journal screen
- Removed unused Section field from ReportFilter
- ListReport now calls BuildReportPaths so nodePath is available
- go.sum: +github.com/signintech/gopdf dependency
2026-06-03 10:56:13 +08:00
mirivlad 5732264fc5 fix(step16.1): review fixes — acceptance, filters, sorting, export
- Remove dead acceptSuggestion, unify into refreshAfterSuggestion()
- Journal: nodeID picker, includeChildren only with selected node
- Journal: billable/approximate filters (all/yes/no selects)
- Summary: ByDay sorted by date desc, ByNode by minutes desc
- CSV: proper encoding/csv writer (was manual fmt.Sprintf)
- Markdown: escape pipes and newlines via escMD()
- After suggestion: refresh suggestions + count + worklog + journal
- Add GetNodeTitle binding
- i18n: common.all/no/date/search
2026-06-03 10:30:48 +08:00
mirivlad c25e75f839 Step 16.1: global worklog dashboard + conservative suggestions
- Fix date timezone: worklog.Add uses local date (was UTC)
- Conservative suggestion estimator:
  - burst detection (10min window), time spread analysis
  - 5-30 min range, 60+ only with strong evidence
  - confidence levels: low/medium/high with reason
- worklog/report.go: ReportFilter, ListReport, Summary, ExportCSV, ExportMarkdown
- Expanded WorklogDTO: date, details, approximate, billable, nodeTitle
- New bindings: CreateWorklogFull, ListWorklogReport, WorklogSummary, Export*
- New system section 'Журнал' in sidebar with badge (suggestion count)
- Global journal screen: filters (date range, includeChildren), table, summary
- Suggestions shown on Today dashboard + Journal screen + per-node worklog tab
- Suggestion cards: editable minutes, confidence display, apply/open buttons
- i18n: all new keys in ru + en
2026-06-03 09:56:17 +08:00
mirivlad 57d13c9506 feat: activity-based worklog suggestions (Step 16)
- Suggestion struct with nodeId, nodeTitle, summary, suggestedMin
- GetSuggestions binding: analyzes today's activity events, groups by
  node, skips nodes with existing today's worklog, generates summary
- AcceptSuggestion binding: creates worklog entry from suggestion
- HasTodayEntries helper on worklog.Service
- Suggestions panel in Worklog tab with Apply button
- i18n: worklog.suggestions / worklog.apply (ru + en)
2026-06-03 09:31:40 +08:00