From e55b3b7a77803fc2c54b9a2a8e57b1a9b6fbbab2 Mon Sep 17 00:00:00 2001 From: arc Date: Mon, 10 Aug 2026 15:01:13 -0600 Subject: [PATCH] fix: filenav now more reliably reports the path it's looking at --- frontend/src/lib/cache.ts | 4 ---- frontend/src/lib/components/sidebar/FileNavigation.svelte | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/frontend/src/lib/cache.ts b/frontend/src/lib/cache.ts index 7cd33d6a..b8e021af 100644 --- a/frontend/src/lib/cache.ts +++ b/frontend/src/lib/cache.ts @@ -21,10 +21,6 @@ class DocumentCache { * @param path The path of the asset to fetch */ public async get(path: string): Promise { - // Stupid hack fix because I don't want to do a real fix - if (path.startsWith('docs')) { - path = path.replace('docs', ''); - } const hasKey = this.values.has(path); let entry: CacheEntry; // Re-insert to mark it as most recently accessed diff --git a/frontend/src/lib/components/sidebar/FileNavigation.svelte b/frontend/src/lib/components/sidebar/FileNavigation.svelte index 81fa5d27..c5edb36b 100644 --- a/frontend/src/lib/components/sidebar/FileNavigation.svelte +++ b/frontend/src/lib/components/sidebar/FileNavigation.svelte @@ -233,7 +233,7 @@ last_modified_date: ${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()} children={child.children} siblings={children} indent={indent + 1.5} - path={path + child.name} + path={path === 'docs' ? child.name : path + child.name} {fileSelectHandler} /> {:else} @@ -243,7 +243,7 @@ last_modified_date: ${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()} children={child.children} siblings={children} indent={indent + 1} - path={path + child.name + '/'} + path={path === 'docs' ? child.name + '/' : path + child.name + '/'} {fileSelectHandler} /> {/if}