Sidebar polish: search copy, dividers, project reorder, fix DnD (#8568)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
tulsi
2026-04-15 16:26:03 -07:00
committed by GitHub
parent 0ec73c80f3
commit 8b2c6e0129
13 changed files with 142 additions and 38 deletions
@@ -384,6 +384,20 @@ pub fn delete_project(id: String) -> Result<(), String> {
Ok(())
}
#[tauri::command]
pub fn reorder_projects(order: Vec<(String, i32)>) -> Result<(), String> {
for (id, new_order) in order {
let (dir, mut stored) = find_project_by_id(&id)?;
stored.order = new_order;
let project_path = dir.join("project.json");
let json = serde_json::to_string_pretty(&stored)
.map_err(|e| format!("Failed to serialize project: {}", e))?;
fs::write(&project_path, json)
.map_err(|e| format!("Failed to write project.json: {}", e))?;
}
Ok(())
}
#[tauri::command]
pub fn get_project(id: String) -> Result<ProjectInfo, String> {
let (dir, info) = find_project_by_id(&id)?;
+1
View File
@@ -73,6 +73,7 @@ pub fn run() {
commands::projects::update_project,
commands::projects::delete_project,
commands::projects::get_project,
commands::projects::reorder_projects,
commands::projects::list_archived_projects,
commands::projects::archive_project,
commands::projects::restore_project,
+1 -1
View File
@@ -22,7 +22,7 @@
"visible": false,
"titleBarStyle": "Overlay",
"hiddenTitle": true,
"dragDropEnabled": true,
"dragDropEnabled": false,
"trafficLightPosition": { "x": 12, "y": 22 }
}
],