From 2dc197a905001f65127774fde3ceb02e0e2cfc8f Mon Sep 17 00:00:00 2001 From: Quick104 <31828688+Quick104@users.noreply.github.com> Date: Fri, 20 Nov 2026 23:19:29 -0500 Subject: [PATCH] fix(web): keep restore names that can't wrap inside their box A name holding a run no line break can split, such as emoji joined by zero-width joiners, ran past its box on the backup restore screens: the Choose step's library heading and its summary panel, the Review step's plan sentences and left-out list, and the Run report's item and profile lines. In the summary panel the sentence also set the width of the phone layout's only column, so every section ran past the screen. Each of these now clips such a run sideways at its edge, as the profile rows do since #4755. The summary panel no longer widens the column, and its sentences wrap like the Review step's. Every other name renders as before. Co-Authored-By: Claude Opus 5.5 --- web/src/pages/admin-backups/RestoreChoose.tsx | 28 ++++++----- web/src/pages/admin-backups/RestoreReview.tsx | 47 ++++++++++++++++--- web/src/pages/admin-backups/RestoreRun.tsx | 17 +++++-- 3 files changed, 68 insertions(+), 24 deletions(-) diff --git a/web/src/pages/admin-backups/RestoreChoose.tsx b/web/src/pages/admin-backups/RestoreChoose.tsx index 9e1bdf8031..3e2c9a1539 100644 --- a/web/src/pages/admin-backups/RestoreChoose.tsx +++ b/web/src/pages/admin-backups/RestoreChoose.tsx @@ -29,6 +29,7 @@ import { SettingFieldStatus } from "@/pages/admin-settings/SettingField"; import { OmittedAccounts } from "./BackupWarningDetails"; import { Disclosure } from "./Disclosure"; +import { PlanSentences } from "./RestoreReview"; import { ItemRow, SameRow, type ToggleKeys } from "./RestoreRows"; import { AccountRow, DataTypesPanel } from "./RestoreUsers"; import { @@ -240,13 +241,20 @@ function LibraryGroupRows({ open={open} onOpenChange={setOpen} controls={listId} - className="text-foreground gap-1.5 text-[13px] font-medium" + className="text-foreground max-w-full gap-1.5 text-[13px] font-medium" > {/* One run of text, so the count follows the name's last word. A name with no spaces still breaks to fit. The name keeps its own direction, so a name in another script can't pull the count across it. The count - is an inline block, so it moves to the next line whole. */} - + is an inline block, so it moves to the next line whole. The button and + the text stay within the row, which clips sideways the part of a name + that can't wrap, such as one long run of joined emoji. The 0.25em of + padding, offset by a negative margin, keeps letters whole whose ink + reaches past their edge. */} + {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx -- a space, not text */} {name}{" "} @@ -639,9 +647,11 @@ export function RestoreChoose({ ))} + {/* min-w-0: on a narrow screen the summary shares the sections' column, so a + sentence it can't wrap would otherwise widen every section past the screen. */}