Commit graph

85 commits

Author SHA1 Message Date
avi
0589dd0396 chore(release): bump to 0.1.10 v0.1.10 2026-10-04 13:11:44 -05:00
avi
3e0c7f69bf chore(release): bump to 0.1.9 2026-10-04 13:09:55 -05:00
avi
12977e1a77 fix(updater): run the handoff script via systemd-run so it survives the app's scope
On uwsm/Hyprland the app runs in a systemd scope cgroup; a detached child is
swept away when the app quits, which killed the swap mid-flight on every
in-app update attempt. systemd-run gives the installer its own transient
unit that outlives the scope; detached spawn stays as the non-systemd
fallback.
2026-10-04 13:09:55 -05:00
avi
c064e3aab1 chore(release): bump to 0.1.8 v0.1.8 2026-10-04 11:34:10 -05:00
avi
283bb7c772 feat(settings): the storage folder now decides where books are saved — new books, .md imports, and the export dialog default all land there (was: always Documents); label clarifies it covers books + snapshots 2026-10-04 11:34:10 -05:00
avi
e794f241ba chore(release): bump to 0.1.7 v0.1.7 2026-10-04 10:03:04 -05:00
avi
1f001dc306 fix(updater): narrate the handoff to ~/.config/Folio/update.log + safe tree flatten
- installer script now logs every step (wait, extract, flatten, swap, relaunch)
  to a persistent log so a failed update is diagnosable after the fact
- flatten the electron-builder nested dir by adopting the dir itself; the old
  'mv NEW/* ' glob missed dotfiles and could leave a half-moved tree (prime
  suspect for the two in-app update failures)
- mkdir failure aborts with relaunch of the old app instead of falling through
2026-10-04 10:03:04 -05:00
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