Skip to content

Misc features - #21

Merged
oksbwn merged 18 commits into
masterfrom
misc_features
Aug 9, 2026
Merged

Misc features#21
oksbwn merged 18 commits into
masterfrom
misc_features

Conversation

@oksbwn

@oksbwn oksbwn commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

feat(export): standardized export engine, downloads manager & audit remediations

Summary

Refactors the export system into a centralized ExportManager with persistent SQLite history tracking, adds direct image/CSV exports for diagram and table components, introduces a full Downloads & Export History UI view, and addresses all findings identified during the branch audit.

Key Changes

1. Backend & IPC Infrastructure (electron/)

  • Central Export Engine (ExportManager.cjs): Standardized execution pipeline for PDF, Note Package (.nly), Workspace ZIP archives, and media/diagram exports.
  • SQLite History Storage (exportHistoryStore.cjs): Workspace-isolated .notes-app/export-history.db database with WAL mode, indexing, and case-insensitive path uniqueness.
  • Clean IPC Surface (exportHistoryIpc.cjs): Exposed exports:* IPC suite and removed legacy documents:download-pdf handler.

2. Frontend Services & Downloads UX (src/)

  • Downloads View & Popover (DownloadsPage.jsx, DownloadsPopover.jsx): Added searchable/filterable export history view, TitleBar popover widget, and Ctrl+J global shortcut.
  • Direct Table & Diagram Downloads (exportUtils.js, tableUtils.js): Support high-DPI PNG rendering (svgElementToPngDataUrl, tableElementToPngDataUrl) and CSV generation for tables and diagrams.
  • Pure CSS Link Actions (renderUtils.js): Replaced React portal link popover with pure CSS .markdown-link-popover.

3. Audit Remediations & Bug Fixes

  • Fixed ReferenceError: saveToDownloads is not defined in MediaPreviewPane.jsx.
  • Restored PDF and Web site HTML rendering pipelines for workspace ZIP exports.
  • Fixed duplicate toast notifications on download completion.
  • Ensured .notes-app folder is strictly excluded when "Include .notes-app metadata" is unchecked during workspace ZIP export.
  • Added missing pathToFileURL import in ExportManager.cjs.

Verification

  • Automated Tests: 79/79 test files passed (387 tests).
  • Manual Verification: Tested single PDF downloads, Note Package exports, workspace ZIPs (Raw, PDF, Web), table CSV/PNG exports, and history persistence.

oksbwn added 18 commits August 8, 2026 10:00
- resolve file:// URIs and relative asset paths against active workspace root
- convert blob/http sources to data URIs for direct silent saving into Downloads folder
- emit app:download-complete and app:toast across all media and diagram downloads
- report exact written byte sizes to SQLite export history
Route all media, diagram, table, and file downloads through ExportManager.

Unify hover popovers with icons, translucent 1px vertical dividers, and dark glassmorphic styling across Tables, Mermaid, Excalidraw, Draw.io, Images, and Links.
- Target diagram SVG in MermaidBlock instead of Lucide pencil icon
- Fix table popover text color for theme contrast
- Support plaintext/urlencoded data URLs in ExportManager for CSV export
- Add XHTML tag sanitization and vertical buffer to table image export
- Expand table action bar with direct Download Image/CSV buttons
… paths

- Move link action popover to pure CSS wrapper to eliminate flickering
- Resolve non-markdown file links and decode URI paths for downloads
- Handle missing export file sources gracefully in ExportManager
- Centralize export handling in ExportManager with SQLite history persistence
- Add PDF, Web HTML, note package, and ZIP workspace export pipelines
- Support high-DPI image and CSV exports for tables and diagrams
- Add Downloads page, titlebar popover, and Ctrl+J shortcut
- Fix pathToFileURL import, duplicate toast notifications, and .notes-app exclusion
@oksbwn
oksbwn merged commit 0b17f54 into master Aug 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant