Skip to content

Commit 71c11ac

Browse files
committed
feat: add workspace symphony dashboard
1 parent 6f69375 commit 71c11ac

33 files changed

Lines changed: 4712 additions & 120 deletions

src-tauri/Cargo.lock

Lines changed: 68 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ libc = "0.2"
4343
chrono = { version = "0.4", features = ["clock"] }
4444
shell-words = "1.1"
4545
toml_edit = "0.20.2"
46+
rusqlite = { version = "0.32", features = ["bundled"] }
4647

4748
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
4849
tauri-plugin-updater = "2.10.0"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"version": "0.1.0-codexmonitor",
3+
"binaries": {
4+
"darwin-aarch64": "codex_monitor_symphony",
5+
"darwin-x86_64": "codex_monitor_symphony",
6+
"linux-x86_64": "codex_monitor_symphony",
7+
"windows-x86_64": "codex_monitor_symphony.exe"
8+
},
9+
"notes": "Place pinned CodexMonitor Symphony release binaries in this directory for bundle builds."
10+
}

src-tauri/src/backend/events.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
use serde::Serialize;
22
use serde_json::Value;
33

4+
use crate::types::WorkspaceSymphonyEvent;
5+
46
#[derive(Serialize, Clone)]
57
pub(crate) struct AppServerEvent {
68
pub(crate) workspace_id: String,
@@ -28,4 +30,5 @@ pub(crate) trait EventSink: Clone + Send + Sync + 'static {
2830
fn emit_app_server_event(&self, event: AppServerEvent);
2931
fn emit_terminal_output(&self, event: TerminalOutput);
3032
fn emit_terminal_exit(&self, event: TerminalExit);
33+
fn emit_workspace_symphony_event(&self, event: WorkspaceSymphonyEvent);
3134
}

src-tauri/src/bin/codex_monitor_daemon.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ mod rules;
2323
mod shared;
2424
#[path = "../storage.rs"]
2525
mod storage;
26+
#[path = "../symphony_binary.rs"]
27+
mod symphony_binary;
2628
#[path = "codex_monitor_daemon/transport.rs"]
2729
mod transport;
2830
#[allow(dead_code)]
@@ -82,13 +84,13 @@ use shared::process_core::kill_child_process_tree;
8284
use shared::prompts_core::{self, CustomPromptEntry};
8385
use shared::{
8486
agents_config_core, codex_aux_core, codex_core, files_core, git_core, git_ui_core,
85-
local_usage_core, settings_core, workspaces_core, worktree_core,
87+
local_usage_core, settings_core, symphony_core, workspaces_core, worktree_core,
8688
};
8789
use storage::{read_settings, read_workspaces};
8890
use types::{
8991
AppSettings, GitCommitDiff, GitFileDiff, GitHubIssuesResponse, GitHubPullRequestComment,
9092
GitHubPullRequestDiff, GitHubPullRequestsResponse, GitLogResponse, LocalUsageSnapshot,
91-
WorkspaceEntry, WorkspaceInfo, WorkspaceSettings, WorktreeSetupStatus,
93+
WorkspaceEntry, WorkspaceInfo, WorkspaceSettings, WorkspaceSymphonyEvent, WorktreeSetupStatus,
9294
};
9395
use workspace_settings::apply_workspace_settings_update;
9496

@@ -122,6 +124,7 @@ struct DaemonEventSink {
122124
#[derive(Clone)]
123125
enum DaemonEvent {
124126
AppServer(AppServerEvent),
127+
WorkspaceSymphony(WorkspaceSymphonyEvent),
125128
#[allow(dead_code)]
126129
TerminalOutput(TerminalOutput),
127130
#[allow(dead_code)]
@@ -140,6 +143,10 @@ impl EventSink for DaemonEventSink {
140143
fn emit_terminal_exit(&self, event: TerminalExit) {
141144
let _ = self.tx.send(DaemonEvent::TerminalExit(event));
142145
}
146+
147+
fn emit_workspace_symphony_event(&self, event: WorkspaceSymphonyEvent) {
148+
let _ = self.tx.send(DaemonEvent::WorkspaceSymphony(event));
149+
}
143150
}
144151

145152
struct DaemonConfig {
@@ -158,6 +165,7 @@ struct DaemonState {
158165
event_sink: DaemonEventSink,
159166
codex_login_cancels: Mutex<HashMap<String, CodexLoginCancelState>>,
160167
daemon_binary_path: Option<String>,
168+
symphony_runtimes: Arc<symphony_core::SymphonyRuntimeRegistry>,
161169
}
162170

163171
#[derive(Serialize, Deserialize)]
@@ -185,6 +193,7 @@ impl DaemonState {
185193
event_sink,
186194
codex_login_cancels: Mutex::new(HashMap::new()),
187195
daemon_binary_path,
196+
symphony_runtimes: Arc::new(Mutex::new(HashMap::new())),
188197
}
189198
}
190199

@@ -757,8 +766,7 @@ impl DaemonState {
757766
limit: Option<u32>,
758767
sort_key: Option<String>,
759768
) -> Result<Value, String> {
760-
codex_core::list_threads_core(&self.sessions, workspace_id, cursor, limit, sort_key)
761-
.await
769+
codex_core::list_threads_core(&self.sessions, workspace_id, cursor, limit, sort_key).await
762770
}
763771

764772
async fn list_mcp_server_status(

src-tauri/src/bin/codex_monitor_daemon/rpc.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ fn build_event_notification(event: DaemonEvent) -> Option<String> {
4141
"method": "app-server-event",
4242
"params": payload,
4343
}),
44+
DaemonEvent::WorkspaceSymphony(payload) => json!({
45+
"method": "workspace-symphony-event",
46+
"params": payload,
47+
}),
4448
DaemonEvent::TerminalOutput(payload) => json!({
4549
"method": "terminal-output",
4650
"params": payload,
@@ -85,10 +89,7 @@ pub(super) fn parse_optional_string(value: &Value, key: &str) -> Option<String>
8589
}
8690
}
8791

88-
pub(super) fn parse_optional_nullable_string(
89-
value: &Value,
90-
key: &str,
91-
) -> Option<Option<String>> {
92+
pub(super) fn parse_optional_nullable_string(value: &Value, key: &str) -> Option<Option<String>> {
9293
match value {
9394
Value::Object(map) => match map.get(key) {
9495
Some(Value::Null) => Some(None),

0 commit comments

Comments
 (0)