authorgravatar for 91240327+shivamhwp@users.noreply.github.comshivam <91240327+shivamhwp@users.noreply.github.com> 2026-08-05 13:28:10+05:30
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-08-05 13:28:10+05:30
loge0c85a20ef0ec9b49ade5989a13850493036a49b
tree87dedce9af9cfb369bfac54826ac2a003cd3907d
parent3c5bdb84a93682646848acf48cae94c4d189b7a6
signature Signed by PGP key B5690EEEBB952194

fix(mobile): avoid double dividers between thread sections (#5391)

Co-authored-by: T3 Code Test <t3code-test@example.com>

2 files changed, 18 insertions(+), 3 deletions(-)

apps/mobile/src/features/home/HomeScreen.tsx+8-1
...@@ -694,7 +694,11 @@ export function HomeScreen(props: HomeScreenProps) {...@@ -694,7 +694,11 @@ export function HomeScreen(props: HomeScreenProps) {
694 );694 );
695695
696 const renderV2Item = useCallback(696 const renderV2Item = useCallback(
697 ({ item }: { readonly item: ThreadListV2ListItem }) => {697 ({ item, index }: { readonly item: ThreadListV2ListItem; readonly index: number }) => {
698 const nextItem = threadListV2Items[index + 1];
699 const showTrailingDivider =
700 nextItem?.type === "v2-thread" ||
701 (nextItem?.type === "v2-pending" && !nextItem.showPendingDivider);
698 if (item.type === "v2-pending") {702 if (item.type === "v2-pending") {
699 const pendingScopeKey = scopedProjectKey(703 const pendingScopeKey = scopedProjectKey(
700 item.pendingTask.message.environmentId,704 item.pendingTask.message.environmentId,
...@@ -712,6 +716,7 @@ export function HomeScreen(props: HomeScreenProps) {...@@ -712,6 +716,7 @@ export function HomeScreen(props: HomeScreenProps) {
712 : null716 : null
713 }717 }
714 showPendingDivider={item.showPendingDivider}718 showPendingDivider={item.showPendingDivider}
719 showTrailingDivider={showTrailingDivider}
715 onSelectPendingTask={props.onSelectPendingTask}720 onSelectPendingTask={props.onSelectPendingTask}
716 onDeletePendingTask={props.onDeletePendingTask}721 onDeletePendingTask={props.onDeletePendingTask}
717 />722 />
...@@ -744,6 +749,7 @@ export function HomeScreen(props: HomeScreenProps) {...@@ -744,6 +749,7 @@ export function HomeScreen(props: HomeScreenProps) {
744 pinned={item.item.pinned}749 pinned={item.item.pinned}
745 snoozePresetMinute={nowMinute}750 snoozePresetMinute={nowMinute}
746 snoozeWakeLabelText={item.snoozeWakeLabelText}751 snoozeWakeLabelText={item.snoozeWakeLabelText}
752 showTrailingDivider={showTrailingDivider}
747 project={753 project={
748 projectByKey.get(scopedProjectKey(thread.environmentId, thread.projectId)) ?? null754 projectByKey.get(scopedProjectKey(thread.environmentId, thread.projectId)) ?? null
749 }755 }
...@@ -814,6 +820,7 @@ export function HomeScreen(props: HomeScreenProps) {...@@ -814,6 +820,7 @@ export function HomeScreen(props: HomeScreenProps) {
814 serverConfigs,820 serverConfigs,
815 settlementEnvironmentIds,821 settlementEnvironmentIds,
816 snoozeEnvironmentIds,822 snoozeEnvironmentIds,
823 threadListV2Items,
817 threadSearchMatchByKey,824 threadSearchMatchByKey,
818 toggleSettledShelf,825 toggleSettledShelf,
819 toggleSnoozedShelf,826 toggleSnoozedShelf,
apps/mobile/src/features/threads/thread-list-v2-items.tsx+10-2
...@@ -204,6 +204,8 @@ export const ThreadListV2PendingRow = memo(function ThreadListV2PendingRow(props...@@ -204,6 +204,8 @@ export const ThreadListV2PendingRow = memo(function ThreadListV2PendingRow(props
204 readonly pane?: "screen" | "sidebar";204 readonly pane?: "screen" | "sidebar";
205 /** Draws the "Pending" divider above the first queued row. */205 /** Draws the "Pending" divider above the first queued row. */
206 readonly showPendingDivider: boolean;206 readonly showPendingDivider: boolean;
207 /** Keeps row hairlines inside a section; section headers draw their own rule. */
208 readonly showTrailingDivider?: boolean;
207 readonly onSelectPendingTask: (pendingTask: PendingNewTask) => void;209 readonly onSelectPendingTask: (pendingTask: PendingNewTask) => void;
208 readonly onDeletePendingTask: (pendingTask: PendingNewTask) => void;210 readonly onDeletePendingTask: (pendingTask: PendingNewTask) => void;
209}) {211}) {
...@@ -291,7 +293,9 @@ export const ThreadListV2PendingRow = memo(function ThreadListV2PendingRow(props...@@ -291,7 +293,9 @@ export const ThreadListV2PendingRow = memo(function ThreadListV2PendingRow(props
291 ) : (293 ) : (
292 <View className="bg-screen">294 <View className="bg-screen">
293 <View className="px-5 py-2.5">{rowContent}</View>295 <View className="px-5 py-2.5">{rowContent}</View>
294 <View className="ml-5 h-px bg-border-subtle" />296 {props.showTrailingDivider !== false ? (
297 <View className="ml-5 h-px bg-border-subtle" />
298 ) : null}
295 </View>299 </View>
296 )}300 )}
297 </Pressable>301 </Pressable>
...@@ -327,6 +331,8 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {...@@ -327,6 +331,8 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
327 into the drawer surface, selection filled with the accent color —331 into the drawer surface, selection filled with the accent color —
328 matching the v1 sidebar rows. */332 matching the v1 sidebar rows. */
329 readonly pane?: "screen" | "sidebar";333 readonly pane?: "screen" | "sidebar";
334 /** Keeps row hairlines inside a section; section headers draw their own rule. */
335 readonly showTrailingDivider?: boolean;
330 /** Highlights the thread open in the detail pane (iPad split view). The336 /** Highlights the thread open in the detail pane (iPad split view). The
331 compact Home list never sets it — phones navigate away on select. */337 compact Home list never sets it — phones navigate away on select. */
332 readonly selected?: boolean;338 readonly selected?: boolean;
...@@ -728,7 +734,9 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {...@@ -728,7 +734,9 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
728 actions reveal behind the row. */734 actions reveal behind the row. */
729 <View className="bg-screen">735 <View className="bg-screen">
730 <View className="px-5 py-2.5">{cardContent}</View>736 <View className="px-5 py-2.5">{cardContent}</View>
731 <View className="ml-5 h-px bg-border-subtle" />737 {props.showTrailingDivider !== false ? (
738 <View className="ml-5 h-px bg-border-subtle" />
739 ) : null}
732 </View>740 </View>
733 )}741 )}
734 </Pressable>742 </Pressable>