Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

Fix PWA standalone editor routing

yoma7859b755e493
diff --git a/apps/web/public/mobile-edit.html b/apps/web/public/mobile-edit.html
index bd51d562..7737b7c6 100644
--- a/apps/web/public/mobile-edit.html
+++ b/apps/web/public/mobile-edit.html
@@ -171,7 +171,7 @@
<script>
const AUTO_SAVE_DELAY_MS = 1200;
const DRAFT_STORAGE_PREFIX = "edgeever-mobile-edit-draft:";
- const params = new URLSearchParams(location.search);
+ const params = new URLSearchParams(location.hash ? location.hash.slice(1) : location.search);
const memoId = params.get("memoId");
const returnTo = params.get("returnTo") || "/";
const titleInput = document.getElementById("title");
diff --git a/apps/web/src/components/EditorPane.tsx b/apps/web/src/components/EditorPane.tsx
index 85a64884..a7090dd2 100644
--- a/apps/web/src/components/EditorPane.tsx
+++ b/apps/web/src/components/EditorPane.tsx
@@ -472,7 +472,7 @@ const openStandaloneMobileEditor = (memoId: string) => {
memoId,
returnTo: "/",
});
- window.location.href = `/mobile-edit.html?${params.toString()}`;
+ window.location.href = `/mobile-edit.html#${params.toString()}`;
};
const MobileNativeEditorPane = ({
diff --git a/apps/web/src/components/WorkspaceApp.tsx b/apps/web/src/components/WorkspaceApp.tsx
index 4558d56a..8cc0438e 100644
--- a/apps/web/src/components/WorkspaceApp.tsx
+++ b/apps/web/src/components/WorkspaceApp.tsx
@@ -84,7 +84,7 @@ const openStandaloneMobileEditor = (memoId: string) => {
memoId,
returnTo: "/",
});
- window.location.href = `/mobile-edit.html?${params.toString()}`;
+ window.location.href = `/mobile-edit.html#${params.toString()}`;
};
const getVerticalScrollContainer = (target: EventTarget | null) => {
diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts
index 23fc1d5b..0b4bed14 100644
--- a/apps/web/vite.config.ts
+++ b/apps/web/vite.config.ts
@@ -58,7 +58,7 @@ export default defineConfig({
workbox: {
globPatterns: ["**/*.{js,css,html,ico,png,svg,webp,woff2}"],
navigateFallback: "/index.html",
- navigateFallbackDenylist: [/^\/api\//, /^\/mcp\//],
+ navigateFallbackDenylist: [/^\/api\//, /^\/mcp\//, /^\/mobile-edit\.html$/],
runtimeCaching: [
{
urlPattern: ({ url }) => url.pathname.startsWith("/api/") || url.pathname.startsWith("/mcp/"),