diff --git a/common/src/storage/types/user.rs b/common/src/storage/types/user.rs index c938bf3..5ac8f67 100644 --- a/common/src/storage/types/user.rs +++ b/common/src/storage/types/user.rs @@ -423,7 +423,7 @@ impl User { .client .query( "SELECT * FROM type::table($table_name) WHERE user_id = $user_id - ORDER BY updated_at DESC", + ORDER BY created_at DESC", ) .bind(("table_name", Conversation::table_name())) .bind(("user_id", user_id.to_string())) @@ -789,7 +789,7 @@ mod tests { for i in 0..5 { let mut conv = Conversation::new(user_id.to_string(), format!("Conv {}", i)); // Fake updated_at i minutes apart - conv.updated_at = chrono::Utc::now() - chrono::Duration::minutes(i); + conv.created_at = chrono::Utc::now() - chrono::Duration::minutes(i); db.store_item(conv.clone()) .await .expect("Failed to store conversation"); @@ -806,13 +806,13 @@ mod tests { for window in retrieved.windows(2) { // Assert each earlier conversation has updated_at >= later conversation assert!( - window[0].updated_at >= window[1].updated_at, - "Conversations not ordered descending by updated_at" + window[0].created_at >= window[1].created_at, + "Conversations not ordered descending by created_at" ); } - // (Optional) Check first conversation title matches the most recently updated - let most_recent = conversations.iter().max_by_key(|c| c.updated_at).unwrap(); + // Check first conversation title matches the most recently updated + let most_recent = conversations.iter().max_by_key(|c| c.created_at).unwrap(); assert_eq!(retrieved[0].id, most_recent.id); } } diff --git a/html-router/templates/chat/base.html b/html-router/templates/chat/base.html index a1d7bf7..da6a6da 100644 --- a/html-router/templates/chat/base.html +++ b/html-router/templates/chat/base.html @@ -1,23 +1,24 @@ {% extends 'body_base.html' %} +{% block title %} Minne Chat {% endblock %} +{% block head %} + + +{% endblock %} {% block main %}