Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions apps/mobile/src/agent-ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function AgentStatus() {
return (
<View style={{ gap: 8 }}>
<ErrorNotice error={error ? `Agent updates unavailable. ${error}` : ""} />
{error && (
{!!error && (
<Button small onPress={() => void refresh().catch(() => {})}>
Reconnect agent
</Button>
Expand Down Expand Up @@ -523,7 +523,7 @@ export function TaskDetail({ taskId }: { taskId: string }) {
))}
</Card>
)}
{task.result && (
{!!task.result && (
<Card style={{ backgroundColor: colors.green }}>
<Text selectable style={s.text}>
{resultSummary(task.result)}
Expand Down Expand Up @@ -1036,7 +1036,7 @@ export function IdeasScreen() {
<Card key={idea.id} style={{ gap: 7 }}>
<Text style={s.heading}>{idea.title}</Text>
<Chip tint={colors.green}>Started</Chip>
{idea.taskId && <TaskLink taskId={idea.taskId} />}
{!!idea.taskId && <TaskLink taskId={idea.taskId} />}
</Card>
))}
</View>
Expand Down Expand Up @@ -1582,7 +1582,7 @@ function MonitorCard({ monitor, onOpenTask }: { monitor: Monitor; onOpenTask?: (
Last check: {stamp(monitor.lastCheckedAt)}
{monitor.status === "active" ? `\nNext check: ${stamp(monitor.nextCheckAt)}` : ""}
</Text>
{monitor.lastValue && (
{!!monitor.lastValue && (
<Text selectable numberOfLines={5} style={s.muted}>
{monitor.lastValue}
</Text>
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ export function ChatScreen({
</View>
)}
<ErrorNotice error={error} />
{error && (
{!!error && (
<Button
style={{ alignSelf: "flex-start" }}
icon={RotateCcw}
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/computer-workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export function LinuxWorkspace({ tab }: { tab: "Terminal" | "Files" }) {
</View>
{!snapshot && !error && <ActivityIndicator color={colors.blueDark} />}
</View>
{snapshot?.message && <Text style={s.small}>{snapshot.message}</Text>}
{!!snapshot?.message && <Text style={s.small}>{snapshot.message}</Text>}
{snapshot?.enabled && (
<View style={[s.row, { gap: 8, flexWrap: "wrap" }]}>
{running ? (
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/src/details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function MailDetail({ mail: m }: { mail: Mail }) {
</Card>
))}
<ErrorNotice error={error} />
{error && <Button onPress={() => setRetry(retry + 1)}>Reload conversation</Button>}
{!!error && <Button onPress={() => setRetry(retry + 1)}>Reload conversation</Button>}
<Button
primary
icon={Reply}
Expand Down Expand Up @@ -674,7 +674,7 @@ function ReviewDetail({ initial }: { initial: ActionProposal }) {
)}
</Card>
<ErrorNotice error={error || action.error} />
{action.result && (
{!!action.result && (
<Card style={{ marginTop: 16, backgroundColor: colors.green, padding: 18 }}>
<Text selectable style={s.text}>
{resultSummary(action.result)}
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/src/screens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ export function CalendarScreen() {
{selected?.name || "Your calendar"} · {zone}. Events show their own time zone.
</Text>
<ErrorNotice error={error} />
{error && (
{!!error && (
<Button small onPress={() => setRetry(retry + 1)}>
Try again
</Button>
Expand Down Expand Up @@ -898,7 +898,7 @@ export function BrowserScreen() {
<Chip tint={b.status === "active" ? colors.green : colors.canvas}>{b.status}</Chip>
<ArrowUpRight size={17} color={colors.muted} />
</View>
{b.previewUrl && (
{!!b.previewUrl && (
<Image
source={{ uri: api.url(b.previewUrl) }}
resizeMode="cover"
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/thread-artifacts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export function TaskThreadCard({ task }: { task: AgentTask }) {
<ArtifactCard key={artifact.id} artifact={artifact} />
))}
<ErrorNotice error={error} />
{error && (
{!!error && (
<Button small onPress={() => setAttempt((value) => value + 1)}>
Reload task results
</Button>
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/src/ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ export function Sheet({
>
<View style={{ flex: 1, gap: 4 }}>
<Text style={s.title}>{title}</Text>
{subtitle && <Text style={s.muted}>{subtitle}</Text>}
{!!subtitle && <Text style={s.muted}>{subtitle}</Text>}
</View>
<IconButton icon={X} label="Close details" onPress={onClose} />
</View>
Expand Down Expand Up @@ -393,7 +393,7 @@ export function LinkRow({
</View>
<View style={{ flex: 1, gap: 3 }}>
<Text style={[s.text, { fontWeight: "500" }]}>{title}</Text>
{detail && <Text style={s.small}>{detail}</Text>}
{!!detail && <Text style={s.small}>{detail}</Text>}
</View>
<ChevronRight size={15} color={colors.muted} />
</Pressable>
Expand Down
Loading