From c4be50ee20ab620d887b8d985541ce0c2587be62 Mon Sep 17 00:00:00 2001 From: Dev Agent Date: Wed, 3 Jun 2026 22:18:13 +0300 Subject: [PATCH] fix(webhook): drop redundant in_progress reset on Approved handle_verdict(approved): removed set_issue_in_progress(work_item_id) before _try_advance_stage. _try_advance_stage -> advance_stage -> plane_notify_stage already PATCHes the issue to the NEXT stage status, so the reset only made the board flicker In Progress before the next stage (part of bug 3). --- src/webhooks/plane.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/webhooks/plane.py b/src/webhooks/plane.py index e888b6b..8daa9a8 100644 --- a/src/webhooks/plane.py +++ b/src/webhooks/plane.py @@ -246,7 +246,12 @@ async def handle_status_start(data: dict, project_id: str = ""): async def handle_verdict(data: dict, project_id: str, approved: bool): """Status-only verdict: a Plane status change drives advance / rollback. - Approved status -> _try_advance_stage. + Approved status -> _try_advance_stage. We do NOT touch the issue status here: + _try_advance_stage -> advance_stage -> plane_notify_stage already PATCHes the + issue to the NEXT stage's status. The old set_issue_in_progress call reset + the status to In Progress first, which made the board flicker In Progress + before the next stage (part of bug 3); it is removed. + Rejected status -> rollback to the previous stage. """ plane_id = str(data.get("id") or "") @@ -262,8 +267,8 @@ async def handle_verdict(data: dict, project_id: str, approved: bool): branch = task.get("branch", "") if approved: - from ..plane_sync import set_issue_in_progress - set_issue_in_progress(work_item_id) + # NOTE: no set_issue_in_progress here — _try_advance_stage sets the next + # stage's status itself (advance_stage -> plane_notify_stage). logger.info(f"Task {task_id}: Approved status -> advance from {current_stage}") await _try_advance_stage(task_id, current_stage, repo, work_item_id, branch) return