From 0a25271e797b335f55cec03ae9ddd9d90ef07827 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 16:44:17 +0000 Subject: [PATCH 1/3] Initial plan From a261febe291fb56d669b8cd4cf412e38477f2c12 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 16:47:26 +0000 Subject: [PATCH 2/3] fix(standups): improve UpdateStandup to check rows affected and return updated object Co-authored-by: techbuzzz <6938100+techbuzzz@users.noreply.github.com> --- internal/handlers/standups.go | 38 ++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/internal/handlers/standups.go b/internal/handlers/standups.go index a767c16..eba00cc 100644 --- a/internal/handlers/standups.go +++ b/internal/handlers/standups.go @@ -235,7 +235,7 @@ func (h *StandupHandler) UpdateStandup(w http.ResponseWriter, r *http.Request) { return } - _, err = h.db.Exec(` + result, err := h.db.Exec(` UPDATE daily_standups SET did = $1, doing = $2, done = $3, blockers = $4, challenges = $5, references = $6, updated_at = $7 WHERE id = $8 @@ -246,8 +246,40 @@ func (h *StandupHandler) UpdateStandup(w http.ResponseWriter, r *http.Request) { return } - w.WriteHeader(http.StatusOK) - json.NewEncoder(w).Encode(map[string]string{"message": "Standup updated successfully"}) + rowsAffected, _ := result.RowsAffected() + if rowsAffected == 0 { + http.Error(w, "Standup not found", http.StatusNotFound) + return + } + + // Get updated standup + var s models.StandupWithAgent + err = h.db.QueryRow(` + SELECT s.id, s.agent_id, s.project_id, s.standup_date, s.did, s.doing, s.done, + s.blockers, s.challenges, s.references, s.created_at, s.updated_at, + a.name as agent_name, a.role as agent_role, a.team as agent_team + FROM daily_standups s + INNER JOIN agents a ON s.agent_id = a.id + WHERE s.id = $1 + `, id).Scan( + &s.ID, &s.AgentID, &s.ProjectID, &s.StandupDate, &s.Did, &s.Doing, &s.Done, + &s.Blockers, &s.Challenges, &s.References, &s.CreatedAt, &s.UpdatedAt, + &s.AgentName, &s.AgentRole, &s.AgentTeam, + ) + + if err == sql.ErrNoRows { + http.Error(w, "Standup not found", http.StatusNotFound) + return + } else if err != nil { + http.Error(w, "Failed to retrieve standup", http.StatusInternalServerError) + return + } + + // Broadcast standup update via WebSocket + h.hub.BroadcastToProject(s.ProjectID, "standup_update", s) + + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(s) } // DeleteStandup deletes a standup entry From 2ffdffc86f57fb2961b0407937c7e3b8605b6b46 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 16:48:48 +0000 Subject: [PATCH 3/3] fix(standups): handle error from RowsAffected in UpdateStandup Co-authored-by: techbuzzz <6938100+techbuzzz@users.noreply.github.com> --- internal/handlers/standups.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/handlers/standups.go b/internal/handlers/standups.go index eba00cc..8586d9a 100644 --- a/internal/handlers/standups.go +++ b/internal/handlers/standups.go @@ -246,7 +246,11 @@ func (h *StandupHandler) UpdateStandup(w http.ResponseWriter, r *http.Request) { return } - rowsAffected, _ := result.RowsAffected() + rowsAffected, err := result.RowsAffected() + if err != nil { + http.Error(w, "Failed to check update result", http.StatusInternalServerError) + return + } if rowsAffected == 0 { http.Error(w, "Standup not found", http.StatusNotFound) return