Skip to content

Commit a333ddb

Browse files
committed
feat(ui): introduce scroll area, sonner, and refactor dialogs
feat(ui): add scroll area component and integrate into dashboard tables feat(ui): add sonner for toast notifications and integrate for updates feat(ui): add new button sizes for improved UI consistency feat(ui): add option to show close button in dialog footer refactor(ui): remove deprecated theme and mode toggle components refactor(alert-dialog): enhance flexibility with size prop and media component refactor(alert-dialog): update action and cancel buttons to use Button component style(ui): adjust dialog content styling for responsiveness style(ui): update Antigravity "Other" group icon to OpenAI style(ui): refine alert dialog styling in providers page fix(cli-proxy): improve process termination robustness fix(cli-proxy): store executable name for fallback process killing fix(cli-proxy): implement fallback taskkill by name on Windows for cleanup feat(api): implement API health check for CLI proxy feat(api): add `isApiHealthy` state and `checkApiHealth` action refactor(dashboard): use API health status instead of server running status refactor(api): remove unused client methods refactor(api): remove put, patch, and postForm methods from ApiClient chore(deps): update .gitignore and package version chore(deps): add .env to gitignore chore(deps): update tauri.conf.json version to 1.0.8 chore(deps): remove @tauri-apps/plugin-opener dependency docs(screenshots): update dashboard and provider screenshots
1 parent 89c5cdb commit a333ddb

25 files changed

Lines changed: 299 additions & 231 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ Cargo.lock
3232
~/.tauri/
3333
*.key
3434
*.key.pub
35+
.env

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
"@radix-ui/react-dialog": "^1.1.15",
1515
"@radix-ui/react-label": "^2.1.8",
1616
"@radix-ui/react-progress": "^1.1.8",
17+
"@radix-ui/react-scroll-area": "^1.2.10",
1718
"@radix-ui/react-select": "^2.2.6",
1819
"@radix-ui/react-slot": "^1.2.4",
1920
"@tailwindcss/vite": "^4.1.18",
2021
"@tauri-apps/api": "^2",
2122
"@tauri-apps/plugin-dialog": "^2.4.2",
22-
"@tauri-apps/plugin-opener": "^2.5.2",
2323
"@tauri-apps/plugin-process": "^2.3.1",
2424
"@tauri-apps/plugin-shell": "^2.3.3",
2525
"@tauri-apps/plugin-updater": "^2.9.0",
@@ -33,6 +33,7 @@
3333
"react-i18next": "^16.4.0",
3434
"react-router-dom": "^7.10.1",
3535
"recharts": "^2.15.4",
36+
"sonner": "^2.0.7",
3637
"tailwind-merge": "^3.4.0",
3738
"tailwindcss": "^4.1.18",
3839
"zustand": "^5.0.9"

screenshots/dashboard.png

83.9 KB
Loading

screenshots/providers.png

1.09 KB
Loading

screenshots/quota.png

-982 Bytes
Loading

screenshots/quota2.png

618 Bytes
Loading

screenshots/settings.png

2.53 KB
Loading

src-tauri/src/commands/cli_proxy.rs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ pub async fn start_cli_proxy(exe_path: String) -> CommandResult<u32> {
4949
let pid = child.id();
5050
*guard = Some(child);
5151

52+
// Store executable name for cleanup
53+
if let Ok(mut name_guard) = crate::state::CLI_PROXY_NAME.lock() {
54+
if let Some(name) = exe.file_name().and_then(|n| n.to_str()) {
55+
*name_guard = Some(name.to_string());
56+
}
57+
}
58+
5259
Ok(pid)
5360
}
5461

@@ -79,6 +86,26 @@ pub async fn stop_cli_proxy() -> CommandResult<()> {
7986
}
8087

8188
*guard = None;
89+
90+
// Fallback: kill by name if available
91+
if let Ok(mut name_guard) = crate::state::CLI_PROXY_NAME.lock() {
92+
if let Some(ref name) = *name_guard {
93+
if name.to_lowercase().contains("cliproxy") {
94+
#[cfg(windows)]
95+
{
96+
use std::process::Command;
97+
use std::os::windows::process::CommandExt;
98+
const CREATE_NO_WINDOW: u32 = 0x08000000;
99+
100+
let _ = Command::new("taskkill")
101+
.args(["/F", "/T", "/IM", name])
102+
.creation_flags(CREATE_NO_WINDOW)
103+
.output();
104+
}
105+
}
106+
}
107+
*name_guard = None;
108+
}
82109
Ok(())
83110
}
84111

src-tauri/src/lib.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,27 @@ fn cleanup_on_exit() {
3737
}
3838
*guard = None;
3939
}
40+
41+
// Fallback: kill by name if available (catches detached processes/launchers)
42+
if let Ok(mut name_guard) = state::CLI_PROXY_NAME.lock() {
43+
if let Some(ref name) = *name_guard {
44+
// Safety: Only kill if name looks like our proxy to avoid collateral damage
45+
if name.to_lowercase().contains("cliproxy") {
46+
#[cfg(windows)]
47+
{
48+
use std::process::Command;
49+
use std::os::windows::process::CommandExt;
50+
const CREATE_NO_WINDOW: u32 = 0x08000000;
51+
52+
let _ = Command::new("taskkill")
53+
.args(["/F", "/T", "/IM", name])
54+
.creation_flags(CREATE_NO_WINDOW)
55+
.output();
56+
}
57+
}
58+
}
59+
*name_guard = None;
60+
}
4061
}
4162

4263
#[cfg_attr(mobile, tauri::mobile_entry_point)]

src-tauri/src/state.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ use std::sync::atomic::{AtomicBool, Ordering};
66

77
/// CLI Proxy process state
88
pub static CLI_PROXY_PROCESS: Mutex<Option<Child>> = Mutex::new(None);
9+
/// CLI Proxy executable name (for fallback kill)
10+
pub static CLI_PROXY_NAME: Mutex<Option<String>> = Mutex::new(None);
911

1012
/// Run in background setting (hide to tray on close) - default false, synced from frontend on startup
1113
pub static RUN_IN_BACKGROUND: AtomicBool = AtomicBool::new(false);

0 commit comments

Comments
 (0)