10 Commits

Author SHA1 Message Date
landon b31ac0c6c8 Offer to adopt an enclosing git repository when opening a subfolder
When a workspace folder isn't a git repo itself but sits inside one, ask
the user to confirm before using the parent repository for Sync, rather
than silently operating on whichever repo git walks up to find.

- gitsync: add repo_root() via `git rev-parse --show-toplevel`
- app: detect_repo() distinguishes repo-root / parent-repo / no-repo;
  a confirmation dialog adopts or declines the parent repo; git_init
  tracks repo_root and clears any pending prompt
- Sync button hover names the enclosing repo when one is adopted

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-28 11:58:47 -05:00
landon 496bbfd298 Improve readability: brighter left-pane text and an editor contrast slider
The left file pane now boosts its widget text colours (toward white in dark
mode, black in light mode) so file names stay legible against the panel
background; the change is scoped to that panel only.

Add a "Contrast" slider beside Zoom that interpolates the editor text colour
from the theme default toward maximum contrast, persisted as
editor_text_contrast in the config. build_editor_job takes the computed colour
so underlined grammar/spelling runs match.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-27 11:55:25 -05:00
landon 5ecbf3ffbb Add LanguageTool grammar/spell checking with a settings dialog
Check the current file against a LanguageTool server (typically a local
instance) from a background thread. Issues are underlined in the editor
(red spelling, blue grammar) and listed in a bottom panel with one-click
fixes that re-align the remaining matches.

A menu bar (File / View / Settings) exposes a LanguageTool settings
dialog with discrete scheme / host / port / token / language fields, an
endpoint preview, and a Test connection button. Config stores the parts
and assembles the base URL. The token is sent as a bearer header.

Uses ureq with a statically-linked rustls backend, so both http and
https endpoints work with no new runtime library dependencies.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-27 08:33:00 -05:00
landon 2b401b9a3b Add editor text zoom slider
A Zoom slider (with Reset) above the editor scales the monospace font
from -50% to +200%, defaulting to 0%. The editor keeps infinite desired
width inside a vertical-only scroll area, so text wraps to the pane at
any zoom with no horizontal scrolling. The zoom level persists in config.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-26 15:21:27 -05:00
landon f05ee655c3 Add zero-pad option for numbered chapter titles
A "Zero-pad #" checkbox pads chapter titles that default to their
position number with leading zeros to a uniform width (the digit count
of the largest chapter number, e.g. 03. of 12). Padding never applies to
"# Title:" headers or manual overrides. The setting persists in config.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-26 14:59:13 -05:00
landon 6680c001bf Page-break between chapters and numeric title fallback
Every chapter after the first now starts on a new page via a
Chapter_20_Break heading style (fo:break-before="page"); the first
chapter keeps the plain heading so there is no blank leading page.

Chapter titles now resolve as: manual override > "# Title:" header >
the chapter's 1-based position in the left pane (e.g. "3."). The old
"# heading" / filename fallbacks are replaced by this numbering, and the
same logic drives the chapter-title hint.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-26 14:51:21 -05:00
landon 7271e5e2ef Add native file dialogs for workspace and export paths
A 📂 button beside each path field opens a native picker: a folder
chooser for the workspace and an .odt save dialog for the export (which
appends the extension if omitted). Uses rfd with the XDG Desktop Portal
backend, so there is no GTK build dependency and no new shared library
at runtime.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-26 14:17:24 -05:00
landon 7008463ebf Add current-file word counter to the status bar
Shows a live word count for the open file plus the net words added or
removed since this session started. Per-file baselines are snapshotted
when the workspace opens (session_start_counts) and follow renames.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-26 13:49:27 -05:00
landon 507e0ab724 Strip comments and header metadata on ODT export
Each file is now cleaned before conversion: HTML comments are removed
and everything above the configurable Draft marker (default
"### Rough Draft:") is dropped. A "# Title:" line becomes the chapter
heading and a "# Slug:" line becomes an italic caption beneath it.

- new preprocess module (strip_comments + header parse) with tests
- Chapter gains a slug rendered via a Chapter_20_Caption style, italic
  at both paragraph-style and character-run level
- draft_marker config setting + top-bar field
- export title priority: override > # Title: > first # heading > filename

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-25 19:01:45 -05:00
landon f473b63ee3 Initial commit: md-manuscript editor
Rust/egui desktop app: draggable markdown file list, editor, git sync,
per-file chapter titles, and native ODT export. Includes README and
Debian 12 (Surface) install guide.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-25 15:17:42 -05:00