From 28c969f06e5d404301f10357def4b0d33a72d1ff Mon Sep 17 00:00:00 2001 From: Michael Chihlas Date: Fri, 13 Feb 2026 12:54:45 -0500 Subject: [PATCH] feat: add [CUSTOM] markers to custom steps in all 4 export generators Co-Authored-By: Claude Opus 4.6 --- backend/app/services/export_service.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/backend/app/services/export_service.py b/backend/app/services/export_service.py index caae82ac..d680b277 100644 --- a/backend/app/services/export_service.py +++ b/backend/app/services/export_service.py @@ -160,7 +160,11 @@ def generate_markdown_export(session: Session, options: SessionExport) -> str: notes = decision.get("notes", "") duration_seconds = _get_step_duration_seconds(decision) - lines.append(f"### Step {i}: {question}") + is_custom = decision.get("node_id", "").startswith("custom-") + prefix = "[CUSTOM] " if is_custom else "" + lines.append(f"### Step {i}: {prefix}{question}") + if is_custom: + lines.append("*Custom step added by engineer*") if answer: lines.append(f"**Answer:** {answer}") if notes: @@ -247,7 +251,9 @@ def generate_text_export(session: Session, options: SessionExport) -> str: notes = decision.get("notes", "") duration_seconds = _get_step_duration_seconds(decision) - lines.append(f"\n{i}. {question}") + is_custom = decision.get("node_id", "").startswith("custom-") + prefix = "[CUSTOM] " if is_custom else "" + lines.append(f"\n{i}. {prefix}{question}") if answer: lines.append(f" Answer: {answer}") if notes: @@ -339,7 +345,9 @@ def generate_html_export(session: Session, options: SessionExport) -> str: duration_seconds = _get_step_duration_seconds(decision) html_parts.append('
') - html_parts.append(f'

Step {i}: {question}

') + is_custom = decision.get("node_id", "").startswith("custom-") + custom_badge = 'CUSTOM' if is_custom else '' + html_parts.append(f'

{custom_badge}Step {i}: {question}

') if answer: html_parts.append(f'

Answer: {answer}

') if notes: @@ -410,7 +418,9 @@ def generate_psa_export(session: Session, options: SessionExport) -> str: notes = decision.get("notes", "") duration_seconds = _get_step_duration_seconds(decision) - line = f"{i}. {question}" + is_custom = decision.get("node_id", "").startswith("custom-") + prefix = "[CUSTOM] " if is_custom else "" + line = f"{i}. {prefix}{question}" if answer: line += f" -> {answer}" if duration_seconds is not None: