Skip to content

Add plain-text report summary export and frontend sharing actions - #23

Merged
DeepZone merged 1 commit into
mainfrom
codex/improve-export-and-sharing-of-results
May 20, 2026
Merged

Add plain-text report summary export and frontend sharing actions#23
DeepZone merged 1 commit into
mainfrom
codex/improve-export-and-sharing-of-results

Conversation

@DeepZone

Copy link
Copy Markdown
Owner

Motivation

  • Make RouteForge results easy to copy into change-tickets, emails or maintenance docs by providing a short, ticket-ready plain-text summary and better export/download headers.
  • Keep behavior read-only and non-breaking while enabling frontend copy/download flows for Markdown, HTML and the new plain summary.

Description

  • Backend: added render_plain_summary(report_json: dict) in backend/app/services/report_renderer.py to produce defensive, human-readable plain-text summaries (unknown fallbacks, holder from details.resource_holder.holder, optional preflight decision, recommendations list).
  • Backend API: added GET /api/reports/{report_id}/summary and updated /markdown and /html responses to set Content-Type with charset=utf-8 and Content-Disposition attachment filenames for downloads in backend/app/api/routes_reports.py.
  • Frontend: added requestText helper and API functions getReportMarkdown, getReportHtml, getReportSummary in frontend/src/api.ts, and implemented export actions in ReportView and the Reports list (Copy Summary, Copy Markdown, Download Markdown, Download HTML, Open) with clipboard usage and unobtrusive feedback in frontend/src/components/ReportView.tsx and frontend/src/App.tsx.
  • Docs: documented the feature in README.md under “Export and sharing” and noted it in RELEASE_NOTES.md.
  • Tests: extended backend/tests/test_api_smoke.py with test_report_export_endpoints to validate the summary endpoint and export content-types.

Testing

  • Ran backend test suite with cd backend && pytest -q and all tests passed (58 passed).
  • Built frontend with cd frontend && npm run build and the production build completed successfully.
  • New smoke test test_report_export_endpoints verifies GET /api/reports/{id}/summary returns 200, includes RouteForge and Status: in the body, and that markdown/html endpoints return proper text/markdown / text/html content-types.

Codex Task

@DeepZone
DeepZone merged commit 4f3a881 into main May 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant