From 9d23c191dce74ef04ed8f2a904e52c337b34b809 Mon Sep 17 00:00:00 2001 From: Duncan Date: Tue, 1 Sep 2026 10:47:09 -0400 Subject: [PATCH] fix(personas): add description + expectedUpdatedAt fields missing after main merge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After merging origin/main (cb3144999, #7126 public descriptions), two struct initializers need updating for the new description field introduced by that PR: - concurrent_edit_tests.rs: add description: None to AgentDefinition, UpdatePersonaRequest (×2), and ManagedAgentRecord initializers - personaTypes.ts: add expectedUpdatedAt to UpdatePersonaInput (moved from types.ts by #7126 but the field was not carried across) Co-authored-by: Will Pfleger Signed-off-by: Will Pfleger --- .../src/commands/personas/update/concurrent_edit_tests.rs | 4 ++++ desktop/src/shared/api/personaTypes.ts | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/desktop/src-tauri/src/commands/personas/update/concurrent_edit_tests.rs b/desktop/src-tauri/src/commands/personas/update/concurrent_edit_tests.rs index e02d7e4173..23263fe60d 100644 --- a/desktop/src-tauri/src/commands/personas/update/concurrent_edit_tests.rs +++ b/desktop/src-tauri/src/commands/personas/update/concurrent_edit_tests.rs @@ -36,6 +36,7 @@ fn persona(id: &str, display_name: &str, updated_at: &str) -> AgentDefinition { id: id.to_string(), display_name: display_name.to_string(), avatar_url: None, + description: None, system_prompt: "Do the work.".to_string(), runtime: None, model: None, @@ -151,6 +152,7 @@ fn update_request(id: &str, display_name: &str, expected: Option<&str>) -> Updat id: id.to_string(), display_name: display_name.to_string(), avatar_url: None, + description: None, system_prompt: "Do the work.".to_string(), runtime: None, model: None, @@ -459,6 +461,7 @@ async fn linked_instance_rename_completes_before_retain_error_propagates() { respond_to: Default::default(), respond_to_allowlist: vec![], display_name: Some("Alice".to_string()), + description: None, slug: None, runtime: None, name_pool: vec![], @@ -485,6 +488,7 @@ async fn linked_instance_rename_completes_before_retain_error_propagates() { id: "p1".to_string(), display_name: "Alice Renamed".to_string(), avatar_url: None, + description: None, system_prompt: "Do the work.".to_string(), runtime: None, model: None, diff --git a/desktop/src/shared/api/personaTypes.ts b/desktop/src/shared/api/personaTypes.ts index f18e9fe96b..8dd7cf2d9e 100644 --- a/desktop/src/shared/api/personaTypes.ts +++ b/desktop/src/shared/api/personaTypes.ts @@ -95,4 +95,11 @@ export type UpdatePersonaInput = { namePool?: string[]; envVars?: Record; behavior?: PersonaBehaviorInput; + /** + * Seed-time definition revision for the backend's lock-held compare-and-swap. + * When present the backend rejects the write if the persisted `updated_at` + * has advanced since the editor was seeded — preventing a stale full-replacement + * from clobbering a concurrent writer. Omit (undefined) to skip the check. + */ + expectedUpdatedAt?: string; };