fix(workspace): sort daily memory by date and inline into file grid

- Sort daily memory list by filename (YYYY-MM-DD.md) instead of mtime
  so editing an older file no longer bumps it to the top
- Move daily memory card inline with workspace MD file buttons
- Shorten card description across all locales
- Defer file creation until user actually saves (no empty file on create)
This commit is contained in:
Jason
2026-02-20 10:40:58 +08:00
parent 4440a14082
commit 7532308519
6 changed files with 12 additions and 23 deletions

View File

@@ -106,8 +106,8 @@ pub async fn list_daily_memory_files() -> Result<Vec<DailyMemoryFileInfo>, Strin
});
}
// Sort by modified_at descending (newest first)
files.sort_by(|a, b| b.modified_at.cmp(&a.modified_at));
// Sort by filename descending (newest date first, YYYY-MM-DD.md)
files.sort_by(|a, b| b.filename.cmp(&a.filename));
Ok(files)
}