Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix: use URLS config instead of hardcoded routes in mobile-navigation.js (#2351)

LearningCircuitfd2564eff593
diff --git a/src/local_deep_research/web/static/js/config/urls.js b/src/local_deep_research/web/static/js/config/urls.js
index 96f81dd556..a7935bd490 100644
--- a/src/local_deep_research/web/static/js/config/urls.js
+++ b/src/local_deep_research/web/static/js/config/urls.js
@@ -45,7 +45,12 @@ if (typeof URLS !== 'undefined') {
LIBRARY: '/library/',
COLLECTIONS: '/library/collections',
COLLECTION_DETAILS: '/library/collections/{id}',
- RAG_MANAGER: '/library/rag'
+ RAG_MANAGER: '/library/rag',
+ NEWS: '/news/',
+ NEWS_SUBSCRIPTIONS: '/news/subscriptions',
+ BENCHMARK: '/benchmark/',
+ BENCHMARK_RESULTS: '/benchmark/results',
+ EMBEDDING_SETTINGS: '/library/embedding-settings'
},
// History API routes
diff --git a/src/local_deep_research/web/static/js/mobile-navigation.js b/src/local_deep_research/web/static/js/mobile-navigation.js
index 3459d19d3c..e6c7062b90 100644
--- a/src/local_deep_research/web/static/js/mobile-navigation.js
+++ b/src/local_deep_research/web/static/js/mobile-navigation.js
@@ -104,10 +104,10 @@
nav.setAttribute('aria-label', 'Mobile navigation');
const tabs = [
- { id: 'research', icon: 'fas fa-search', label: 'Research', path: '/' },
- { id: 'history', icon: 'fas fa-history', label: 'History', path: '/history/' },
- { id: 'library', icon: 'fas fa-book', label: 'Library', path: '/library/' },
- { id: 'news', icon: 'fas fa-newspaper', label: 'News', path: '/news/' },
+ { id: 'research', icon: 'fas fa-search', label: 'Research', path: URLS.PAGES.HOME },
+ { id: 'history', icon: 'fas fa-history', label: 'History', path: URLS.PAGES.HISTORY },
+ { id: 'library', icon: 'fas fa-book', label: 'Library', path: URLS.PAGES.LIBRARY },
+ { id: 'news', icon: 'fas fa-newspaper', label: 'News', path: URLS.PAGES.NEWS },
{ id: 'more', icon: 'fas fa-bars', label: 'More', action: 'sheet' }
];
@@ -145,7 +145,7 @@
<div class="ldr-mobile-sheet-section">
<h3 class="ldr-mobile-sheet-title">Knowledge Base</h3>
<div class="ldr-mobile-sheet-items">
- <button class="ldr-mobile-sheet-item" data-item-id="collections" data-action="/rag/collections/">
+ <button class="ldr-mobile-sheet-item" data-item-id="collections" data-action="${URLS.PAGES.COLLECTIONS}">
<i class="fas fa-folder-open"></i>
<span class="ldr-mobile-sheet-label">Collections</span>
</button>
@@ -156,7 +156,7 @@
<div class="ldr-mobile-sheet-section">
<h3 class="ldr-mobile-sheet-title">News</h3>
<div class="ldr-mobile-sheet-items">
- <button class="ldr-mobile-sheet-item" data-item-id="subscriptions" data-action="/news/subscriptions/">
+ <button class="ldr-mobile-sheet-item" data-item-id="subscriptions" data-action="${URLS.PAGES.NEWS_SUBSCRIPTIONS}">
<i class="fas fa-bell"></i>
<span class="ldr-mobile-sheet-label">Subscriptions</span>
</button>
@@ -167,15 +167,15 @@
<div class="ldr-mobile-sheet-section">
<h3 class="ldr-mobile-sheet-title">Analytics</h3>
<div class="ldr-mobile-sheet-items">
- <button class="ldr-mobile-sheet-item" data-item-id="metrics" data-action="/metrics/">
+ <button class="ldr-mobile-sheet-item" data-item-id="metrics" data-action="${URLS.PAGES.METRICS}">
<i class="fas fa-chart-bar"></i>
<span class="ldr-mobile-sheet-label">Metrics</span>
</button>
- <button class="ldr-mobile-sheet-item" data-item-id="benchmark" data-action="/benchmark/">
+ <button class="ldr-mobile-sheet-item" data-item-id="benchmark" data-action="${URLS.PAGES.BENCHMARK}">
<i class="fas fa-tachometer-alt"></i>
<span class="ldr-mobile-sheet-label">Benchmark</span>
</button>
- <button class="ldr-mobile-sheet-item" data-item-id="benchmark-results" data-action="/benchmark/results/">
+ <button class="ldr-mobile-sheet-item" data-item-id="benchmark-results" data-action="${URLS.PAGES.BENCHMARK_RESULTS}">
<i class="fas fa-chart-line"></i>
<span class="ldr-mobile-sheet-label">Results</span>
</button>
@@ -186,11 +186,11 @@
<div class="ldr-mobile-sheet-section">
<h3 class="ldr-mobile-sheet-title">Settings</h3>
<div class="ldr-mobile-sheet-items">
- <button class="ldr-mobile-sheet-item" data-item-id="embedding-settings" data-action="/rag/embedding_settings/">
+ <button class="ldr-mobile-sheet-item" data-item-id="embedding-settings" data-action="${URLS.PAGES.EMBEDDING_SETTINGS}">
<i class="fas fa-brain"></i>
<span class="ldr-mobile-sheet-label">Embeddings</span>
</button>
- <button class="ldr-mobile-sheet-item" data-item-id="settings" data-action="/settings/">
+ <button class="ldr-mobile-sheet-item" data-item-id="settings" data-action="${URLS.PAGES.SETTINGS}">
<i class="fas fa-cog"></i>
<span class="ldr-mobile-sheet-label">Configuration</span>
</button>
@@ -472,6 +472,7 @@
if (tab.id === 'research' && currentPath === '/') return true;
if (tab.id === 'history' && currentPath.startsWith('/history')) return true;
+ if (tab.id === 'library' && currentPath.startsWith('/library')) return true;
if (tab.id === 'metrics' && currentPath.startsWith('/metrics')) return true;
if (tab.id === 'news' && currentPath.startsWith('/news')) return true;
diff --git a/tests/infrastructure_tests/test_urls.test.js b/tests/infrastructure_tests/test_urls.test.js
index 81b20e6320..bd9f54ca17 100644
--- a/tests/infrastructure_tests/test_urls.test.js
+++ b/tests/infrastructure_tests/test_urls.test.js
@@ -42,7 +42,8 @@ describe('URLs Configuration', () => {
});
test('Page routes should be defined', () => {
- const pages = ['HOME', 'PROGRESS', 'RESULTS', 'DETAILS', 'HISTORY', 'SETTINGS', 'METRICS'];
+ const pages = ['HOME', 'PROGRESS', 'RESULTS', 'DETAILS', 'HISTORY', 'SETTINGS', 'METRICS',
+ 'NEWS', 'NEWS_SUBSCRIPTIONS', 'BENCHMARK', 'BENCHMARK_RESULTS', 'EMBEDDING_SETTINGS'];
pages.forEach(page => {
expect(URLS.PAGES[page]).toBeDefined();