Skip to content

A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.

Merge #948

Claude428ca10970e6
diff --cc windows/src-tauri/src/integrations.rs
index e0414099,2db7b318..f2364e7e
--- a/windows/src-tauri/src/integrations.rs
+++ b/windows/src-tauri/src/integrations.rs
@@@ -1340,39 -1325,21 +1351,55 @@@ mod tests
}
#[test]
+ fn stripe_balance_does_not_mix_different_currencies() {
+ let payload = json!({
+ "available": [
+ { "amount": 10000, "currency": "eur" },
+ { "amount": 5000, "currency": "usd" }
+ ],
+ "pending": [
+ { "amount": 2000, "currency": "eur" },
+ { "amount": 3000, "currency": "usd" }
+ ]
+ });
+ let (amount, currency) = parse_stripe_balance(&payload);
+ assert_eq!(currency, "eur");
+ assert_eq!(amount, 12000);
+ fn calculate_repo_pages_bounds_correctly() {
+ assert_eq!(calculate_repo_pages(0), 1);
+ assert_eq!(calculate_repo_pages(1), 1);
+ assert_eq!(calculate_repo_pages(100), 1);
+ assert_eq!(calculate_repo_pages(101), 2);
+ assert_eq!(calculate_repo_pages(200), 2);
+ assert_eq!(calculate_repo_pages(500), 5);
+ assert_eq!(calculate_repo_pages(5000), 50);
+ assert_eq!(calculate_repo_pages(9999), 50);
+ }
+
+ #[test]
+ fn sum_repo_stars_sums_stargazers_count() {
+ let repos = vec![
+ json!({ "name": "repo1", "stargazers_count": 42 }),
+ json!({ "name": "repo2", "stargazers_count": 10 }),
+ json!({ "name": "repo3" }),
+ json!({ "name": "repo4", "stargazers_count": 0 }),
+ ];
+ assert_eq!(sum_repo_stars(&repos), 52);
+ fn find_terminal_execution_skips_running_and_finds_terminal() {
+ let list = vec![
+ json!({ "id": "1", "status": "running" }),
+ json!({ "id": "2", "status": "waiting" }),
+ json!({ "id": "3", "status": "error" }),
+ json!({ "id": "4", "status": "success" }),
+ ];
+ let term = find_terminal_execution(&list).unwrap();
+ assert_eq!(term["id"], "3");
+ }
+
+ #[test]
+ fn parse_execution_id_handles_string_and_number() {
+ assert_eq!(parse_execution_id(&json!({ "id": "abc-123" })), Some("abc-123".to_string()));
+ assert_eq!(parse_execution_id(&json!({ "id": 42 })), Some("42".to_string()));
+ assert_eq!(parse_execution_id(&json!({ "foo": "bar" })), None);
}
}