From 471830de8f85d2ce2e02b6d0965a8b12a918bf8d Mon Sep 17 00:00:00 2001 From: Louis King Date: Fri, 24 Jul 2026 23:21:00 +0100 Subject: [PATCH] fix(web): resolve horizontal overflow on Dashboard and Routes (mobile) Dashboard Recent Adverts widget overflowed because its card (a CSS grid item with default min-width: auto) grew to the table's intrinsic min-content width, preventing the overflow-x-auto wrapper from engaging. Add min-w-0 to both bottom-grid cards and constrain the Node name cell with max-w + truncate to reduce the table's min-width. Routes had page-level horizontal scroll with no visible scrollbar due to three triggers and no overflow containment in the ancestor chain: (1) the history day-label flex row whose flex-1 spans had no min-w-0, (2) -mx-1 on every clickable MatchRow, and (3) a Chart.js responsive canvas in an unconstrained parent. Add min-w-0 to the card grid item, chart wrapper, and label spans (with truncate); add overflow-hidden to the MatchRow container to clip the negative-margin hover-bg. --- .../web/static/js/spa-react/pages/Dashboard.tsx | 8 ++++---- .../web/static/js/spa-react/pages/Routes.tsx | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/meshcore_hub/web/static/js/spa-react/pages/Dashboard.tsx b/src/meshcore_hub/web/static/js/spa-react/pages/Dashboard.tsx index b107e94..6edc257 100644 --- a/src/meshcore_hub/web/static/js/spa-react/pages/Dashboard.tsx +++ b/src/meshcore_hub/web/static/js/spa-react/pages/Dashboard.tsx @@ -563,7 +563,7 @@ export function DashboardPage() {
{showAdverts && (
@@ -604,12 +604,12 @@ export function DashboardPage() { to={`/nodes/${ad.public_key}`} className="link link-hover" > -
+
{displayName}
{friendlyName && ( -
+
{ad.public_key.slice(0, 12)}...
)} @@ -642,7 +642,7 @@ export function DashboardPage() { {showMessages && channelEntries.length > 0 && (
diff --git a/src/meshcore_hub/web/static/js/spa-react/pages/Routes.tsx b/src/meshcore_hub/web/static/js/spa-react/pages/Routes.tsx index 7098792..3bcfb40 100644 --- a/src/meshcore_hub/web/static/js/spa-react/pages/Routes.tsx +++ b/src/meshcore_hub/web/static/js/spa-react/pages/Routes.tsx @@ -466,12 +466,12 @@ function DetailContent({ return (
{history && ( -
+
{historyData.length > 0 && ( -
+
{historyData.map((d, i) => ( - + {i === historyData.length - 1 ? t("routes.last_n_hours", { n: route.window_hours }) : new Date(`${d.date}T00:00:00`).toLocaleDateString( @@ -487,7 +487,7 @@ function DetailContent({ {matches.length > 0 && (
{t("routes.recent_packets")} -
+
{matches.map((m, i) => (