From 9f575c7c7e4ad748848dd9c0b629fc633a383116 Mon Sep 17 00:00:00 2001 From: landon Date: Sun, 13 Sep 2026 09:08:26 -0500 Subject: [PATCH] feat: Ensure 06-First Draft folder is expanded in file list when opening projects - Add explicit code in open_workspace to ensure manuscript folder is not collapsed - Update README to clarify that project root is opened with manuscript folder expanded - Keep workspace at project root but ensure file list shows 06-First Draft expanded Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- README.md | 11 +++++------ src/app/workspace.rs | 4 ++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 139ede6..763acaa 100644 --- a/README.md +++ b/README.md @@ -503,12 +503,11 @@ to the template as the `project_name`, `author` and `description` variables. Nothing is written until you press **Create**; generation runs in the background, so a template whose hooks talk to the network doesn't freeze the editor. -When it finishes, the app opens the project's **`06-First Draft`** subfolder as -the workspace — that is where the snowflake template keeps the chapter files, in -`Act 1/`, `Act 2/` and `Act 3/` subfolders that the -[folder tree](#organising-with-folders) shows directly. If the template didn't -produce that folder, the project root is opened instead and the status bar says -so. +When it finishes, the app opens the project root as the workspace, +with the **`06-First Draft`** folder (where the snowflake template keeps the +chapter files in `Act 1/`, `Act 2/` and `Act 3/` subfolders) automatically +expanded in the file list. If the template didn't produce that folder, the +status bar notes that nothing is marked as the manuscript. A folder only appears in the file panel once it holds a `.md` file — the template's empty acts are held open with `.gitkeep`, which is not markdown, so diff --git a/src/app/workspace.rs b/src/app/workspace.rs index 14f394b..0dbfbe5 100644 --- a/src/app/workspace.rs +++ b/src/app/workspace.rs @@ -91,6 +91,10 @@ impl App { self.load_characters(); self.autocomplete = None; self.collapsed.clear(); + // Ensure the manuscript folder (e.g., 06-First Draft) is always expanded + if let Some(ref dir) = self.manuscript_dir { + self.collapsed.remove(dir); + } if let Some(idx) = first_listed(&self.files, self.manuscript_dir.as_deref()) { self.select(idx); }