Skip to content

Enable multi-download: group batch downloads into a single status notification#769

Draft
Copilot wants to merge 10 commits into
mainfrom
copilot/enable-multi-download
Draft

Enable multi-download: group batch downloads into a single status notification#769
Copilot wants to merge 10 commits into
mainfrom
copilot/enable-multi-download

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 1, 2026

Context

Downloading multiple files at once produced a separate notification banner per file, cluttering the UI. This change groups all downloads triggered together into one consolidated status message with a collapsible file list.

Changes

state/interaction/actions.ts

  • Added fullMsg?: string to StatusUpdate.data — carries the full untruncated message for "View more" expansion (replaces the earlier fileNames array approach)
  • Extended processStart, processProgress, and processError signatures with optional fullMsg parameter

state/interaction/logics.ts (core change)

  • Replaced per-file downloadRequestId process messages with a single groupProcessId for the entire batch
  • Aggregate progress tracked across all concurrent downloads via one shared counter + throttled dispatcher
  • Group cancel dispatches cancelFileDownload for each individual request
  • Final status summarizes outcome: success count, partial failure with named files, or full cancellation
  • Builds msg (header + first 3 file names as HTML) and fullMsg (header + all file names), only setting fullMsg when there are more than 3 files

components/StatusMessage/index.tsx

  • Uses expandedIds state + toggleExpanded to track per-process expansion
  • Displays msg by default; switches to fullMsg when expanded: displayMsg = isExpanded && fullMsg ? fullMsg : msg
  • Shows a "View more" / "View less" button whenever fullMsg is present
// Before: N files → N separate banners
// After:  N files → 1 banner
// "Downloading 5 files.  42 MB set to download
//  • file_a.tiff
//  • file_b.tiff
//  • file_c.tiff"
//                              [View more]

Testing

  • Updated logics.test.ts: "downloads multiple files" now asserts exactly one SET_STATUS action is dispatched for the batch, containing all fileId entries
  • All 548 core unit tests pass; TypeScript and ESLint clean

Copilot AI linked an issue May 1, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits May 1, 2026 08:21
Agent-Logs-Url: https://github.com/AllenInstitute/biofile-finder/sessions/19d8fc8b-c988-4eaa-a37a-00f8ff4bf75e

Co-authored-by: SeanDuHare <41307451+SeanDuHare@users.noreply.github.com>
…ith Show more toggle

Agent-Logs-Url: https://github.com/AllenInstitute/biofile-finder/sessions/19d8fc8b-c988-4eaa-a37a-00f8ff4bf75e

Co-authored-by: SeanDuHare <41307451+SeanDuHare@users.noreply.github.com>
Copilot AI changed the title [WIP] Add multi-download functionality with grouped messages Enable multi-download: group batch downloads into a single status notification May 1, 2026
Copilot AI requested a review from SeanDuHare May 1, 2026 08:29
Comment thread packages/core/state/interaction/actions.ts
…ped download notifications

Agent-Logs-Url: https://github.com/AllenInstitute/biofile-finder/sessions/32fbf7b9-d2fc-43cb-b23a-25058fee49e9

Co-authored-by: SeanDuHare <41307451+SeanDuHare@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 1, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • production.int.allencell.org
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/biofile-finder/biofile-finder/node_modules/.bin/mocha --exit (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from SeanDuHare May 1, 2026 21:03
@SeanDuHare
Copy link
Copy Markdown
Contributor

The download stuff is just SOOOOOOOOO messy - I'm trying to clean it up which is something the AI agents are... not helpful at

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.

Enable multi-download

2 participants