From dddb8c366359763167b572ef6aa3386bd103ab58 Mon Sep 17 00:00:00 2001 From: jp Date: Thu, 13 Aug 2026 20:42:29 +0100 Subject: [PATCH] frontend: prevent contacts content overflowing the viewport + sync UI repo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ContactsPage: drop whiteSpace:nowrap on the action cell; wrap the Edit/History/Delete/⋮ buttons in a flex container with flex-wrap so they reflow instead of forcing the table wider than the viewport; allow the name/number/email cell to break long strings. - index.css: td word-break:break-word + table max-width:100% as a guard. - Sync the UI repo (ContactsPage/ContactHistory/MessagesPage implicit-any annotations that unblock npm run build) into the frontend/ mirror. --- frontend/src/components/ContactHistory.tsx | 2 +- frontend/src/components/ContactsPage.tsx | 26 +++++++++++----------- frontend/src/components/MessagesPage.tsx | 4 ++-- frontend/src/index.css | 6 +++++ 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/frontend/src/components/ContactHistory.tsx b/frontend/src/components/ContactHistory.tsx index 0450b15..a0940a1 100644 --- a/frontend/src/components/ContactHistory.tsx +++ b/frontend/src/components/ContactHistory.tsx @@ -15,7 +15,7 @@ export default function ContactHistory() { {isLoading &&
Loading...
} {error &&
{(error as Error).message}
} - {data?.messages?.map((m) => ( + {data?.messages?.map((m: any) => (
{data.contact}
{m.time}{m.duration_fmt ? ` · ${m.duration_fmt}` : ""}
diff --git a/frontend/src/components/ContactsPage.tsx b/frontend/src/components/ContactsPage.tsx index a86d1a9..7a61101 100644 --- a/frontend/src/components/ContactsPage.tsx +++ b/frontend/src/components/ContactsPage.tsx @@ -38,23 +38,23 @@ export default function ContactsPage() {
- {data.map((c) => ( + {data.map((c: any) => ( - - ))} @@ -121,7 +121,7 @@ function ContactMenu({ number, name }: { number?: string; name?: string }) { )} Loading...} {error &&
{(error as Error).message}
} - {data?.messages?.map((m) => { + {data?.messages?.map((m: any) => { const whoRaw = m.contact_name || m.callerid || "Unknown caller"; const num = sanitiseNumber(m.callerid); const showAdd = !m.contact_name && num; @@ -192,7 +192,7 @@ function MsgContactMenu({ number, name, callerid }: { number?: string; name?: st )}
+ {c.name || "Unnamed"}
- + {c.number_e164} {c.email && `· ${c.email}`}
- Edit - {" "} - History - {" "} - - - - + +
+ Edit + History + + + + +