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) {
694694 );
695695
696696 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);
698702 if (item.type === "v2-pending") {
699703 const pendingScopeKey = scopedProjectKey(
700704 item.pendingTask.message.environmentId,
......@@ -712,6 +716,7 @@ export function HomeScreen(props: HomeScreenProps) {
712716 : null
713717 }
714718 showPendingDivider={item.showPendingDivider}
719 showTrailingDivider={showTrailingDivider}
715720 onSelectPendingTask={props.onSelectPendingTask}
716721 onDeletePendingTask={props.onDeletePendingTask}
717722 />
......@@ -744,6 +749,7 @@ export function HomeScreen(props: HomeScreenProps) {
744749 pinned={item.item.pinned}
745750 snoozePresetMinute={nowMinute}
746751 snoozeWakeLabelText={item.snoozeWakeLabelText}
752 showTrailingDivider={showTrailingDivider}
747753 project={
748754 projectByKey.get(scopedProjectKey(thread.environmentId, thread.projectId)) ?? null
749755 }
......@@ -814,6 +820,7 @@ export function HomeScreen(props: HomeScreenProps) {
814820 serverConfigs,
815821 settlementEnvironmentIds,
816822 snoozeEnvironmentIds,
823 threadListV2Items,
817824 threadSearchMatchByKey,
818825 toggleSettledShelf,
819826 toggleSnoozedShelf,
apps/mobile/src/features/threads/thread-list-v2-items.tsx+10-2
......@@ -204,6 +204,8 @@ export const ThreadListV2PendingRow = memo(function ThreadListV2PendingRow(props
204204 readonly pane?: "screen" | "sidebar";
205205 /** Draws the "Pending" divider above the first queued row. */
206206 readonly showPendingDivider: boolean;
207 /** Keeps row hairlines inside a section; section headers draw their own rule. */
208 readonly showTrailingDivider?: boolean;
207209 readonly onSelectPendingTask: (pendingTask: PendingNewTask) => void;
208210 readonly onDeletePendingTask: (pendingTask: PendingNewTask) => void;
209211}) {
......@@ -291,7 +293,9 @@ export const ThreadListV2PendingRow = memo(function ThreadListV2PendingRow(props
291293 ) : (
292294 <View className="bg-screen">
293295 <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}
295299 </View>
296300 )}
297301 </Pressable>
......@@ -327,6 +331,8 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
327331 into the drawer surface, selection filled with the accent color —
328332 matching the v1 sidebar rows. */
329333 readonly pane?: "screen" | "sidebar";
334 /** Keeps row hairlines inside a section; section headers draw their own rule. */
335 readonly showTrailingDivider?: boolean;
330336 /** Highlights the thread open in the detail pane (iPad split view). The
331337 compact Home list never sets it — phones navigate away on select. */
332338 readonly selected?: boolean;
......@@ -728,7 +734,9 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
728734 actions reveal behind the row. */
729735 <View className="bg-screen">
730736 <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}
732740 </View>
733741 )}
734742 </Pressable>