feat(ui-gpui): render-driven pulse via request_animation_frame() (GPUI native)

This commit is contained in:
Hibryda 2026-03-19 07:59:32 +01:00
parent 57e0e3a087
commit 573105eae6
2 changed files with 21 additions and 35 deletions

View file

@ -88,6 +88,7 @@ impl ProjectBox {
/// Initialize sub-views. Must be called after the ProjectBox entity is created.
pub fn init_subviews(&mut self, cx: &mut Context<Self>) {
eprintln!("[ProjectBox] init_subviews for {}", self.project.name);
// Create pulsing status dot
let dot_status = match self.project.agent.status {
AgentStatus::Running => DotStatus::Running,
@ -95,10 +96,8 @@ impl ProjectBox {
AgentStatus::Done => DotStatus::Done,
AgentStatus::Error => DotStatus::Error,
};
let status_dot = cx.new(|cx: &mut Context<PulsingDot>| {
let dot = PulsingDot::new(dot_status, 8.0);
dot.start_animation(cx);
dot
let status_dot = cx.new(|_cx: &mut Context<PulsingDot>| {
PulsingDot::new(dot_status, 8.0)
});
self.status_dot = Some(status_dot);