Finish bundled-template migration; simplify frontmatter; de-duplicate toolbar/menu

Completes the move off the external cookiecutter tool: drops
src/cookiecutter.rs and the cookiecutter_bin/Template-path setting now
that scaffolding always runs through the built-in MiniJinja engine,
and rewrites default_project_template() to walk up from the executable
without panicking when the bundled template can't be found. Rounds
out the snowflake template with the remaining 06-Revisions,
07-Final, 08-Covers and 09-Archive folders.

Simplifies the scene/chapter YAML frontmatter (drops type/word_count_min/
word_count_max in favor of status + a flat characters list) and updates
the new-file template, header parsing, outline, file list and Story
Bible editor to match.

Separately, de-duplicates the toolbar and menu bar: settings that only
existed as always-visible toolbar controls (draft marker, zero-pad,
spell-check toggle, dictionary picker) move into their Settings
windows, toolbar buttons that exactly duplicated a menu item are
dropped, and toolbar-only actions with no menu path (open project
folder, git sync/init) gain one under File. Also fixes two ambiguous
menu labels: the Story Bible editor now reads "Story Bible editor…"
next to "Story Bible…" in Tools instead of sharing a label with Edit,
and Settings' "New project…" is now "New-project settings…" so it
doesn't read like File's actual create action.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-19 10:35:52 -05:00
parent c61a7b605a
commit 0f144737a5
23 changed files with 1199 additions and 1091 deletions
+17 -3
View File
@@ -389,6 +389,9 @@ pub struct App {
story_bible_editor_content: String,
/// The workspace-relative path of the file being edited in the Story Bible editor.
story_bible_editor_path: Option<String>,
/// Whether the caret was in the Story Bible editor's text area last frame,
/// which is what decides where `Ctrl+S` sends its save.
story_bible_editor_focused: bool,
/// List of auto-snapshots for rollback.
snapshots: Vec<crate::app::auto_snapshot::SnapshotInfo>,
/// Word count at the last auto-snapshot.
@@ -502,6 +505,7 @@ impl App {
show_story_bible_editor: false,
story_bible_editor_content: String::new(),
story_bible_editor_path: None,
story_bible_editor_focused: false,
snapshots: Vec::new(),
last_snapshot_word_count: 0,
show_snapshots: false,
@@ -514,10 +518,20 @@ impl App {
impl eframe::App for App {
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
// Ctrl+S saves.
// Ctrl+S saves whatever is being typed in. Usually that is the open
// manuscript file, but the Story Bible editor is a second text area with
// its own file, and sending its keystroke to the manuscript both loses
// the edit and writes a file the user was not looking at.
if ctx.input(|i| i.modifiers.command && i.key_pressed(egui::Key::S)) {
self.dirty = true;
self.save_current();
match self.story_bible_editor_path.clone() {
Some(path) if self.show_story_bible_editor && self.story_bible_editor_focused => {
self.save_story_bible_item(path);
}
_ => {
self.dirty = true;
self.save_current();
}
}
}
// Ctrl+D folds the panels away for distraction-free writing, and back.