Skip to content

[Due for payment 2026-06-30] Enable multi-select "Download as PDF" in bulk actions and add partial failure state to export modal #90300

Closed

Description

@mollfpr

Context

PDF-specific App wiring for the Bulk Report PDF Export project. Extends the
single-select "Download as PDF" added in Release 1 to support multi-select,
wires ExportDownloadStatusModal into the bulk actions flow, and adds the
partial failure state to the shared modal.

Depends on

Changes

src/libs/API/types.ts

  • Add EXPORT_REPORTS_TO_PDF to WRITE_COMMANDS
  • Add ExportReportsToPDFParams: {reportIDs: number[], exportID: string}
  • Map in WriteCommandParameters

src/libs/actions/Export.ts

  • Add exportReportsToPDF(reportIDs) — generates exportID via rand64(),
    optimistically merges {state: 'preparing'}, calls
    API.write(EXPORT_REPORTS_TO_PDF, {reportIDs, exportID}). Returns
    exportID. failureData sets Onyx key to null

src/hooks/useSearchBulkActions.ts

  • Update "Download as PDF" to support multi-select
  • On click: call exportReportsToPDF(reportIDs), store returned exportID
    as activeExportID state
  • Subscribe to ONYXKEYS.COLLECTION.EXPORT_DOWNLOAD + activeExportID
  • handleExportModalClose: calls clearExportDownload for direct download
    and failure paths only. No-op during preparing state. Resets
    activeExportID to null

src/components/SearchBulkActionsButton.tsx

  • Render ExportDownloadStatusModal when activeExportID is set, passing
    pdfFailedBody translation as the failedBody prop

src/components/ExportDownloadStatusModal.tsx

  • Extend ready state: when failedReportCount > 0, show partial failure body
    instead of standard ready body
  • Partial body renders {failedReportCount} of {reportCount + failedReportCount}
    with a tappable Concierge link via renderWithComponents

src/languages/en.ts

  • Add exportDownload.pdfFailedBody: "Your file could not be generated.
    Try again, or reach out to Concierge for help."
  • Add exportDownload.readyPartialBody: "{count} of {total} reports exported.
    If it didn't automatically download, use the button below. See which reports
    failed in {concierge}."

Testing

Unit tests extending tests/unit/ExportActionsTest.ts:

  • exportReportsToPDF sets optimistic Onyx data with state: 'preparing'
  • exportReportsToPDF failureData clears Onyx key

Unit tests extending tests/unit/ExportDownloadStatusModalTest.tsx:

  • Shows partial failure count when failedReportCount > 0
  • Shows standard ready body when failedReportCount === 0
  • Partial failure Concierge link navigates correctly

Unit tests in tests/unit/hooks/useSearchBulkActionsDownloadPDFTest.ts:

  • Enables "Download as PDF" for multi-select
  • Calls exportReportsToPDF and sets activeExportID
  • handleExportModalClose is no-op during preparing state
  • handleExportModalClose skips clearExportDownload when Onyx key is null
Issue OwnerCurrent Issue Owner: @mollfpr

Activity

  1. self-assigned this
    on May 12, 2026
  2. mollfpr commented on May 12, 2026

    @mollfpr
    ContributorAuthor

    @daledah as reviewer and @truph01 will implementing 🙌

  3. melvin-bot commented on May 15, 2026

    @melvin-bot

    @truph01 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  4. mollfpr commented on May 18, 2026

    @mollfpr
    ContributorAuthor

    Not overdue. This will be the last task of the list.

  5. melvin-bot commented on May 19, 2026

    @melvin-bot

    @truph01 Still overdue 6 days?! Let's take care of this!

  6. daledah commented on May 20, 2026

    @daledah
    Contributor

    not overdue

  7. melvin-bot commented on May 21, 2026

    @melvin-bot

    @truph01 Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

  8. melvin-bot commented on May 25, 2026

    @melvin-bot

    @truph01 12 days overdue. Walking. Toward. The. Light...

  9. 41 remaining items

  10. mallenexpensify commented on Jul 13, 2026

    @mallenexpensify
    Contributor

    @mollfpr 👀 above on the price increase request plz.

  11. mollfpr commented on Jul 14, 2026

    @mollfpr
    ContributorAuthor

    I would like to ask @truph01's opinion on the increased price, if it's fair to them.

  12. truph01 commented on Jul 15, 2026

    @truph01
    Contributor

    @mollfpr I agree with this #90300 (comment)

  13. mallenexpensify commented on Jul 15, 2026

    @mallenexpensify
    Contributor

    @truph01 @daledah paid, summary updated above. Thx.

    ^ Test case created. Thx

  14. quinthar commented on Aug 19, 2026

    @quinthar
    Contributor

    Approved $375 to @daledah

  15. garrettmknight commented on Oct 12, 2026

    @garrettmknight
    Contributor

    $375 approved for @truph01

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions