From cec5c8fd9280d30f56effac701e1e19d5cfe6fea Mon Sep 17 00:00:00 2001 From: cynfria Date: Thu, 10 Sep 2026 10:00:15 -0700 Subject: [PATCH] fix(desktop): let inbox title and message author names truncate under narrow panes (#7550) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Fixes two instances of the same dead-truncate pattern in the desktop app, where a flex item's implicit `min-width: auto` prevented `truncate` from engaging, so long text painted over adjacent controls instead of ellipsizing: - **Inbox detail title** (`InboxDetailPane.tsx`): the clickable context-title button sized to its text instead of shrinking with the pane, overlapping the header controls (open-in-channel, members, huddle, more menu). Fixed by adding `max-w-full`. - **Message author names** (`MessageHeader.tsx` / `UserProfilePopover.tsx`): the `UserProfilePopover` inline-flex trigger wrapper refused to shrink below the name's nowrap width, running long author names under the hover action bar and off the pane edge. Fixed by adding a `triggerClassName` prop to `UserProfilePopover` and passing `min-w-0 max-w-full` at the author call site. Two other suspected instances (project file breadcrumb, drafts pane title) were stress-tested and already truncate correctly — no change. ### Related issue N/A — none found. ### Testing - New Playwright regression tests for both fixes (`inbox-title-overlap.spec.ts`, `message-author-overlap.spec.ts`, registered in the smoke project), each proven to discriminate: they fail with the fix reverted (real measured overlap) and assert the ellipsis actually engages with non-zero title width, so they can't pass vacuously. - Typecheck, lint, and full desktop unit suite green (pre-push hooks); full desktop e2e smoke suite run earlier: 1402 passed, 3 pre-existing unrelated failures (each fails identically with the fix reverted). **Inbox title — before** (long title paints under the header controls): ![Inbox title before: title text overlaps the header control icons](https://github.com/user-attachments/assets/d5a10f98-114f-4466-8012-468616b82807) **Inbox title — after** (truncates with ellipsis, controls stay clear): ![Inbox title after: title truncates with an ellipsis before the controls](https://github.com/user-attachments/assets/80520f7c-1120-4dbc-929d-1ef5eceb874b) **Author name — before** (long name runs past the header row edge): ![Author name before: name glyphs bleed past the action bar](https://github.com/user-attachments/assets/be9743ae-ef51-4db0-8c46-a0649e98f0d5) **Author name — after** (clean cutoff): ![Author name after: name truncates cleanly inside the header row](https://github.com/user-attachments/assets/24cc0412-ca99-40c4-add6-13380b3ae065) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: cynfria Signed-off-by: Tree Trunks <6ba22921d9dc2ad0aa6ecdf63787ddd24726e266d866da31af69f2e4e146ace5@buzz.block.builderlab.xyz> Co-authored-by: Claude Fable 5 Co-authored-by: Tree Trunks <6ba22921d9dc2ad0aa6ecdf63787ddd24726e266d866da31af69f2e4e146ace5@buzz.block.builderlab.xyz> --- desktop/playwright.config.ts | 2 + .../src/features/home/ui/InboxDetailPane.tsx | 2 +- .../features/messages/ui/MessageActionBar.tsx | 5 + .../features/messages/ui/MessageHeader.tsx | 1 + .../src/features/messages/ui/MessageRow.tsx | 20 ++- .../profile/ui/UserProfilePopover.tsx | 9 + .../shared/layout/observeElementBlockSize.ts | 32 ++++ .../shared/layout/useMeasuredCssVariable.ts | 30 +++- desktop/tests/e2e/inbox-title-overlap.spec.ts | 146 ++++++++++++++++ .../tests/e2e/message-author-overlap.spec.ts | 159 ++++++++++++++++++ 10 files changed, 398 insertions(+), 8 deletions(-) create mode 100644 desktop/tests/e2e/inbox-title-overlap.spec.ts create mode 100644 desktop/tests/e2e/message-author-overlap.spec.ts diff --git a/desktop/playwright.config.ts b/desktop/playwright.config.ts index aad2580dad..76f27b6176 100644 --- a/desktop/playwright.config.ts +++ b/desktop/playwright.config.ts @@ -142,6 +142,8 @@ export default defineConfig({ "**/drafts-screenshots.spec.ts", "**/drafts-all-fix-screenshots.spec.ts", "**/inbox-refactor-screenshots.spec.ts", + "**/inbox-title-overlap.spec.ts", + "**/message-author-overlap.spec.ts", "**/buzz-theme-screenshots.spec.ts", "**/appearance-previews.spec.ts", "**/channel-sort.spec.ts", diff --git a/desktop/src/features/home/ui/InboxDetailPane.tsx b/desktop/src/features/home/ui/InboxDetailPane.tsx index 0360c1d9ad..7b40d452ee 100644 --- a/desktop/src/features/home/ui/InboxDetailPane.tsx +++ b/desktop/src/features/home/ui/InboxDetailPane.tsx @@ -567,7 +567,7 @@ function InboxMessageDetailPane({ {canOpenChannel && contextChannelId ? (