diff --git a/src/App.tsx b/src/App.tsx index 6700a099..1f2ba40a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,5 @@ -import React, { useState } from "react"; +import React, { useState, useEffect } from "react"; +import { getVersion } from "@tauri-apps/api/app"; import { Routes, Route, NavLink, useLocation } from "react-router-dom"; import { Home, @@ -41,9 +42,14 @@ const settingsItems = [ export default function App() { const [collapsed, setCollapsed] = useState(false); + const [appVersion, setAppVersion] = useState(""); const theme = useSettingsStore((s) => s.theme); const location = useLocation(); + useEffect(() => { + getVersion().then(setAppVersion).catch(() => {}); + }, []); + return (
@@ -113,7 +119,7 @@ export default function App() { {/* Version */} {!collapsed && (
- v0.1.1 + {appVersion ? `v${appVersion}` : ""}
)} diff --git a/src/pages/Triage/index.tsx b/src/pages/Triage/index.tsx index 5d6aa54d..c34211ff 100644 --- a/src/pages/Triage/index.tsx +++ b/src/pages/Triage/index.tsx @@ -114,11 +114,13 @@ export default function Triage() { }; const handleSend = async (message: string) => { - if (!id || !currentIssue) return; + if (!id) return; - // Close intent: mark resolved and return to dashboard + // Close intent: works regardless of whether issue is fully loaded in session. + // Save the user's reason as a resolution step so the Resolution page is never empty. if (isCloseIntent(message) && pendingFiles.length === 0) { try { + await addFiveWhyCmd(id, 1, "Resolution", message, "Self-resolved by user"); await updateIssueCmd(id, { status: "resolved" }); navigate("/"); } catch (e) { @@ -127,6 +129,8 @@ export default function Triage() { return; } + if (!currentIssue) return; + const provider = getActiveProvider(); if (!provider) { setError("No AI provider configured. Go to Settings > AI Providers.");