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: route details journals button to metrics dashboard (#3830)

Andrew Barnes6c18d74e2a98
diff --git a/changelog.d/3825.bugfix.md b/changelog.d/3825.bugfix.md
new file mode 100644
index 0000000000..effac224c8
--- /dev/null
+++ b/changelog.d/3825.bugfix.md
@@ -0,0 +1 @@
+Fix the research details "View Journals" button so it opens the scoped journal-quality dashboard instead of a missing page.
diff --git a/src/local_deep_research/web/static/js/components/details.js b/src/local_deep_research/web/static/js/components/details.js
index 625e843074..7510350ee5 100644
--- a/src/local_deep_research/web/static/js/components/details.js
+++ b/src/local_deep_research/web/static/js/components/details.js
@@ -1340,8 +1340,8 @@
const viewJournalsBtn = document.getElementById('view-journals-btn');
if (viewJournalsBtn) {
viewJournalsBtn.addEventListener('click', () => {
- // bearer:disable javascript_lang_open_redirect — same-origin path
- window.location.href = `/journal-quality?research_id=${encodeURIComponent(researchId)}`;
+ // bearer:disable javascript_lang_open_redirect — URLBuilder produces a same-origin path
+ window.location.href = URLBuilder.journalQualityPage(researchId);
});
}
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 b0e076263d..9b1bea5596 100644
--- a/src/local_deep_research/web/static/js/config/urls.js
+++ b/src/local_deep_research/web/static/js/config/urls.js
@@ -43,6 +43,7 @@ if (typeof URLS !== 'undefined') {
METRICS_COSTS: '/metrics/costs', // Added metrics subpage
METRICS_STAR_REVIEWS: '/metrics/star-reviews', // Added metrics subpage
METRICS_CONTEXT_OVERFLOW: '/metrics/context-overflow', // Context overflow diagnostics
+ JOURNAL_QUALITY: '/metrics/journals',
LIBRARY: '/library/',
COLLECTIONS: '/library/collections',
COLLECTION_DETAILS: '/library/collections/{id}',
@@ -175,6 +176,10 @@ const URLBuilder = {
return this.build(URLS.PAGES.DETAILS, researchId);
},
+ journalQualityPage(researchId) {
+ return `${URLS.PAGES.JOURNAL_QUALITY}?research_id=${encodeURIComponent(researchId)}`;
+ },
+
documentPage(documentId) {
return this.build(URLS.PAGES.DOCUMENT, documentId);
},
diff --git a/tests/js/config/urls.test.js b/tests/js/config/urls.test.js
index 8ce8f9f94c..c56994fd4f 100644
--- a/tests/js/config/urls.test.js
+++ b/tests/js/config/urls.test.js
@@ -84,6 +84,12 @@ describe('URLBuilder', () => {
it('researchMetrics substitutes ID into METRICS_API.RESEARCH', () => {
expect(URLBuilder.researchMetrics(42)).toBe(URLS.METRICS_API.RESEARCH.replace('{id}', '42'));
});
+
+ it('journalQualityPage scopes the dashboard to an encoded research ID', () => {
+ expect(URLBuilder.journalQualityPage('abc 123')).toBe(
+ `${URLS.PAGES.JOURNAL_QUALITY}?research_id=abc%20123`
+ );
+ });
});
describe('extractResearchIdFromPattern', () => {
@@ -154,6 +160,10 @@ describe('URLS constants — structural sanity (not literal values)', () => {
}
});
+ it('journal quality page is served from the metrics blueprint', () => {
+ expect(URLS.PAGES.JOURNAL_QUALITY).toMatch(/^\/metrics\//);
+ });
+
it('library API routes are namespaced under /library/', () => {
for (const [key, url] of Object.entries(URLS.LIBRARY_API)) {
expect(url, `LIBRARY_API.${key}`).toMatch(/^\/library\//);