Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
fix(mobile): avoid double dividers between thread sections (#5391)
shivame0c85a20ef0e
diff --git a/apps/mobile/src/features/home/HomeScreen.tsx b/apps/mobile/src/features/home/HomeScreen.tsxindex 2b58bc342..ba32dc6b6 100644--- a/apps/mobile/src/features/home/HomeScreen.tsx+++ b/apps/mobile/src/features/home/HomeScreen.tsx@@ -694,7 +694,11 @@ export function HomeScreen(props: HomeScreenProps) {);const renderV2Item = useCallback(- ({ item }: { readonly item: ThreadListV2ListItem }) => {+ ({ item, index }: { readonly item: ThreadListV2ListItem; readonly index: number }) => {+ const nextItem = threadListV2Items[index + 1];+ const showTrailingDivider =+ nextItem?.type === "v2-thread" ||+ (nextItem?.type === "v2-pending" && !nextItem.showPendingDivider);if (item.type === "v2-pending") {const pendingScopeKey = scopedProjectKey(item.pendingTask.message.environmentId,@@ -712,6 +716,7 @@ export function HomeScreen(props: HomeScreenProps) {: null}showPendingDivider={item.showPendingDivider}+ showTrailingDivider={showTrailingDivider}onSelectPendingTask={props.onSelectPendingTask}onDeletePendingTask={props.onDeletePendingTask}/>@@ -744,6 +749,7 @@ export function HomeScreen(props: HomeScreenProps) {pinned={item.item.pinned}snoozePresetMinute={nowMinute}snoozeWakeLabelText={item.snoozeWakeLabelText}+ showTrailingDivider={showTrailingDivider}project={projectByKey.get(scopedProjectKey(thread.environmentId, thread.projectId)) ?? null}@@ -814,6 +820,7 @@ export function HomeScreen(props: HomeScreenProps) {serverConfigs,settlementEnvironmentIds,snoozeEnvironmentIds,+ threadListV2Items,threadSearchMatchByKey,toggleSettledShelf,toggleSnoozedShelf,diff --git a/apps/mobile/src/features/threads/thread-list-v2-items.tsx b/apps/mobile/src/features/threads/thread-list-v2-items.tsxindex 6b9dd5251..24f716691 100644--- a/apps/mobile/src/features/threads/thread-list-v2-items.tsx+++ b/apps/mobile/src/features/threads/thread-list-v2-items.tsx@@ -204,6 +204,8 @@ export const ThreadListV2PendingRow = memo(function ThreadListV2PendingRow(propsreadonly pane?: "screen" | "sidebar";/** Draws the "Pending" divider above the first queued row. */readonly showPendingDivider: boolean;+ /** Keeps row hairlines inside a section; section headers draw their own rule. */+ readonly showTrailingDivider?: boolean;readonly onSelectPendingTask: (pendingTask: PendingNewTask) => void;readonly onDeletePendingTask: (pendingTask: PendingNewTask) => void;}) {@@ -291,7 +293,9 @@ export const ThreadListV2PendingRow = memo(function ThreadListV2PendingRow(props) : (<View className="bg-screen"><View className="px-5 py-2.5">{rowContent}</View>- <View className="ml-5 h-px bg-border-subtle" />+ {props.showTrailingDivider !== false ? (+ <View className="ml-5 h-px bg-border-subtle" />+ ) : null}</View>)}</Pressable>@@ -327,6 +331,8 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {into the drawer surface, selection filled with the accent color —matching the v1 sidebar rows. */readonly pane?: "screen" | "sidebar";+ /** Keeps row hairlines inside a section; section headers draw their own rule. */+ readonly showTrailingDivider?: boolean;/** Highlights the thread open in the detail pane (iPad split view). Thecompact Home list never sets it — phones navigate away on select. */readonly selected?: boolean;@@ -728,7 +734,9 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {actions reveal behind the row. */<View className="bg-screen"><View className="px-5 py-2.5">{cardContent}</View>- <View className="ml-5 h-px bg-border-subtle" />+ {props.showTrailingDivider !== false ? (+ <View className="ml-5 h-px bg-border-subtle" />+ ) : null}</View>)}</Pressable>