From 12f45267f7fd681aab9286a8d76acff095e6edd7 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 12 Jul 2026 17:50:21 +0000 Subject: [PATCH] feat(editor): close the note editor with browser back navigation The mobile editor is fullscreen with no backdrop to tap, so the Android back button / iOS back swipe now dismisses it instead of leaving the page. The editor pushes a shallow-routing history entry on mount and closes when it is popped; UI closes pop the entry themselves so history stays clean. NotesView's hash rewriting now goes through SvelteKit's replaceState so the router keeps handling popstate. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01C1N5Vi12zTez7LNqRvYjUD --- src/app.d.ts | 4 +++- src/lib/components/NoteEditor.svelte | 28 +++++++++++++++++++++++ src/lib/components/NotesView.svelte | 8 +++++-- tests/e2e/notes-crud.spec.ts | 34 ++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+), 3 deletions(-) diff --git a/src/app.d.ts b/src/app.d.ts index 4b1d51c..be638bf 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -15,7 +15,9 @@ declare global { } | null; } // interface PageData {} - // interface PageState {} + interface PageState { + noteEditorOpen?: boolean; + } // interface Platform {} } } diff --git a/src/lib/components/NoteEditor.svelte b/src/lib/components/NoteEditor.svelte index 199c3df..c1f2f69 100644 --- a/src/lib/components/NoteEditor.svelte +++ b/src/lib/components/NoteEditor.svelte @@ -4,6 +4,8 @@