Skip to content

Improve PDF Report Quality and Formatting#651

Merged
ngoiyaeric merged 1 commit into
mainfrom
improve-pdf-report-quality-6453383414578454661
Jun 6, 2026
Merged

Improve PDF Report Quality and Formatting#651
ngoiyaeric merged 1 commit into
mainfrom
improve-pdf-report-quality-6453383414578454661

Conversation

@ngoiyaeric
Copy link
Copy Markdown
Collaborator

@ngoiyaeric ngoiyaeric commented Jun 6, 2026

This PR improves the PDF report quality by enhancing the template's styling, adding a professional cover page, and optimizing the PDF generation process for higher DPI and better formatting. It also implements redundancy filtering to ensure the report remains concise and professional.


PR created automatically by Jules for task 6453383414578454661 started by @ngoiyaeric

Summary by CodeRabbit

  • New Features

    • Redesigned report layout with new cover page and organized content sections
    • Added Executive Visualization section displaying map imagery
  • Style

    • Enhanced PDF export quality with improved rendering and performance
    • Updated report formatting and visual hierarchy

- Added professional cover page with corporate branding and logo
- Enhanced typography, font hierarchy, and color palette
- Implemented redundancy filtering for intelligence assessments
- Increased PDF generation DPI (scale: 2) and JPEG quality (1.0)
- Refined layout with executive visualization and quantitative appendix sections
- Improved page-breaking logic in report generator

Co-authored-by: ngoiyaeric <115367894+ngoiyaeric@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@qodo-code-review
Copy link
Copy Markdown
Contributor

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jun 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
qcx Ready Ready Preview, Comment Jun 6, 2026 1:51pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 6, 2026

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

The PR redesigns the report output by filtering messages to remove short responses that precede search results, rebuilding the template layout with a styled cover, optional map visualization, and intelligence assessment sections using markdown and JSON rendering, while also tuning PDF generation with improved timeouts, rendering scale, image quality, and pagination logic.

Changes

Report Generation Redesign and PDF Optimization

Layer / File(s) Summary
Message filtering logic
components/report-template.tsx
Two-stage filtering replaces the prior simple type filter: a response message is dropped when immediately preceding a resolution_search_result and the rendered response is under 300 characters.
Report layout and content rendering
components/report-template.tsx
Rendered output moves from a simple header/history/footer layout to a multi-section report with a styled cover page, a conditional Executive Visualization section that displays mapSnapshot with a randomized "ORBITAL PERSPECTIVE REF" string, and an Intelligence Assessment section that renders each filtered message in distinct cards using ReactMarkdown for responses and JSON parsing (with null fallback) for input and search results.
Appendix and footer styling
components/report-template.tsx
Drawn-features appendix table markup and styling are reworked, geometry coordinates are truncated to substring(0, 60), and the footer is replaced with branded multi-line text and updated copyright.
PDF generation tuning
lib/utils/report-generator.ts
Image load timeout increases from 5 to 10 seconds, html2canvas configuration uses 2x render scale, 15-second image timeout, and fixed 800px cloned element width, JPEG output switches to maximum quality (1.0), and PDF image embedding adds FAST mode with pagination condition changed from heightLeft >= 0 to heightLeft > 0.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • QueueLab/QCX#638: Prior PR that introduced the same report generation flow with message filtering, template redesign, and PDF tuning that are being refined here.

Poem

🐰 A report reborn, now crisp and clear,
With cover pages and views sincere,
Filtered messages, no noise to fear,
PDF tuning brings pixels near—
The rendering hop is bright this season! 📋✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the primary change: improving PDF report quality and formatting through enhanced template styling, higher-DPI output, and better layout organization.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch improve-pdf-report-quality-6453383414578454661

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ngoiyaeric ngoiyaeric merged commit e6045ca into main Jun 6, 2026
3 of 4 checks passed
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants