A running log of substantive changes, so future work needs less re-discovery. Newest entries first. Dates are absolute.
Bug-fix + polish pass on the frontend (app/src/index.css plus copy tweaks).
- Themes were not switching (root cause).
index.cssused@theme { --color-x: var(--token) }(non-inline). Tailwind v4 resolves those at:rootand bakes the default (dark) values into the utilities, so overriding the tokens onbody.theme-*never reachedbg-*/text-*. Fix: switched to@theme inline— utilities now compile to the rawvar(--background)etc. that the body class overrides. Verified: prod CSS shows.bg-background{background-color:var(--background)}(novar(--color-background)left), and live Midnight→Parchment switching works. - Refreshed all 6 color schemes to cohesive "dark base + single accent" palettes (Midnight/slate, Parchment/paper, Nebula/violet, Ocean/blue, Forest/emerald, Sunset/coral). Renamed theme + font labels to writer-friendly names (dropped "Technical"/"Engine" wording).
- Heading buttons didn't change size + ghost title wasn't H2. There were no
.ProseMirror h1/h2/h3rules, and Tailwind preflight resets headings to inherit. Fix: added em-based heading typography (h1 2em / h2 1.5em / h3 1.25em) inindex.css. Verified rendered sizes 32/24/20 px at a 16px base. The default chapter title node is an empty<h2>, so its placeholder ("Title…") now shows at H2 size. - Other fixes: defined
--color-destructive/-foreground(thetext-destructive/bg-destructiveutilities were silently no-ops, so error text/box now renders red); defined the grammar-underline tokens--color-typo/--color-grammar(previously only in the unusedApp.css, so underlines were colorless); added elegant theme-aware scrollbars and code-block/inline-code/<hr>styling. - Added
.claude/launch.json(mnemoscript-web) so the web frontend can be previewed without Tauri. - Verified:
npm run build✓ and live preview screenshots (Midnight + Parchment).
2026-06-15 — Writer feature build (mind map, slash menu, image embed, PDF book) + backend persistence
Large feature pass turning the prototype into a real authoring tool. Four user-facing features, built on a persistence rewrite.
Why: the Rust backend (src-tauri/src/project.rs, lib.rs) already implemented full
disk persistence but the frontend never called it — App.tsx stored projects in
localStorage (~5 MB cap) and ProjectCreationModal created a mock project. Auto-save and
manual save persisted nothing. localStorage cannot hold images or large books.
Changes:
src-tauri/src/project.rsDocumentgaineddoc_type("text"|"mindmap", serde-renamed todocType, default"text") andorder: i32(default 0). Both#[serde(default)]→ oldproject.jsonfiles still load.Projectgainedauthor: Option<String>(#[serde(default)]) for the book cover.Document::new(title, content, doc_type, order)signature extended.- Added
Project::resolve_dir(project_id)helper (deduped the project-dir logic that was copy-pasted inDocument::save/load); documents now sort byorderthenupdated_at.
src-tauri/src/lib.rscreate_documentcommand now takes optionaldoc_type/order.- New command
import_image(project_id): native image picker (rfd) → copies the file into<project>/assets/<uuid>.<ext>→ returns the absolute path. Registered in the handler list.
src-tauri/tauri.conf.json: enabled the asset protocol (app.security.assetProtocol, scope$HOME/**,$APPDATA/**,$DOCUMENT/**) so on-disk images render viaconvertFileSrc.- Frontend:
- New
src/lib/api.ts— typed wrapper over every Tauri command, unwraps theApiResponse<T>envelope and throws on failure. - New
src/lib/assets.ts—toAssetUrl(path)(raw path → asset URL) andresolveImagesInHtml(html); used by the image node and the book compiler. types.ts:Documentnow hasdocType+order;Projecthasauthor.App.tsx: loads projects viaapi.listProjects()on startup; opening a project callsapi.loadProject(reads the documents/ folder); document creation callsapi.createDocument. Real auto-save (interval, persists when dirty) + manual save viaapi.saveDocument, using refs to avoid stale closures. localStorage now only holds UI prefs (theme, fonts, etc.).ProjectCreationModal.tsx: creates the project on disk viaapi.createProject(+ error state).Sidebar.tsx:onCreateDocument(title, docType); "New MindMap" creates amindmapdoc.Editor.tsx: removed the dead save props (manualSaveRequested/onSaveSuccess/…); persistence lives inAppnow.
- New
1. Slash "/" command menu (src/components/extensions/SlashCommand.ts, SlashMenu.tsx, extensions/slashItems.ts)
- Built on
@tiptap/suggestion. Trigger/, filter by title/keywords. - Items: Text, H1–H3, Bulleted/Numbered list, Quote, Code block, Divider, Image.
- Menu is a React component (
SlashMenu) mounted viaReactRenderer, positioned at the caret using the suggestionclientRect(same manual-positioning approach as the existing grammar popover / smooth caret — no tippy.js dependency). Keyboard nav (↑/↓/Enter/Esc).
- Custom node extending
@tiptap/extension-image. Stores the raw on-disk path insrc(portable in saved content) and renders via a node view that resolves the path withtoAssetUrl(Tauri asset protocol). /image→api.importImage(projectId)→ inserts the image. CSS:.editor-imageinindex.css.
@xyflow/react(React Flow 12). Custom editable node (double-click to rename, 6-color palette applied to selected nodes), drag, connect via handles, Del to remove, pan/zoom, MiniMap + Controls. Graph persists as JSON{nodes,edges}in the documentcontent(debounced) + Save button. Node CSS lives inindex.css(.mindmap-*).App.tsxroutesdocType === 'mindmap'docs to<MindMap>instead of<Editor>; the right formatting sidebar + word-count are hidden for canvases.
- Modal (File → "Compile to PDF Book"): book title / author / subtitle, cover + TOC toggles, a reorderable include-list of text chapters.
- Builds a self-contained book HTML (cover → TOC → chapters with
page-break-before) into a hidden iframe with print CSS (@pageA4, serif), theniframe.print()→ user picks "Save as PDF". Imagesrcpaths are resolved withresolveImagesInHtml.
@xyflow/react@12, @tiptap/extension-image@3.22.4, @tiptap/suggestion@3.22.4
(pinned to 3.22.4 to match the repo's exact-peer @tiptap/core@3.22.4; installed with
--legacy-peer-deps because @tiptap/extension-placeholder@3.26 muddies peer resolution — a
single @tiptap/core copy is confirmed in node_modules).
cargo check✓ ·tsc -b✓ ·npm run lint✓ ·npm run build✓.
- PDF TOC lists chapter titles without page numbers (a
window.printconstraint). - Mind maps are excluded from the PDF (would need offscreen React Flow → image snapshot).
- Asset-protocol scope is broad (
$HOME/**etc.) since projects can live anywhere under home; fallback plan if it ever misbehaves is to return base64 fromimport_image. - Old localStorage projects from before this change are not migrated (prototype data).