refactor(branch-dropdown): drop worktree parent-branch merge shortcut

Remove the parent-branch button shown beside the branch selector along
with its supporting API, command, service, model, and i18n strings.
Add migration m20260423 to drop the now-unused folder.parent_branch
column.
This commit is contained in:
xintaofei
2026-04-23 14:02:46 +08:00
parent 377ae6d8e6
commit 50c5b12d53
23 changed files with 38 additions and 128 deletions

View File

@@ -287,13 +287,6 @@ pub async fn open_push_window(
}))
}
#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SetFolderParentBranchParams {
pub path: String,
pub parent_branch: Option<String>,
}
pub async fn add_folder_to_history(
Extension(state): Extension<Arc<AppState>>,
Json(params): Json<AddFolderParams>,
@@ -305,16 +298,6 @@ pub async fn add_folder_to_history(
Ok(Json(result))
}
pub async fn set_folder_parent_branch(
Extension(state): Extension<Arc<AppState>>,
Json(params): Json<SetFolderParentBranchParams>,
) -> Result<Json<()>, AppCommandError> {
let db = &state.db;
folder_commands::set_folder_parent_branch_core(&db.conn, &params.path, params.parent_branch)
.await?;
Ok(Json(()))
}
pub async fn remove_folder_from_history(
Extension(state): Extension<Arc<AppState>>,
Json(params): Json<AddFolderParams>,

View File

@@ -114,10 +114,6 @@ pub fn build_router(state: Arc<AppState>, token: String, static_dir: std::path::
"/add_folder_to_history",
post(handlers::folders::add_folder_to_history),
)
.route(
"/set_folder_parent_branch",
post(handlers::folders::set_folder_parent_branch),
)
.route(
"/remove_folder_from_history",
post(handlers::folders::remove_folder_from_history),