From 205ab8a223ddf6591a3e8bfc9108506502977c11 Mon Sep 17 00:00:00 2001 From: soryu Date: Fri, 16 Jan 2026 12:23:49 +0000 Subject: Fixup: use default api.makima.jp URL and fix default branch detection Also add checkpointing/history --- makima/src/server/handlers/repository_history.rs | 19 +++++++++++++++++++ makima/src/server/mod.rs | 8 +++++++- 2 files changed, 26 insertions(+), 1 deletion(-) (limited to 'makima/src/server') diff --git a/makima/src/server/handlers/repository_history.rs b/makima/src/server/handlers/repository_history.rs index c788d84..9c309c0 100644 --- a/makima/src/server/handlers/repository_history.rs +++ b/makima/src/server/handlers/repository_history.rs @@ -97,6 +97,14 @@ pub async fn get_repository_suggestions( let limit = params.limit.unwrap_or(10).min(50); // Cap at 50 for safety + tracing::debug!( + owner_id = %auth.owner_id, + source_type = ?params.source_type, + query = ?params.query, + limit = limit, + "Fetching repository suggestions" + ); + match repository::get_repository_suggestions( pool, auth.owner_id, @@ -107,6 +115,17 @@ pub async fn get_repository_suggestions( .await { Ok(entries) => { + // Debug log to help diagnose filtering issues + for entry in &entries { + tracing::debug!( + id = %entry.id, + name = %entry.name, + source_type = %entry.source_type, + has_url = entry.repository_url.is_some(), + has_path = entry.local_path.is_some(), + "Repository suggestion entry" + ); + } let total = entries.len() as i64; Json(RepositoryHistoryListResponse { entries, total }).into_response() } diff --git a/makima/src/server/mod.rs b/makima/src/server/mod.rs index e244a08..a4cb3d1 100644 --- a/makima/src/server/mod.rs +++ b/makima/src/server/mod.rs @@ -18,7 +18,7 @@ use tower_http::trace::TraceLayer; use utoipa::OpenApi; use utoipa_swagger_ui::SwaggerUi; -use crate::server::handlers::{api_keys, chat, contract_chat, contract_daemon, contracts, file_ws, files, listen, mesh, mesh_chat, mesh_daemon, mesh_merge, mesh_supervisor, mesh_ws, repository_history, templates, transcript_analysis, users, versions}; +use crate::server::handlers::{api_keys, chat, contract_chat, contract_daemon, contracts, file_ws, files, history, listen, mesh, mesh_chat, mesh_daemon, mesh_merge, mesh_supervisor, mesh_ws, repository_history, templates, transcript_analysis, users, versions}; use crate::server::openapi::ApiDoc; use crate::server::state::SharedState; @@ -107,6 +107,7 @@ pub fn make_router(state: SharedState) -> Router { // Checkpoint endpoints .route("/mesh/tasks/{id}/checkpoint", post(mesh_supervisor::create_checkpoint)) .route("/mesh/tasks/{id}/checkpoints", get(mesh_supervisor::list_checkpoints)) + .route("/mesh/tasks/{id}/conversation", get(history::get_task_conversation)) // Resume and rewind endpoints .route("/mesh/tasks/{id}/rewind", post(mesh::rewind_task)) .route("/mesh/tasks/{id}/fork", post(mesh::fork_task)) @@ -166,6 +167,9 @@ pub fn make_router(state: SharedState) -> Router { // Contract supervisor resume endpoints .route("/contracts/{id}/supervisor/resume", post(mesh_supervisor::resume_supervisor)) .route("/contracts/{id}/supervisor/conversation/rewind", post(mesh_supervisor::rewind_conversation)) + // History endpoints + .route("/contracts/{id}/history", get(history::get_contract_history)) + .route("/contracts/{id}/supervisor/conversation", get(history::get_supervisor_conversation)) // Contract daemon endpoints (for tasks to interact with contracts) .route("/contracts/{id}/daemon/status", get(contract_daemon::get_contract_status)) .route("/contracts/{id}/daemon/checklist", get(contract_daemon::get_contract_checklist)) @@ -198,6 +202,8 @@ pub fn make_router(state: SharedState) -> Router { "/contracts/{id}/tasks/{task_id}", post(contracts::add_task_to_contract).delete(contracts::remove_task_from_contract), ) + // Timeline endpoint (unified history for user) + .route("/timeline", get(history::get_timeline)) // Template endpoints .route("/templates", get(templates::list_templates)) .route("/templates/{id}", get(templates::get_template)) -- cgit v1.2.3