- LOT C2 (§14.5.3) : use cases de configuration des embedders déclaratifs (List/Save/Delete + DescribeEmbedderEngines : modèles ONNX recommandés, environnement local détecté, stratégies compilées). UI EmbedderSettings. - LOT C3 (§14.5.5) : suggestion contextuelle best-effort à l'activation quand la mémoire dépasse le budget de recall sans embedder configuré (event EmbedderSuggested, anti-spam 1×/session, « ne plus demander »). - Contexte projet partagé .ideai/CONTEXT.md (model-agnostic) injecté à tous les agents/profils au lancement, avant la persona. UI ProjectContextPanel. Tests : backend workspace vert (0 échec) ; frontend 306/306. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
32 lines
983 B
Rust
32 lines
983 B
Rust
//! L10 DTO tests: `move_tab_to_new_window` result mapping + tab-id parsing.
|
|
|
|
use app_tauri_lib::dto::{parse_tab_id, MoveTabResultDto};
|
|
use application::MoveTabToNewWindowOutput;
|
|
use domain::ids::WindowId;
|
|
use domain::layout::Workspace;
|
|
use uuid::Uuid;
|
|
|
|
#[test]
|
|
fn move_tab_result_serializes_new_window_id_camel_case() {
|
|
let out = MoveTabToNewWindowOutput {
|
|
new_window_id: WindowId::from_uuid(Uuid::from_u128(42)),
|
|
workspace: Workspace::default(),
|
|
};
|
|
let dto = MoveTabResultDto::from(out);
|
|
let json = serde_json::to_string(&dto).unwrap();
|
|
assert!(json.contains("\"newWindowId\""), "json was {json}");
|
|
assert!(
|
|
!json.contains("new_window_id"),
|
|
"no snake_case leak: {json}"
|
|
);
|
|
}
|
|
|
|
#[test]
|
|
fn parse_tab_id_accepts_uuid_and_rejects_garbage() {
|
|
let uuid = Uuid::from_u128(7).to_string();
|
|
assert!(parse_tab_id(&uuid).is_ok());
|
|
|
|
let err = parse_tab_id("not-a-uuid").unwrap_err();
|
|
assert_eq!(err.code, "INVALID");
|
|
}
|