Skip to content

Commit 4ba9c03

Browse files
suyog19claude
andauthored
fix: include story description in Telegram approval message (#39)
* feat: add Re-run Analysis button to project detail page Adds POST /admin/ui/projects/{repo_slug}/rescan route that creates a new onboarding run and enqueues it, then redirects to the live status page — same flow as the wizard but without touching the Jira mapping. Adds CSRF-protected button in the project detail page header. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: add rescan route to CLAUDE.md API endpoints table Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: update CLAUDE.md for monorepo detection, file landmarks, ambiguity check, rescan - repo_profiler: document _scan_for_subdir_stacks() and monorepo detection - claude_client: document file_landmark_map in arch tool, detect_epic_missing_specifics (Haiku), plan_epic_breakdown full-context params - Capability Profiles: add Monorepo detection note - Clarification Loop: add Missing specifics trigger (Epic) row - Project knowledge injection: document file_landmarks bullet - Dashboard: document Re-run Analysis button Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: allow optional trailing text after APPROVE/REJECT/REGENERATE run_id Users naturally append reason text (e.g. "REGENERATE 1 caption was wrong"). Align _APPROVAL_RE with _CLARIFICATION_RE which already supports this. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat: capture REGENERATE reason as epic memory for next planning run When user sends "REGENERATE 1 <reason>", the trailing text is now stored as an epic-scoped manual_note so Claude incorporates the feedback on the regenerated breakdown instead of ignoring it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: include story description in Telegram approval message Previously the approval message only showed story titles, so users had no way to verify the specifics without checking the DB. Now each story block includes its description (truncated at 300 chars) so the from/to values and key details are visible before approving. Also clarifies REGENERATE supports optional feedback text. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a84831e commit 4ba9c03

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

app/workflows.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,10 +1995,19 @@ def epic_breakdown(run_id: int, issue_key: str, issue_type: str, summary: str) -
19951995
request_planning_approval(run_id)
19961996
set_run_waiting_for_approval(run_id)
19971997

1998-
story_lines = "\n".join(
1999-
f" {i}. {item.get('title', '?')} [{item.get('confidence', '?')}]"
2000-
for i, item in enumerate(items, 1)
2001-
)
1998+
def _story_block(i: int, item: dict) -> str:
1999+
title = item.get("title", "?")
2000+
conf = item.get("confidence", "?")
2001+
desc = (item.get("description") or "").strip()
2002+
# Truncate long descriptions so the message stays readable
2003+
if len(desc) > 300:
2004+
desc = desc[:297] + "..."
2005+
line = f" {i}. {title} [{conf}]"
2006+
if desc:
2007+
line += f"\n {desc}"
2008+
return line
2009+
2010+
story_lines = "\n".join(_story_block(i, item) for i, item in enumerate(items, 1))
20022011
extra = ""
20032012
if assumptions:
20042013
extra += "\nAssumptions:\n" + "\n".join(f" - {a}" for a in assumptions)
@@ -2014,7 +2023,7 @@ def epic_breakdown(run_id: int, issue_key: str, issue_type: str, summary: str) -
20142023
f"Reply with:\n"
20152024
f" APPROVE {run_id}\n"
20162025
f" REJECT {run_id}\n"
2017-
f" REGENERATE {run_id}"
2026+
f" REGENERATE {run_id} <optional feedback>"
20182027
)
20192028
send_message("epic_breakdown_proposed", "PENDING", approval_msg)
20202029
logger.info("epic_breakdown: approval request sent to Telegram (run_id=%s)", run_id)

0 commit comments

Comments
 (0)