From 502bb79d9a063f05317a73bf072727d5fc67471d Mon Sep 17 00:00:00 2001 From: asemabdallah Date: Fri, 25 Sep 2026 02:14:53 +0300 Subject: [PATCH] fix: stop leaking empty strings into Views Conditions like {error && @@ -523,7 +523,7 @@ export function TaskDetail({ taskId }: { taskId: string }) { ))} )} - {task.result && ( + {!!task.result && ( {resultSummary(task.result)} @@ -1036,7 +1036,7 @@ export function IdeasScreen() { {idea.title} Started - {idea.taskId && } + {!!idea.taskId && } ))} @@ -1582,7 +1582,7 @@ function MonitorCard({ monitor, onOpenTask }: { monitor: Monitor; onOpenTask?: ( Last check: {stamp(monitor.lastCheckedAt)} {monitor.status === "active" ? `\nNext check: ${stamp(monitor.nextCheckAt)}` : ""} - {monitor.lastValue && ( + {!!monitor.lastValue && ( {monitor.lastValue} diff --git a/apps/mobile/src/chat.tsx b/apps/mobile/src/chat.tsx index 26f3d36e3..683332b10 100644 --- a/apps/mobile/src/chat.tsx +++ b/apps/mobile/src/chat.tsx @@ -540,7 +540,7 @@ export function ChatScreen({ )} - {error && ( + {!!error && ( } + {!!error && } @@ -898,7 +898,7 @@ export function BrowserScreen() { {b.status} - {b.previewUrl && ( + {!!b.previewUrl && ( ))} - {error && ( + {!!error && ( diff --git a/apps/mobile/src/ui.tsx b/apps/mobile/src/ui.tsx index e9e95afa1..ce36605cb 100644 --- a/apps/mobile/src/ui.tsx +++ b/apps/mobile/src/ui.tsx @@ -295,7 +295,7 @@ export function Sheet({ > {title} - {subtitle && {subtitle}} + {!!subtitle && {subtitle}} @@ -393,7 +393,7 @@ export function LinkRow({ {title} - {detail && {detail}} + {!!detail && {detail}}