Commit graph

78 commits

Author SHA1 Message Date
avi
9a1202f0fc chore(release): bump to 0.1.6 v0.1.6 2026-10-02 15:06:27 -05:00
avi
14cad71688 feat(recents): right-click (two-finger tap) on a recents row opens a book menu — Open, Rename, Show in Folder, Hide/Unhide, Delete (with confirm); renderer claims the event synchronously so the generic spelling/edit popup is skipped for recents rows 2026-10-02 15:06:27 -05:00
avi
8745f88c2c chore(release): bump to 0.1.5 v0.1.5 2026-10-02 14:32:42 -05:00
avi
3e6962eda9 feat(recents): Hide action on recents rows — list-only, never touches the book on disk; 'Hidden (n)' disclosure to unhide; re-opening a book un-hides it; hidden entries dropped from Open Recent menu 2026-10-02 14:30:04 -05:00
avi
da9024fa64 chore: remove non-Folio cruft (RAM-verification boilerplate, empty notes file) 2026-10-01 16:17:36 -05:00
avi
8e371dd827 chore(release): bump to 0.1.4 v0.1.4 2026-10-01 14:52:42 -05:00
avi
d052c3abc9 fix(updater): verify download integrity (retry x3, byte-count, full gunzip) — truncated updates now error instead of silently no-oping 2026-10-01 14:52:42 -05:00
avi
170ef52154 chore(release): bump to 0.1.3 v0.1.3 2026-10-01 13:00:53 -05:00
avi
4af49f8f3c fix(export): save dialogs start with absolute path and remember last export folder (GTK name-wipe bug) 2026-10-01 13:00:53 -05:00
avi
d249d0f00d chore(release): bump to 0.1.2 v0.1.2 2026-09-23 08:30:47 -05:00
avi
19255e07c8 feat(books): rename book titles; click-to-select recents with Rename/Delete actions 2026-09-22 20:13:50 -05:00
avi
6479656680 feat(ui): Search+Full Book nav row under Home bar; search matches chapter titles 2026-09-22 17:18:16 -05:00
avi
b453681898 refactor(ui): remove redundant sidebar Settings button (File > Settings… remains) 2026-09-22 17:02:59 -05:00
avi
18eb25b70d refactor(menu): collapse five export items into one Export submenu 2026-09-22 16:58:29 -05:00
avi
76222fc1b2 chore(release): bump to 0.1.1 v0.1.1 2026-09-19 18:49:39 -05:00
avi
f1ee73f2a1 refactor(renderer): Step 7 plain state object; fix(export): ZIP emits Markdown for native chapters 2026-09-19 18:21:48 -05:00
avi
b80aa798b2 fix(backup): exclude snapshots from recovery copy, harden change walk
Migration recovery backups no longer re-copy Folio-Backups (up to 21x bloat). bookChangedSince tracks visited dev:ino so a symlink loop in the book cannot wedge the main-process interval tick. Snapshot toggle check aligned to === false; drop dead home-shortening branch in Settings.
2026-09-19 17:20:31 -05:00
avi
542a545c0d feat: spellcheck menu, typewriter mode, file associations, updater hardening
English spellcheck suggestions with Add-to-dictionary in the native context menu plus a Settings toggle. Typewriter caret-centering mode. OS file associations for .md/.txt and Open File wording. Updater: release URL surfaced, single progress listener, two-byte tarball check, installer wait guard. Search/installer test suites registered; chapter-list layout polish; ignore KDE .directory files.
2026-09-19 16:38:17 -05:00
avi
1413e73015 feat(backup): autosave backend, continuous snapshots, and Settings modal
Background autosave toggle plus whole-book snapshots (default <book>/Folio-Backups, configurable location, retention, interval) with a one-minute change check in the main process. New Settings modal (sidebar, Ctrl+, , File menu) exposes autosave, snapshots, folder picker, and Snapshot now.
2026-09-19 16:37:56 -05:00
avi
341b89cd8a fix(renderer): chapter reorder follows selection, drag autoscrolls list
Keyboard reorder (Alt+Up/Down) restores focus and scrolls the moved row into view so repeated moves keep working. Pointer drags autoscroll near the list edges and show drop position.
2026-09-19 16:37:45 -05:00
avi
ada5eee679 feat: open Markdown files and in-app updater
Markdown:
- File > Open Markdown File... and welcome-screen 'Open .md' import
  one or more .md files as new books (named after first H1 or the
  filename; originals never modified, collision-safe folder names).
- Book dirs and .md files passed on the command line or via desktop
  file associations now open directly; single-instance lock forwards
  second launches to the running window.

Updates:
- File > Check for Updates... and welcome-screen 'Update' button:
  queries the Gitea releases API, one-click installs a newer release
  into ~/.local/share/Folio via a detached swap script that waits for
  app exit, keeps the old tree until the swap succeeds, and relaunches.
  Download is gzip-verified and restricted to the trusted release host.
  No root, no reinstall.

Tests: 19 new assertions in tests/run-update-import-test.mjs (wired
into npm test); full suite green, tsc clean.
2026-09-19 00:02:58 -05:00
avi
9aebde4c35 feat(save): autosave to DOCX by default
- add autoExportDocx() in src/main/index.ts:590 to refresh full-book and per-chapter .docx on every save
- hook saveChapterDoc, saveChapter, create/rename/delete/duplicate/restore/reorder/setColor to auto-generate DOCX in book folder
- primary autosave remains native JSON (folio-doc) for fidelity, DOCX is derived export
- fixes duplicate title in God is Decentralized chapter (remove H2 duplicate, chrome title is canonical)
2026-09-07 21:52:31 -05:00
avi
38da218e33 feat(menu): add Save As to File menu with Ctrl+Shift+S
- Add 'Save As...' item to native File menu, right under Save
- New IPC event folio:save-as-requested routes through preload to renderer
- Wired in index.ts to call saveChapterAs with current chapter ID
2026-09-05 13:37:24 -05:00
avi
04c6540e4c feat(renderer): add Save As button to chapter header
- Add 'Save As' button next to Save in the chapter writing view
- Exports current chapter as Markdown to a user-chosen file location
- New IPC handler folio:saveChapterAs shows OS save dialog
2026-09-05 12:44:07 -05:00
avi
1a1d69936c fix(renderer): normalize editor line-height to 1.0; add chapter-view export dropdown
- Set .folio-prose.ProseMirror line-height from 1.7 to 1.0 to fix
  excessive spacing between paragraphs and blockquotes
- Add PDF/DOCX/ODT export dropdown to the chapter writing view header,
  matching the Full Book view's export workflow
- Wire chapter export dropdown toggle, menu selection, and close-on-outside-click
2026-09-05 12:21:16 -05:00
avi
8e49d2769a fix(editor): left-align chapter writing surface 2026-08-31 12:42:47 -05:00
avi
40a2fb305e feat(renderer): add fluid chapter reorder motion 2026-08-31 00:57:08 -05:00
avi
a2d2d4858b refactor(renderer): split book.ts into 12 focused modules
- Extract chapter-list, editor, exports, full-book, search, toolbar, ui, welcome, comments, types
- Add shared native-doc-core.ts for document contracts
- Update main process, menu, and native-doc for new structure
- Theme and CSS updates
2026-08-29 20:16:12 -05:00
avi
b5db582538 refactor(ipc): unify 41 handlers into handleIpc wrapper; improve error logging and non-Error handling 2026-08-24 22:45:59 -05:00
avi
3afb43d4ed fix(export): unify title-injection logic across DOCX/ODT and PDF; remove drift 2026-08-24 22:10:23 -05:00
avi
4ce0a5ebfb refactor(conversion): centralize format contracts in native-doc.ts; document lossiness matrix 2026-08-24 22:00:12 -05:00
avi
90b7f2cf76 refactor(ids): co-locate ID generation and validation in ids.ts to prevent contract drift 2026-08-24 21:47:37 -05:00
avi
23cef06580 refactor(persistence): extract shared JSON I/O into json-store.ts; add parent-dir creation 2026-08-24 21:27:04 -05:00
avi
43a03272bf refactor(tests): centralize test harness boilerplate into bundle.mjs helper 2026-08-24 21:15:06 -05:00
avi
1729f7c236 Require libasound2 in deb dependencies for barebones desktop installs 2026-08-24 20:29:18 -05:00
avi
a3f366ca60 Fix migration/backup partial-failure residue, theme selector fallback, dialog promise orphaning, print table multi-block cells 2026-08-24 19:53:27 -05:00
avi
ed3f3cd84b Harden IPC handlers: error protocol on exports/imports/settings, menu null-title crash fix, recents dedupe by path, no silent permanent book delete 2026-08-24 19:49:48 -05:00
avi
c5c7c80b81 Fix data-loss and security bugs: chapter id validation, reorder merge semantics, autosave cross-write after drag, listener re-registration, delete flush, failed-load handling 2026-08-24 19:44:40 -05:00
avi
b74cfe98ab Add Neon and Meridian glass themes, bundled fonts, configurable recovery backup location, autosave and UI polish 2026-08-24 18:58:16 -05:00
avi
aaa491424d Add Undo for book and chapter deletions
- Show an Undo toast after deleting a book from Home; Undo restores the
  folder from the system trash (XDG .trashinfo, URL-decoded path match).
- Chapter delete/cut now snapshots the chapter (title, color, content,
  position) and offers Undo to restore it in place.
- Add reusable showUndoToast/hideUndoToast and #undoToast UI + styles;
  expose restoreBook/restoreChapter over the preload bridge.
- Drop the now-redundant 'cannot be undone' confirm on chapter delete and
  the inaccurate 'permanently removes' wording on book delete.
2026-08-20 18:12:33 -05:00
avi
5ac7cdb593 Fix blank editor on book open and add home delete + auto-folder new book
- Auto-select the first chapter when a book opens so the editor is no
  longer left on the placeholder (was the main `all I see is the title`
  symptom).
- Stop markdownToNative from emitting text nodes with empty content and
  defensively strip them in setEditorDoc; ProseMirror rejects such nodes,
  which made editor.commands.setContent silently empty the whole editor.
- Home screen: delete a book (sent to trash, recoverable) and create a new
  book in a folder named after it under ~/Documents.
- Add self-test coverage for new book + delete.
2026-08-20 17:35:13 -05:00
avi
80898c2e2a Add Electron Builder distribution config for Folio
- Configure AppImage (primary) + Debian .deb (secondary) into releases/.
- White Folio app icon, Office category, io.atitlan.folio appId, folio
  executable; no file associations (none invented).
- Bundle tests/selftest-scenario.js so the packaged binary can be exercised
  in place via FOLIO_SELF_TEST (inert during normal launches).
2026-08-20 15:39:37 -05:00
avi
aad1a9332a Add in-app search across chapters and switch to manual save
- Search: a 'Search' button in the sidebar footer (or Ctrl/Cmd+F) opens a
  modal that scans every chapter, lists matches grouped by chapter with
  highlighted snippets, and jumps to and scrolls the match on click. Includes
  a 'Match case' toggle.
- Manual save: remove the per-keystroke auto-save; a chapter is only persisted
  via the new Save button or Ctrl/Cmd+S. Switching chapters or closing the book
  with unsaved edits now prompts to save first.
- Extend the packaged self-test to exercise both features.
2026-08-20 15:35:28 -05:00
avi
3052e335a3 Add white/black Folio icon variants and theme-aware in-app icon
- Recolor the in-app glyph (Design B) to a solid white master and generate a
  black variant; the desktop/app icon set (build/icons) is now the white
  master at all sizes (verified bundled white in the AppImage/deb)
- In-app icon switches with the existing data-theme: black in Light mode
  (visible on the light panel) and white in Dark mode (visible on the
  near-black panel); the desktop/application icon stays white
2026-08-20 13:02:19 -05:00
avi
beaf8715d8 Add whole-book vs selected-chapters export workflow
- Export menu (PDF/DOCX/ODT) opens a workflow to export the entire book or
  only selected chapters, with a canonical-order checklist + Select/Clear All
- Selected exports pass an ordered chapter list through the shared pipeline so
  output follows book order (not click order); empty selection is rejected
- Filenames use a ' - Selected Chapters' suffix for partial exports
- PDF renders only the chosen chapters into the print container; DOCX/ODT build
  from the selected chapters in order
2026-08-20 12:20:23 -05:00
avi
7037cd9fc0 Improve the export pipeline (shared ordering + chapter page breaks)
- buildDocx/buildOdt now accept an explicit ordered chapter list, making that
  list the single source of truth for export ordering (defaults to whole book)
- Emit real page breaks between chapters in DOCX, with none before the first
- Unify the DOCX/ODT handlers into one exportOffice pipeline (ODT still built
  from the same DOCX via LibreOffice)
2026-08-20 11:44:54 -05:00
avi
7bdddf32b2 Add document/editor zoom controls
- Persist an app-wide zoom percentage (not per book) and apply it only to the
  writing view (.editor-panes) so the sidebar/navigation stay fixed size
- Add a [-] [100%] [+] control to the chapter and Full Book headers, with a
  click-to-reset level button
- Route Ctrl/Cmd+=, Ctrl/Cmd+-, and Ctrl/Cmd+0 to zoom in/out/reset,
  intercepting the browser's native zoom
2026-08-20 11:25:28 -05:00
avi
946a2967db Add chapter color customization
- Store an optional accent color on each ChapterEntry so it persists with the
  chapter across switching, reordering, close/reopen, and restart
- Add a per-row color button that opens a palette popover (assign / change /
  remove) and shows a small color dot in the sidebar, readable in Light/Dark
- Expose setChapterColor through the main/preload IPC bridge
2026-08-20 11:21:14 -05:00
avi
786a65ae2a Replace markdown editor with native Tiptap editor and add Home navigation
- Migrate renderer from md-editor/md-format to a Tiptap-based native editor
  (native-doc pipeline: native-doc, markdown-to-native, native-to-markdown,
  native-assembly, migration, backup)
- Use pointer-event-based chapter reordering with grab/grabbing cursors to
  avoid the Wayland prohibited-drop cursor while preserving reordering
- Add a persistent Home button that closes the open book and returns to the
  Folio library/welcome screen
- Update app icons, package deps, theme styles, and tests
2026-08-20 11:12:17 -05:00
avi
0df26d4ce6 Match the editor's spacing in PDF/DOCX/ODT and fix the toolbar dropdown
Exports now use the same typography as the Full Book editor — Georgia
serif at 12pt, 1.7 line spacing, and a blank-line gap between paragraphs -
so the on-screen editor and every exported format look consistent. DOCX/
ODT also gain a chapter break before each chapter after the first.
2026-08-18 18:39:21 -05:00