From fd808f3d211fefaa5ddb34c9ec0f6f0098214184 Mon Sep 17 00:00:00 2001 From: limina1 Date: Tue, 2 Dec 2025 19:15:41 -0500 Subject: [PATCH] Add publishing progress bar with mock mode support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add progress tracking to show n/total events during publishing - Display progress bar beneath editor controls in ZettelEditor - Add VITE_MOCK_PUBLISH env variable for testing UI without publishing - Mock mode simulates network delay (300-500ms) and generates fake event IDs - Progress updates after each event publishes in both article and scattered notes modes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .env.example | 14 ++++++++++++++ src/lib/components/ZettelEditor.svelte | 25 ++++++++++++++++++++++++- src/lib/services/publisher.ts | 17 +++++++++++++++++ src/routes/new/compose/+page.svelte | 18 ++++++++++++++++++ 4 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..b17e537 --- /dev/null +++ b/.env.example @@ -0,0 +1,14 @@ +# Alexandria Environment Variables + +# Enable mock data for development/testing +# Set to "true" to use lorem ipsum test comments instead of fetching from relays +VITE_USE_MOCK_COMMENTS=true + +# Set to "true" to use position-based test highlights instead of fetching from relays +VITE_USE_MOCK_HIGHLIGHTS=true + +# Set to "true" to mock event publishing (no actual relay publishing, useful for testing UI) +VITE_MOCK_PUBLISH=true + +# Enable debug logging for relay connections +DEBUG_RELAYS=false diff --git a/src/lib/components/ZettelEditor.svelte b/src/lib/components/ZettelEditor.svelte index 6ca51b5..9ba26a8 100644 --- a/src/lib/components/ZettelEditor.svelte +++ b/src/lib/components/ZettelEditor.svelte @@ -1,5 +1,5 @@