From 27be15f80babf24967d2d5b77e0fc3e3b103a410 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 11 Jan 2026 12:45:26 +0000 Subject: [PATCH] Trim profile descriptions in profile screen and ProfileCard Adds .trim() to profile descriptions to remove leading/trailing whitespace that can cause layout issues in the UI. --- src/components/ProfileCard.tsx | 2 +- src/view/screens/Profile.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ProfileCard.tsx b/src/components/ProfileCard.tsx index cb5ed17d15..019acb7931 100644 --- a/src/components/ProfileCard.tsx +++ b/src/components/ProfileCard.tsx @@ -409,7 +409,7 @@ export function Description({ const profile = useProfileShadow(profileUnshadowed) const rt = useMemo(() => { if (!('description' in profile)) return - const rt = new RichTextApi({text: profile.description || ''}) + const rt = new RichTextApi({text: (profile.description || '').trim()}) rt.detectFacetsWithoutResolution() return rt }, [profile]) diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx index 5bb46f0d29..c0759dda90 100644 --- a/src/view/screens/Profile.tsx +++ b/src/view/screens/Profile.tsx @@ -203,7 +203,7 @@ function ProfileScreenLoaded({ useSetTitle(combinedDisplayName(profile)) - const description = profile.description ?? '' + const description = (profile.description ?? '').trim() const hasDescription = description !== '' const [descriptionRT, isResolvingDescriptionRT] = useRichText(description) const showPlaceholder = isPlaceholderProfile || isResolvingDescriptionRT