feat: add incident delete and clarify AI assistant settings
Release APK / build (push) Has been cancelled

Wire deleteIncident() into IncidentDetailScreen with a destructive confirm
dialog. Expand the AI settings section with base URL + model fields and an
explanatory card documenting the OpenAI-compatible use case (Ollama / OpenAI).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-23 13:24:56 +02:00
parent fee283b5d6
commit 7e42d3a26f
2 changed files with 88 additions and 10 deletions
+37 -1
View File
@@ -10,7 +10,7 @@ import {
import { useLocalSearchParams, router, useNavigation } from "expo-router";
import * as Clipboard from "expo-clipboard";
import * as SecureStore from "expo-secure-store";
import { getIncidentById, updateIncident } from "@/lib/db";
import { getIncidentById, updateIncident, deleteIncident } from "@/lib/db";
import { renderMarkdown } from "@/lib/markdown";
import { pushIncidentToGit } from "@/lib/git";
import type { GitProvider } from "@/lib/git";
@@ -54,6 +54,25 @@ export default function IncidentDetailScreen() {
}
}, [id]);
async function handleDelete() {
if (!incident) return;
Alert.alert(
"Delete incident?",
"This action cannot be undone.",
[
{ text: "Cancel", style: "cancel" },
{
text: "Delete",
style: "destructive",
onPress: async () => {
await deleteIncident(incident.id);
router.replace("/");
},
},
]
);
}
async function handleResolve() {
if (!incident) return;
await updateIncident(incident.id, { status: "resolved" });
@@ -291,6 +310,23 @@ export default function IncidentDetailScreen() {
Edit
</Text>
</Pressable>
<Pressable
onPress={handleDelete}
style={{
backgroundColor: "#ef444410",
borderWidth: 1,
borderColor: "#ef4444",
borderRadius: 10,
padding: 14,
alignItems: "center",
marginTop: 8,
}}
>
<Text style={{ color: "#ef4444", fontWeight: "600", fontSize: 15 }}>
Delete Incident
</Text>
</Pressable>
</View>
</ScrollView>
);