Skip to content

Fix (#79) latest report export button behavior on Reports page#171

Open
Jeshika311 wants to merge 5 commits into
utksh1:mainfrom
Jeshika311:test/missing-plugin-api-errors
Open

Fix (#79) latest report export button behavior on Reports page#171
Jeshika311 wants to merge 5 commits into
utksh1:mainfrom
Jeshika311:test/missing-plugin-api-errors

Conversation

@Jeshika311
Copy link
Copy Markdown
Contributor

Description

Updated the Reports page export button behavior by replacing the placeholder latest-report export action with a proper latest ready report export flow.

Changes made:

  • Updated the export button logic in frontend/src/pages/Reports.tsx
  • Ensured the button opens the latest ready report PDF URL
  • Disabled/handled the button properly when no ready report exists
  • Preserved existing per-report export functionality
  • Added/updated tests for export button behavior

Related Issues

Closes #79

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • Verified that the export button opens the latest ready report PDF
  • Verified that the button remains disabled/hidden when no ready report exists
  • Confirmed that existing per-report export buttons continue working correctly
  • Ran frontend tests to ensure no regressions

Checklist

  • My code follows the code style of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.

Copilot AI review requested due to automatic review settings May 19, 2026 15:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Reports page “Export Latest Report” header button to export the newest ready report PDF (instead of a placeholder route), and adds unit tests covering the updated behavior. This PR also introduces an unrelated Scanner catalog retry UX (with a new unit test) and a backend integration test for missing-plugin task starts.

Changes:

  • Reports header export button now finds the newest ready report and opens its /task/:id/report/pdf URL; disables the button when no ready report exists.
  • Added unit tests validating header export behavior (newest-ready vs. disabled state).
  • Added Scanner catalog “Retry” flow plus a unit test; added a backend integration test for missing plugin start-task behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
frontend/src/pages/Reports.tsx Implements “Export Latest Report” behavior using newest ready report and disables when unavailable.
frontend/testing/unit/pages/Reports.test.tsx Adds unit tests for the header export button behavior.
frontend/src/pages/Toolkit.tsx Adds retry mechanism for plugin catalog loading failures.
frontend/testing/unit/pages/ScannerRetry.test.tsx Tests the new Toolkit catalog retry flow.
testing/backend/integration/test_routes.py Adds integration coverage for starting a task with a missing plugin id.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/pages/Reports.tsx Outdated
Comment thread frontend/src/pages/Reports.tsx Outdated
Comment thread frontend/testing/unit/pages/Reports.test.tsx Outdated
Comment thread testing/backend/integration/test_routes.py Outdated
Comment thread frontend/src/pages/Toolkit.tsx
@Jeshika311 Jeshika311 changed the title Fix latest report export button behavior on Reports page Fix (#79) latest report export button behavior on Reports page May 21, 2026
Copy link
Copy Markdown
Owner

@utksh1 utksh1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “export latest report” change is useful, but this PR currently includes unrelated and blocking changes:

  • Removes final newline in testing/backend/integration/test_routes.py (should keep newline)
  • Modifies backend concurrency limiter tests (unrelated to Reports UI)
  • Adds a binary testout.txt file (should not be in the repo)

Please remove the unrelated backend/testout changes and keep this PR focused on the Reports page + frontend tests (or split into separate PRs). After that, I can re-review and we can rebase onto the updated Reports filters work.

@utksh1 utksh1 added area:frontend Frontend React/UI work type:bug Bug fix work category bonus label type:testing Testing work category bonus label level:intermediate 35 pts difficulty label for moderate contributor PRs labels May 22, 2026
@Jeshika311 Jeshika311 closed this May 23, 2026
@Jeshika311 Jeshika311 force-pushed the test/missing-plugin-api-errors branch from db36d73 to 928baa6 Compare May 23, 2026 03:24
@Jeshika311 Jeshika311 reopened this May 23, 2026
@Jeshika311
Copy link
Copy Markdown
Contributor Author

@utksh1 I’ve removed the unrelated backend/testout changes and cleaned up the PR.
Now the PR only contains the relevant Reports page changes and related frontend updates.
I also tested the changes locally on my system, and everything is working correctly now.
Could you please re-review it when you get a chance? Thanks

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

Labels

area:frontend Frontend React/UI work level:intermediate 35 pts difficulty label for moderate contributor PRs type:bug Bug fix work category bonus label type:testing Testing work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BEGINNER FRIENDLY] Replace latest-report placeholder export button on Reports page

3 participants