From c77b64e26427cb09c0b2a2da1f06c80d493f8cc7 Mon Sep 17 00:00:00 2001 From: WuYongJie <549727955@qq.com> Date: Sun, 29 Nov 2026 01:11:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E5=9F=BA=E5=87=86=E5=A4=B9=E5=85=B7?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=E7=A6=BB=E7=BA=BF=E5=88=B6=E4=BD=9C=E5=9B=9E?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E7=BB=B4=E6=8C=81=E5=BF=83=E8=B7=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../crates/ui-egui/src/jiansun/agent_panel.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/detail-photocraft/crates/ui-egui/src/jiansun/agent_panel.rs b/apps/detail-photocraft/crates/ui-egui/src/jiansun/agent_panel.rs index f867c77c..b138562a 100644 --- a/apps/detail-photocraft/crates/ui-egui/src/jiansun/agent_panel.rs +++ b/apps/detail-photocraft/crates/ui-egui/src/jiansun/agent_panel.rs @@ -4199,6 +4199,7 @@ mod tests { let w = app.jiansun.as_mut().unwrap(); w.owner_doc = Some(doc.doc.id.0); w.observed_doc = w.owner_doc; + w.pi_binding = json!({"accountId":w.account["id"],"origin":w.origin}); let mut progress = w.workflow.production_progress().clone(); progress["pictureCells"] = json!((0..16).map(|i| json!({"slotId":format!("pic-{i}"),"label":format!("图位 {i}"),"state":"verified"})).collect::>()); progress["copyCells"] = json!(vec![json!({"state":"filled"}); 33]); @@ -4228,7 +4229,9 @@ mod tests { let mut harness = builder.build_eframe(move |cc| { PhotocraftApp::setup_context(&cc.egui_ctx, crate::theme::ThemeKind::ProMedium); crate::cjk_fonts::install_system_provider_for_tests(&cc.egui_ctx); - let images = &mut app.jiansun.as_mut().unwrap().agent_images; + let workspace = app.jiansun.as_mut().unwrap(); + workspace.pi_touched = Instant::now(); + let images = &mut workspace.agent_images; for index in 0..60 { let id = format!("candidate-{index}"); let image = egui::ColorImage::filled([96, 120], Color32::from_rgb(index * 3, 92, 52)); @@ -4275,6 +4278,8 @@ mod tests { let mut total = 0.0; let mut regions = [0.0; 6]; for _ in 0..600 { + // Keep the offline run connected across all 600 frames. + harness.state_mut().jiansun.as_mut().unwrap().pi_touched = Instant::now(); let started = Instant::now(); harness.step(); samples.push(started.elapsed().as_secs_f64() * 1000.0);