Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix test compilation errors after API changes

Louis Beaumontd3bfa6b01768
diff --git a/screenpipe-db/benches/db_benchmarks.rs b/screenpipe-db/benches/db_benchmarks.rs
index 8264f58e1..a307fd783 100644
--- a/screenpipe-db/benches/db_benchmarks.rs
+++ b/screenpipe-db/benches/db_benchmarks.rs
@@ -16,7 +16,7 @@ async fn setup_large_db(size: usize) -> DatabaseManager {
.await
.unwrap();
let frame_id = db
- .insert_frame("test_device", None, None, None, None, false)
+ .insert_frame("test_device", None, None, None, None, false, None)
.await
.unwrap();
let ocr_text = format!("OCR text {}", rng.gen::<u32>());
@@ -86,6 +86,7 @@ fn bench_search(c: &mut Criterion) {
None,
None,
None,
+ None,
)
.await
.unwrap()
diff --git a/screenpipe-db/tests/db.rs b/screenpipe-db/tests/db.rs
index 9f4150867..758f1dcfd 100644
--- a/screenpipe-db/tests/db.rs
+++ b/screenpipe-db/tests/db.rs
@@ -37,7 +37,15 @@ mod tests {
.await
.unwrap();
let frame_id = db
- .insert_frame("test_device", None, None, Some("test"), Some(""), false)
+ .insert_frame(
+ "test_device",
+ None,
+ None,
+ Some("test"),
+ Some(""),
+ false,
+ None,
+ )
.await
.unwrap();
db.insert_ocr_text(
@@ -65,6 +73,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -113,6 +122,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -134,6 +144,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -189,6 +200,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -210,6 +222,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -232,7 +245,15 @@ mod tests {
.await
.unwrap();
let frame_id = db
- .insert_frame("test_device", None, None, Some("test"), Some(""), false)
+ .insert_frame(
+ "test_device",
+ None,
+ None,
+ Some("test"),
+ Some(""),
+ false,
+ None,
+ )
.await
.unwrap();
@@ -297,6 +318,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -318,6 +340,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -348,7 +371,15 @@ mod tests {
.await
.unwrap();
let frame_id1 = db
- .insert_frame("test_device", None, None, Some("test"), Some(""), false)
+ .insert_frame(
+ "test_device",
+ None,
+ None,
+ Some("test"),
+ Some(""),
+ false,
+ None,
+ )
.await
.unwrap();
db.insert_ocr_text(
@@ -388,7 +419,15 @@ mod tests {
// Insert remaining data
let frame_id2 = db
- .insert_frame("test_device", None, None, Some("test"), Some(""), false)
+ .insert_frame(
+ "test_device",
+ None,
+ None,
+ Some("test"),
+ Some(""),
+ false,
+ None,
+ )
.await
.unwrap();
db.insert_ocr_text(
@@ -458,14 +497,14 @@ mod tests {
// After inserting both audio transcriptions, let's check all audio entries
let all_audio = db
- .search_audio("", 100, 0, None, None, None, None, None)
+ .search_audio("", 100, 0, None, None, None, None, None, None)
.await
.unwrap();
println!("All audio entries: {:?}", all_audio);
// Then try specific search
let audio_results = db
- .search_audio("2", 100, 0, None, None, None, None, None)
+ .search_audio("2", 100, 0, None, None, None, None, None, None)
.await
.unwrap();
println!("Audio results for '2': {:?}", audio_results);
@@ -489,6 +528,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -513,6 +553,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -536,6 +577,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -563,6 +605,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -585,6 +628,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -603,7 +647,15 @@ mod tests {
.await
.unwrap();
let frame_id1 = db
- .insert_frame("test_device", None, None, Some("test"), Some(""), false)
+ .insert_frame(
+ "test_device",
+ None,
+ None,
+ Some("test"),
+ Some(""),
+ false,
+ None,
+ )
.await
.unwrap();
db.insert_ocr_text(
@@ -641,7 +693,15 @@ mod tests {
// Insert remaining data
let frame_id2 = db
- .insert_frame("test_device", None, None, Some("test"), Some(""), false)
+ .insert_frame(
+ "test_device",
+ None,
+ None,
+ Some("test"),
+ Some(""),
+ false,
+ None,
+ )
.await
.unwrap();
db.insert_ocr_text(
@@ -690,6 +750,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -716,6 +777,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1074,7 +1136,15 @@ mod tests {
// Insert first frame with OCR
let frame_id1 = db
- .insert_frame("test_device", None, None, Some("test"), Some(""), false)
+ .insert_frame(
+ "test_device",
+ None,
+ None,
+ Some("test"),
+ Some(""),
+ false,
+ None,
+ )
.await
.unwrap();
db.insert_ocr_text(
@@ -1088,7 +1158,15 @@ mod tests {
// Insert second frame with OCR
let frame_id2 = db
- .insert_frame("test_device", None, None, Some("test"), Some(""), false)
+ .insert_frame(
+ "test_device",
+ None,
+ None,
+ Some("test"),
+ Some(""),
+ false,
+ None,
+ )
.await
.unwrap();
db.insert_ocr_text(
@@ -1117,6 +1195,7 @@ mod tests {
Some("test_video"),
None,
None,
+ None,
)
.await
.unwrap();
@@ -1144,6 +1223,7 @@ mod tests {
Some("non_existent"),
None,
None,
+ None,
)
.await
.unwrap();
@@ -1171,6 +1251,7 @@ mod tests {
Some("test_video"),
None,
None,
+ None,
)
.await
.unwrap();
@@ -1196,6 +1277,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1245,6 +1327,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1274,6 +1357,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1296,6 +1380,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1318,6 +1403,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1334,7 +1420,15 @@ mod tests {
.await
.unwrap();
let frame_id = db
- .insert_frame("test_device", None, None, Some("test"), Some(""), false)
+ .insert_frame(
+ "test_device",
+ None,
+ None,
+ Some("test"),
+ Some(""),
+ false,
+ None,
+ )
.await
.unwrap();
db.insert_ocr_text(
@@ -1400,6 +1494,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1420,6 +1515,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -1440,6 +1536,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
diff --git a/screenpipe-db/tests/timeline_performance_test.rs b/screenpipe-db/tests/timeline_performance_test.rs
index 14bc3d123..473e87026 100644
--- a/screenpipe-db/tests/timeline_performance_test.rs
+++ b/screenpipe-db/tests/timeline_performance_test.rs
@@ -44,6 +44,7 @@ mod timeline_performance_tests {
Some(&format!("App{}", i % 10)), // Rotate through 10 apps
Some(&format!("Window {}", i)),
false,
+ None,
)
.await
.unwrap();
diff --git a/screenpipe-server/tests/endpoint_test.rs b/screenpipe-server/tests/endpoint_test.rs
index 09baf8934..3c3e094e4 100644
--- a/screenpipe-server/tests/endpoint_test.rs
+++ b/screenpipe-server/tests/endpoint_test.rs
@@ -180,11 +180,11 @@ mod tests {
.await
.unwrap();
let frame_id1 = db
- .insert_frame("test_device", None, None, None, None, true)
+ .insert_frame("test_device", None, None, None, None, true, None)
.await
.unwrap();
let frame_id2 = db
- .insert_frame("test_device", None, None, None, None, true)
+ .insert_frame("test_device", None, None, None, None, true, None)
.await
.unwrap();
db.insert_ocr_text(
@@ -254,6 +254,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -274,6 +275,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -294,6 +296,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -314,6 +317,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -334,6 +338,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -354,6 +359,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -374,6 +380,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -391,7 +398,7 @@ mod tests {
.await
.unwrap();
let frame_id1 = db
- .insert_frame("test_device", None, None, None, None, true)
+ .insert_frame("test_device", None, None, None, None, true, None)
.await
.unwrap();
let audio_chunk_id1 = db.insert_audio_chunk("test_audio1.wav").await.unwrap();
@@ -459,6 +466,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -480,6 +488,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -502,6 +511,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -528,6 +538,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -553,6 +564,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -572,6 +584,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -594,7 +607,7 @@ mod tests {
.await
.unwrap();
let old_frame_id = db
- .insert_frame("test_device", None, None, None, None, true)
+ .insert_frame("test_device", None, None, None, None, true, None)
.await
.unwrap();
@@ -604,7 +617,7 @@ mod tests {
.await
.unwrap();
let recent_frame_id = db
- .insert_frame("test_device", None, None, None, None, true)
+ .insert_frame("test_device", None, None, None, None, true, None)
.await
.unwrap();
@@ -658,6 +671,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -688,6 +702,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -734,6 +749,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
@@ -757,6 +773,7 @@ mod tests {
None,
None,
None,
+ None,
)
.await
.unwrap();
diff --git a/screenpipe-server/tests/tags_test.rs b/screenpipe-server/tests/tags_test.rs
index 6221eb444..10bcd0e22 100644
--- a/screenpipe-server/tests/tags_test.rs
+++ b/screenpipe-server/tests/tags_test.rs
@@ -371,6 +371,7 @@ async fn insert_test_data(db: &Arc<DatabaseManager>) {
Some("test_app"),
Some("test_window"),
true,
+ None,
)
.await
.unwrap();
diff --git a/screenpipe-server/tests/video_utils_test.rs b/screenpipe-server/tests/video_utils_test.rs
index 17566e2ce..f626efd0d 100644
--- a/screenpipe-server/tests/video_utils_test.rs
+++ b/screenpipe-server/tests/video_utils_test.rs
@@ -132,6 +132,11 @@ async fn test_extract_frames_and_ocr() -> Result<()> {
app_name: "test_app".to_string(),
is_focused: true,
process_id: 1234,
+ browser_url: None,
+ window_x: 0,
+ window_y: 0,
+ window_width: first_frame.width(),
+ window_height: first_frame.height(),
};
// perform ocr using apple native (macos only)