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(mobile): resolve tablet sidebar and metrics page overflow issues (#1549)

LearningCircuitc9268a389e51
diff --git a/src/local_deep_research/web/static/css/mobile-responsive.css b/src/local_deep_research/web/static/css/mobile-responsive.css
index 553a77dff3..3d5fd33d9f 100644
--- a/src/local_deep_research/web/static/css/mobile-responsive.css
+++ b/src/local_deep_research/web/static/css/mobile-responsive.css
@@ -11,20 +11,27 @@
/* 2. Fix content padding to account for mobile nav */
@media (max-width: 767px) {
body.ldr-has-mobile-nav {
- padding-bottom: 80px; /* Height of mobile nav + safe area */
+ padding-bottom: 100px; /* Height of mobile nav + safe area */
}
.ldr-main-content,
.ldr-page.active,
main {
- padding-bottom: 100px !important; /* Extra padding for content */
+ padding-bottom: 120px !important; /* Extra padding for content - nav is 56px + safe area */
margin-bottom: 0;
}
+ /* Cards and containers at the bottom need extra spacing */
+ .ldr-card:last-child,
+ .ldr-metric-card:last-child,
+ form:last-child {
+ margin-bottom: 80px !important;
+ }
+
/* Fix for modals and overlays */
.modal-content,
.ldr-sheet-content {
- max-height: calc(100vh - 160px); /* Account for nav and safe areas */
+ max-height: calc(100vh - 180px); /* Account for nav and safe areas */
overflow-y: auto;
}
}
@@ -887,3 +894,55 @@
display: flex !important;
}
}
+
+/* ========================================
+ 26. Tablet-specific fixes (768px - 991px)
+ ======================================== */
+@media (min-width: 768px) and (max-width: 991px) {
+ /* Force 2-column grids to single column on tablet to prevent overflow */
+ div[style*="grid-template-columns: 1fr 1fr"],
+ div[style*="grid-template-columns:1fr 1fr"] {
+ grid-template-columns: 1fr !important;
+ }
+
+ /* Handle minmax grids - reduce minimum to prevent overflow */
+ .ldr-metrics-grid,
+ div[style*="minmax(300px"],
+ div[style*="minmax(280px"] {
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
+ }
+
+ /* Ensure charts don't overflow */
+ .ldr-chart-container,
+ canvas {
+ max-width: 100% !important;
+ }
+
+ /* Page header should wrap on tablet */
+ .ldr-page-header {
+ flex-wrap: wrap !important;
+ gap: 1rem !important;
+ }
+
+ .ldr-page-header > div {
+ flex-wrap: wrap !important;
+ }
+
+ /* Time range selector should wrap */
+ .ldr-time-range-selector {
+ flex-wrap: wrap !important;
+ justify-content: flex-start !important;
+ }
+
+ /* Ensure main content doesn't overflow */
+ .ldr-main-content {
+ overflow-x: hidden !important;
+ }
+
+ /* Cards should respect container width */
+ .ldr-card,
+ .ldr-metric-card {
+ max-width: 100% !important;
+ overflow-x: auto !important;
+ }
+}
diff --git a/src/local_deep_research/web/static/css/settings-mobile-fix.css b/src/local_deep_research/web/static/css/settings-mobile-fix.css
index 07618868b2..f5d82013f1 100644
--- a/src/local_deep_research/web/static/css/settings-mobile-fix.css
+++ b/src/local_deep_research/web/static/css/settings-mobile-fix.css
@@ -1,5 +1,20 @@
/* Mobile-specific fixes for Settings page */
+/* Prevent horizontal overflow on ALL viewport sizes */
+#settings {
+ overflow-x: hidden;
+ max-width: 100%;
+}
+
+#settings > * {
+ max-width: 100%;
+}
+
+.ldr-settings-container {
+ overflow-x: hidden;
+ max-width: 100%;
+}
+
/* Fix extreme height issue on mobile devices */
@media screen and (max-width: 768px) {
/* Main container height constraints */
@@ -95,3 +110,60 @@
font-size: 14px;
}
}
+
+/* Mobile touch target improvements */
+@media screen and (max-width: 768px) {
+ /* Make help/support links touch-friendly */
+ .ldr-support-note {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 0.5rem;
+ align-items: center;
+ }
+
+ .ldr-support-note a {
+ display: inline-flex;
+ align-items: center;
+ min-height: 44px;
+ padding: 0.5rem 0.75rem;
+ background: var(--bg-tertiary);
+ border-radius: 0.5rem;
+ font-size: 0.875rem;
+ }
+
+ .ldr-support-note a:hover,
+ .ldr-support-note a:active {
+ background: var(--accent-primary);
+ color: white;
+ }
+
+ /* Settings tabs touch targets */
+ .ldr-settings-tab {
+ min-height: 44px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+
+ /* Generic link improvements */
+ .ldr-page a:not(.ldr-btn):not([class*="button"]) {
+ min-height: 44px;
+ display: inline-flex;
+ align-items: center;
+ }
+
+ /* Checkbox and toggle improvements */
+ input[type="checkbox"],
+ input[type="radio"] {
+ min-width: 24px;
+ min-height: 24px;
+ }
+
+ /* Toggle switch touch area */
+ .ldr-toggle-switch {
+ min-width: 50px;
+ min-height: 44px;
+ display: flex;
+ align-items: center;
+ }
+}
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 5ad1eb15bb..cb7e7cad67 100644
--- a/src/local_deep_research/web/static/js/mobile-navigation.js
+++ b/src/local_deep_research/web/static/js/mobile-navigation.js
@@ -59,7 +59,9 @@
}
checkViewport() {
- this.state.isVisible = window.innerWidth <= this.options.breakpoint;
+ // Use < (not <=) to match CSS: @media (max-width: 767px) is mobile
+ // 768px is tablet breakpoint where sidebar should be visible
+ this.state.isVisible = window.innerWidth < this.options.breakpoint;
return this.state.isVisible;
}
diff --git a/src/local_deep_research/web/templates/pages/metrics.html b/src/local_deep_research/web/templates/pages/metrics.html
index 83aa90d0ad..449f503e4c 100644
--- a/src/local_deep_research/web/templates/pages/metrics.html
+++ b/src/local_deep_research/web/templates/pages/metrics.html
@@ -7,9 +7,19 @@
{% block extra_head %}
<style>
+ /* Prevent horizontal overflow on metrics page */
+ .ldr-page.active {
+ overflow-x: hidden;
+ max-width: 100%;
+ }
+
+ .ldr-page.active > * {
+ max-width: 100%;
+ }
+
.ldr-metrics-grid {
display: grid;
- grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
+ grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
gap: 1.5rem;
margin-bottom: 2rem;
}
@@ -385,6 +395,42 @@
color: var(--primary-color);
}
+ /* Responsive grid fixes for all viewport sizes */
+ @media (max-width: 1400px) {
+ /* Force inline style grids to be responsive */
+ div[style*="grid-template-columns: 1fr 1fr"],
+ div[style*="grid-template-columns:1fr 1fr"] {
+ grid-template-columns: 1fr !important;
+ }
+
+ div[style*="minmax(300px"],
+ div[style*="minmax(280px"] {
+ grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)) !important;
+ }
+ }
+
+ /* Page header should wrap on narrow viewports */
+ .ldr-page-header {
+ flex-wrap: wrap !important;
+ gap: 1rem !important;
+ }
+
+ .ldr-page-header > div {
+ flex-wrap: wrap !important;
+ }
+
+ /* Ensure all cards and grids respect container bounds */
+ .ldr-card,
+ .ldr-metric-card,
+ .ldr-chart-container {
+ max-width: 100%;
+ box-sizing: border-box;
+ }
+
+ canvas {
+ max-width: 100% !important;
+ }
+
/* Navigation link buttons */
.ldr-nav-link-btn {
color: white;