Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(mobile): border + className passthrough on WorkspaceAvatar logo branch (#3849)

Bohan Jiang83ac61e2a12c
diff --git a/apps/mobile/components/workspace/workspace-avatar.tsx b/apps/mobile/components/workspace/workspace-avatar.tsx
index 9b135b4f64..f6cb60f5bf 100644
--- a/apps/mobile/components/workspace/workspace-avatar.tsx
+++ b/apps/mobile/components/workspace/workspace-avatar.tsx
@@ -9,6 +9,14 @@
* core's resolvePublicFileUrl — because avatar_url comes back as a server-
* relative path on self-hosted backends without a CDN signer, which RN's
* <Image> can't load without an absolute origin.
+ *
+ * Both branches render a `border border-border` tile and thread `className`
+ * through, matching web's <img>/<span> (both carry `border` + `className`).
+ * The logo sits inside an overflow-hidden View rather than styling the
+ * <ExpoImage> directly: NativeWind has no cssInterop for expo-image, so
+ * className/border utilities are silently dropped on <ExpoImage>. The wrapper
+ * View is how the rest of the app borders/rounds an expo-image — see
+ * lib/markdown/markdown-image.tsx.
*/
import { View } from "react-native";
import { Image as ExpoImage } from "expo-image";
@@ -32,12 +40,17 @@ export function WorkspaceAvatar({
if (resolved) {
return (
- <ExpoImage
- source={{ uri: resolved }}
- contentFit="cover"
- accessibilityLabel={name}
+ <View
+ className={cn("overflow-hidden border border-border", className)}
style={{ width: size, height: size, borderRadius }}
- />
+ >
+ <ExpoImage
+ source={{ uri: resolved }}
+ contentFit="cover"
+ accessibilityLabel={name}
+ style={{ width: "100%", height: "100%" }}
+ />
+ </View>
);
}