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: