authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-06 22:58:14-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-06 22:58:14-07:00
loga7028f1399911e8ddfd8013914b100ee49b95595
tree20bb743a7c59d8f85b5620861157669e0af6e678
parentbb5748bfac0fbeffe690875fa485a5cbe7b99132
signature Signed by PGP key B5690EEEBB952194

fix: use Pierre icons consistently for attachments (#10475)


3 files changed, 17 insertions(+), 16 deletions(-)

apps/mobile/src/components/ComposerAttachmentStrip.tsx+2-6
...@@ -4,6 +4,7 @@ import { useEffect, useMemo, useState } from "react";...@@ -4,6 +4,7 @@ import { useEffect, useMemo, useState } from "react";
4import { Image, Pressable, ScrollView, View } from "react-native";4import { Image, Pressable, ScrollView, View } from "react-native";
55
6import { AppText as Text } from "./AppText";6import { AppText as Text } from "./AppText";
7import { PierreEntryIcon } from "./PierreEntryIcon";
7import {8import {
8 isFileBackedComposerAttachment,9 isFileBackedComposerAttachment,
9 type DraftComposerAttachment,10 type DraftComposerAttachment,
...@@ -192,12 +193,7 @@ function ComposerAttachmentContent(props: ComposerAttachmentThumbnailProps) {...@@ -192,12 +193,7 @@ function ComposerAttachmentContent(props: ComposerAttachmentThumbnailProps) {
192 }193 }
193 style={style}194 style={style}
194 >195 >
195 <SymbolView196 <PierreEntryIcon path={attachment.name} kind="file" size={props.compact ? 15 : 22} />
196 name="doc.text"
197 size={props.compact ? 15 : 22}
198 tintColorClassName="accent-icon-subtle"
199 type="monochrome"
200 />
201 {!props.compact ? (197 {!props.compact ? (
202 <Text className="w-full text-center text-2xs text-foreground" numberOfLines={1}>198 <Text className="w-full text-center text-2xs text-foreground" numberOfLines={1}>
203 {attachment.name}199 {attachment.name}
apps/mobile/src/features/threads/ThreadFeed.tsx+3-7
...@@ -129,6 +129,7 @@ import {...@@ -129,6 +129,7 @@ import {
129import { useAppearancePreferences } from "../settings/appearance/AppearancePreferencesProvider";129import { useAppearancePreferences } from "../settings/appearance/AppearancePreferencesProvider";
130import { useAppearanceCodeSurface } from "../settings/appearance/useAppearanceCodeSurface";130import { useAppearanceCodeSurface } from "../settings/appearance/useAppearanceCodeSurface";
131import { markdownFileIconSource } from "@t3tools/mobile-markdown-text/file-icons";131import { markdownFileIconSource } from "@t3tools/mobile-markdown-text/file-icons";
132import { PierreEntryIcon } from "../../components/PierreEntryIcon";
132import { markdownLinkIconSource } from "@t3tools/mobile-markdown-text/link-icons";133import { markdownLinkIconSource } from "@t3tools/mobile-markdown-text/link-icons";
133import {134import {
134 normalizeNativeMarkdownUrl,135 normalizeNativeMarkdownUrl,
...@@ -474,12 +475,7 @@ function MessageAttachmentFile(props: {...@@ -474,12 +475,7 @@ function MessageAttachmentFile(props: {
474 {opening ? (475 {opening ? (
475 <ActivityIndicator size="small" />476 <ActivityIndicator size="small" />
476 ) : (477 ) : (
477 <SymbolView478 <PierreEntryIcon path={attachment.name} kind="file" size={26} />
478 name="doc.text"
479 size={26}
480 tintColorClassName={isPdf ? "accent-red-500" : "accent-foreground-muted"}
481 type="monochrome"
482 />
483 )}479 )}
484 </View>480 </View>
485 <View className="min-w-0 flex-1 gap-1">481 <View className="min-w-0 flex-1 gap-1">
...@@ -508,7 +504,7 @@ function MessageAttachmentFile(props: {...@@ -508,7 +504,7 @@ function MessageAttachmentFile(props: {
508function MessageAttachmentUnknown(props: { readonly name: string }) {504function MessageAttachmentUnknown(props: { readonly name: string }) {
509 return (505 return (
510 <View className="flex-row items-center gap-2 py-1">506 <View className="flex-row items-center gap-2 py-1">
511 <SymbolView name="doc.text" size={16} tintColor="#a3a3a3" type="monochrome" />507 <PierreEntryIcon path={props.name} kind="file" size={16} />
512 <Text className="min-w-0 flex-1 text-sm text-foreground" numberOfLines={1}>508 <Text className="min-w-0 flex-1 text-sm text-foreground" numberOfLines={1}>
513 {props.name}509 {props.name}
514 </Text>510 </Text>
apps/web/src/components/chat/ChatComposer.tsx+12-3
...@@ -208,6 +208,7 @@ import {...@@ -208,6 +208,7 @@ import {
208 submitComposerDraft,208 submitComposerDraft,
209} from "./composerSubmission";209} from "./composerSubmission";
210import { ComposerPromptLengthValidation } from "./ComposerPromptLengthValidation";210import { ComposerPromptLengthValidation } from "./ComposerPromptLengthValidation";
211import { PierreEntryIcon } from "./PierreEntryIcon";
211import {212import {
212 createComposerScrollGestureState,213 createComposerScrollGestureState,
213 recordComposerScrollGestureEvent,214 recordComposerScrollGestureEvent,
...@@ -783,7 +784,6 @@ import { toastManager } from "../ui/toast";...@@ -783,7 +784,6 @@ import { toastManager } from "../ui/toast";
783import {784import {
784 BotIcon,785 BotIcon,
785 CircleAlertIcon,786 CircleAlertIcon,
786 FileIcon,
787 PaperclipIcon,787 PaperclipIcon,
788 PencilRulerIcon,788 PencilRulerIcon,
789 PlayIcon,789 PlayIcon,
...@@ -3767,7 +3767,12 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)...@@ -3767,7 +3767,12 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
3767 {image.previewUrl ? (3767 {image.previewUrl ? (
3768 <img src={image.previewUrl} alt="" className="size-full object-cover" />3768 <img src={image.previewUrl} alt="" className="size-full object-cover" />
3769 ) : (3769 ) : (
3770 <FileIcon className="m-auto size-3.5 text-secondary-label" />3770 <PierreEntryIcon
3771 pathValue={image.name}
3772 kind="file"
3773 theme={resolvedTheme}
3774 className="m-auto size-3.5"
3775 />
3771 )}3776 )}
3772 </button>3777 </button>
3773 ))}3778 ))}
...@@ -5320,7 +5325,11 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)...@@ -5320,7 +5325,11 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
5320 key={file.id}5325 key={file.id}
5321 className="flex min-w-0 items-center gap-2 py-1 text-sm text-foreground"5326 className="flex min-w-0 items-center gap-2 py-1 text-sm text-foreground"
5322 >5327 >
5323 <FileIcon className="size-4 shrink-0 text-secondary-label" />5328 <PierreEntryIcon
5329 pathValue={file.name}
5330 kind="file"
5331 theme={resolvedTheme}
5332 />
5324 <span className="min-w-0 flex-1 truncate">{file.name}</span>5333 <span className="min-w-0 flex-1 truncate">{file.name}</span>
5325 <span className="shrink-0 text-xs text-secondary-label">5334 <span className="shrink-0 text-xs text-secondary-label">
5326 {needsReattach5335 {needsReattach