diff --git a/frontend/src/App.css b/frontend/src/App.css index 42a89025..1e31af96 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -127,13 +127,13 @@ details summary::-webkit-details-marker { display: none; } -details[open] summary span:first-child { - transform: rotate(90deg); - display: inline-block; +details summary span:first-child { transition: transform 0.2s ease; } -details summary span:first-child { +details[open] summary span:first-child { + transform: rotate(90deg); + display: inline-block; transition: transform 0.2s ease; } diff --git a/frontend/src/types.ts b/frontend/src/types.ts index 19a1918a..18e0c608 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -70,11 +70,11 @@ export type WsResponse = // Re-export API client types for convenience export type { + CommandOutput as ApiCommandOutput, + FileEntry as ApiFileEntry, Message as ApiMessage, ProviderConfig as ApiProviderConfig, - FileEntry as ApiFileEntry, SearchResult as ApiSearchResult, - CommandOutput as ApiCommandOutput, WsRequest as ApiWsRequest, WsResponse as ApiWsResponse, }; diff --git a/server/src/agents/pool/auto_assign/scan.rs b/server/src/agents/pool/auto_assign/scan.rs index ac3a9d2b..24ffbc6b 100644 --- a/server/src/agents/pool/auto_assign/scan.rs +++ b/server/src/agents/pool/auto_assign/scan.rs @@ -154,6 +154,7 @@ mod tests { project_root: None, log_session_id: None, merge_failure_reported: false, + throttled: false, } } diff --git a/server/src/agents/pool/lifecycle.rs b/server/src/agents/pool/lifecycle.rs index dbe11183..55c2ad6c 100644 --- a/server/src/agents/pool/lifecycle.rs +++ b/server/src/agents/pool/lifecycle.rs @@ -552,6 +552,7 @@ impl AgentPool { base_branch: None, completion: None, log_session_id: Some(log_session_id), + throttled: false, }) } @@ -676,6 +677,7 @@ impl AgentPool { base_branch: None, completion: None, log_session_id: None, + throttled: false, } }); } diff --git a/server/src/agents/pool/mod.rs b/server/src/agents/pool/mod.rs index e68381eb..5458d54e 100644 --- a/server/src/agents/pool/mod.rs +++ b/server/src/agents/pool/mod.rs @@ -71,10 +71,10 @@ impl AgentPool { _ => continue, }; let key = composite_key(&story_id, &agent_name); - if let Ok(mut agents) = agents_clone.lock() { - if let Some(agent) = agents.get_mut(&key) { - agent.throttled = true; - } + if let Ok(mut agents) = agents_clone.lock() + && let Some(agent) = agents.get_mut(&key) + { + agent.throttled = true; } let _ = watcher_tx_clone.send(WatcherEvent::AgentStateChanged); } diff --git a/server/src/agents/pool/test_helpers.rs b/server/src/agents/pool/test_helpers.rs index d5ffeaa7..0f04c384 100644 --- a/server/src/agents/pool/test_helpers.rs +++ b/server/src/agents/pool/test_helpers.rs @@ -33,6 +33,7 @@ impl AgentPool { project_root: None, log_session_id: None, merge_failure_reported: false, + throttled: false, }, ); tx @@ -68,6 +69,7 @@ impl AgentPool { project_root: None, log_session_id: None, merge_failure_reported: false, + throttled: false, }, ); tx @@ -100,6 +102,7 @@ impl AgentPool { project_root: Some(project_root), log_session_id: None, merge_failure_reported: false, + throttled: false, }, ); tx @@ -131,6 +134,7 @@ impl AgentPool { project_root: None, log_session_id: None, merge_failure_reported: false, + throttled: false, }, ); tx diff --git a/server/src/http/ws.rs b/server/src/http/ws.rs index a4c73fa5..fd6ca86c 100644 --- a/server/src/http/ws.rs +++ b/server/src/http/ws.rs @@ -158,8 +158,8 @@ impl From for Option { }), WatcherEvent::ConfigChanged => Some(WsResponse::AgentConfigChanged), WatcherEvent::AgentStateChanged => Some(WsResponse::AgentStateChanged), - // MergeFailure, RateLimitWarning, and StoryBlocked are handled by the - // chat notification listener only; no WebSocket message is needed for the frontend. + // MergeFailure, RateLimitWarning, StoryBlocked, and RateLimitHardBlock are handled + // by the chat notification listener only; no WebSocket message is needed for the frontend. WatcherEvent::MergeFailure { .. } => None, WatcherEvent::RateLimitWarning { .. } => None, WatcherEvent::StoryBlocked { .. } => None,