feat: native clipboard image sync (Linux, opt-in sync_images)

This commit is contained in:
2026-08-14 09:51:25 -04:00
parent 884415c1c1
commit 147cba6d2a
15 changed files with 274 additions and 48 deletions
+16
View File
@@ -69,6 +69,22 @@ func TestShouldAcceptNewContent(t *testing.T) {
}
}
func TestShouldIgnoreDuplicateImageHash(t *testing.T) {
f := NewFilter("machine-a")
f.MarkWrittenPayload(Payload{Mime: "image/png", Data: "aGVsbG8="})
p := Payload{
Mime: "image/png",
Data: "aGVsbG8=",
Ts: time.Now().UnixNano(),
Origin: "machine-b",
}
if !f.ShouldIgnore(p) {
t.Error("should ignore image payload with recently written data hash")
}
}
func TestCacheEviction(t *testing.T) {
f := NewFilter("machine-a")