From 967a2b2c59b7132747549e718b9a304cc3b58a0e Mon Sep 17 00:00:00 2001 From: chihlasm Date: Thu, 19 Mar 2026 20:09:26 +0000 Subject: [PATCH] feat(export): add branding footer to all 5 export formats and PDF spinner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add "Generated with ResolutionFlow — https://resolutionflow.com" footer to markdown, text, HTML, PSA formats (both troubleshooting and procedural variants — 8 generators total) - Fix PDF @page CSS: "Powered by ResolutionFlow" now appears on every PDF, not just for users with a custom logo (removed the has_custom_logo conditional) - Add Loader2 spinner icon to PDF download button in ExportPreviewModal when pdfLoading is true, replacing the static Download icon Co-Authored-By: Claude Opus 4.6 (1M context) --- backend/app/services/export_service.py | 36 +++++++++++++++++++ backend/app/templates/export_pdf.html | 12 ------- .../components/session/ExportPreviewModal.tsx | 8 +++-- 3 files changed, 42 insertions(+), 14 deletions(-) diff --git a/backend/app/services/export_service.py b/backend/app/services/export_service.py index 7d3d8091..5fa2530f 100644 --- a/backend/app/services/export_service.py +++ b/backend/app/services/export_service.py @@ -299,6 +299,10 @@ def generate_markdown_export(session: Session, options: SessionExport, supportin lines.append(next_steps.strip()) lines.append("") + # Branding footer + lines.append("---") + lines.append("Generated with ResolutionFlow — https://resolutionflow.com") + return "\n".join(lines) @@ -408,6 +412,11 @@ def generate_text_export(session: Session, options: SessionExport, supporting_da lines.append("-" * 20) lines.append(next_steps.strip()) + # Branding footer + lines.append("") + lines.append("---") + lines.append("Generated with ResolutionFlow — https://resolutionflow.com") + return "\n".join(lines) @@ -524,6 +533,10 @@ def generate_html_export(session: Session, options: SessionExport, supporting_da html_parts.append('

Next Steps

') html_parts.append(f'
{html.escape(next_steps.strip())}
') + # Branding footer + html_parts.append('
') + html_parts.append('

Generated with ResolutionFlow — https://resolutionflow.com

') + html_parts.extend(['', '']) return "\n".join(html_parts) @@ -648,6 +661,11 @@ def generate_psa_export(session: Session, options: SessionExport, supporting_dat scratchpad = getattr(session, 'scratchpad', '') or '' lines.append(scratchpad.strip() if scratchpad.strip() else "None") + # Branding footer + lines.append("") + lines.append("---") + lines.append("Generated with ResolutionFlow — https://resolutionflow.com") + return "\n".join(lines) @@ -737,6 +755,10 @@ def _generate_procedural_markdown(session: Session, options: SessionExport) -> s lines.append(outcome_notes.strip()) lines.append("") + # Branding footer + lines.append("---") + lines.append("Generated with ResolutionFlow — https://resolutionflow.com") + return "\n".join(lines) @@ -802,6 +824,11 @@ def _generate_procedural_text(session: Session, options: SessionExport) -> str: lines.append("-" * 20) lines.append(outcome_notes.strip()) + # Branding footer + lines.append("") + lines.append("---") + lines.append("Generated with ResolutionFlow — https://resolutionflow.com") + return "\n".join(lines) @@ -887,6 +914,10 @@ def _generate_procedural_html(session: Session, options: SessionExport) -> str: html_parts.append('

Notes

') html_parts.append(f'
{html.escape(outcome_notes.strip())}
') + # Branding footer + html_parts.append('
') + html_parts.append('

Generated with ResolutionFlow — https://resolutionflow.com

') + html_parts.extend(['', '']) return "\n".join(html_parts) @@ -956,6 +987,11 @@ def _generate_procedural_psa(session: Session, options: SessionExport) -> str: lines.append("--- TIME SPENT ---") lines.append(f"Duration: {_format_duration(session.started_at, session.completed_at)}") + # Branding footer + lines.append("") + lines.append("---") + lines.append("Generated with ResolutionFlow — https://resolutionflow.com") + return "\n".join(lines) diff --git a/backend/app/templates/export_pdf.html b/backend/app/templates/export_pdf.html index 8a7b7c0a..13c82b82 100644 --- a/backend/app/templates/export_pdf.html +++ b/backend/app/templates/export_pdf.html @@ -3,7 +3,6 @@