Update files

This commit is contained in:
Mohamed Boudra
2026-01-26 20:38:39 +07:00
parent c233c99cd3
commit 637967fa14
9 changed files with 853 additions and 8 deletions
@@ -3,6 +3,7 @@ import {
Text,
Pressable,
Modal,
Image,
} from "react-native";
import {
useCallback,
@@ -43,6 +44,7 @@ import {
useSectionOrderStore,
sortProjectsByStoredOrder,
} from "@/stores/section-order-store";
import { useProjectIconQuery } from "@/hooks/use-project-icon-query";
interface SectionData {
key: string;
@@ -96,6 +98,13 @@ function SectionHeader({
});
const checkout = checkoutQuery.data ?? null;
// Get project icon
const iconQuery = useProjectIconQuery({
serverId: section.firstAgentServerId ?? "",
cwd: section.workingDir ?? "",
});
const icon = iconQuery.icon;
// Derive display title: prefer repo name from remote URL, fallback to path-based name
let displayTitle = section.title;
if (checkout?.isGit && checkout.remoteUrl) {
@@ -138,6 +147,12 @@ function SectionHeader({
onHoverOut={() => setIsHovered(false)}
>
<View style={styles.sectionHeaderLeft}>
{icon && (
<Image
source={{ uri: `data:${icon.mimeType};base64,${icon.data}` }}
style={styles.projectIcon}
/>
)}
<Text style={styles.sectionTitle} numberOfLines={1}>
{displayTitle}
</Text>
@@ -586,6 +601,12 @@ const styles = StyleSheet.create((theme) => ({
justifyContent: "flex-start",
flex: 1,
minWidth: 0,
gap: theme.spacing[2],
},
projectIcon: {
width: 16,
height: 16,
borderRadius: theme.borderRadius.sm,
},
sectionHeaderRight: {
flexDirection: "row",