fix: close from chat works before issue loads; save user reason as resolution step; dynamic version
Some checks failed
Auto Tag / auto-tag (push) Successful in 4s
Release / build-linux-arm64 (push) Failing after 1m7s
Test / rust-fmt-check (push) Successful in 1m11s
Release / build-macos-arm64 (push) Successful in 4m37s
Test / rust-clippy (push) Successful in 7m20s
Test / rust-tests (push) Successful in 8m5s
Test / frontend-typecheck (push) Successful in 1m22s
Test / frontend-tests (push) Successful in 1m16s
Release / build-linux-amd64 (push) Successful in 16m17s
Release / build-windows-amd64 (push) Successful in 13m5s
Some checks failed
Auto Tag / auto-tag (push) Successful in 4s
Release / build-linux-arm64 (push) Failing after 1m7s
Test / rust-fmt-check (push) Successful in 1m11s
Release / build-macos-arm64 (push) Successful in 4m37s
Test / rust-clippy (push) Successful in 7m20s
Test / rust-tests (push) Successful in 8m5s
Test / frontend-typecheck (push) Successful in 1m22s
Test / frontend-tests (push) Successful in 1m16s
Release / build-linux-amd64 (push) Successful in 16m17s
Release / build-windows-amd64 (push) Successful in 13m5s
- Triage: move close intent check before the currentIssue guard so closing works even if the session hasn't fully initialized yet - Triage: save the user's close reason as a resolution step via addFiveWhyCmd before marking resolved, ensuring Resolution page is never empty - App: read version from Tauri getVersion() instead of hardcoded v0.1.1
This commit is contained in:
parent
47af97b68e
commit
f04b5dfe06
10
src/App.tsx
10
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 (
|
||||
<div className={theme === "dark" ? "dark" : ""}>
|
||||
<div className="grid h-screen" style={{ gridTemplateColumns: collapsed ? "64px 1fr" : "240px 1fr" }}>
|
||||
@ -113,7 +119,7 @@ export default function App() {
|
||||
{/* Version */}
|
||||
{!collapsed && (
|
||||
<div className="px-4 py-3 border-t text-xs text-muted-foreground">
|
||||
v0.1.1
|
||||
{appVersion ? `v${appVersion}` : ""}
|
||||
</div>
|
||||
)}
|
||||
</aside>
|
||||
|
||||
@ -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.");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user