Skip to content

feat: switch workflow result downloads to use browser native downloads - #3728

Merged
aicam merged 68 commits into
apache:mainfrom
madisonmlin:enable-workflow-single-file-download-progress-bar
Oct 11, 2025
Merged

feat: switch workflow result downloads to use browser native downloads#3728
aicam merged 68 commits into
apache:mainfrom
madisonmlin:enable-workflow-single-file-download-progress-bar

Conversation

@madisonmlin

@madisonmlin madisonmlin commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

Purpose

This pull request partially addresses issue #3404 by switching workflow result downloads to use the browser's native download functionality. Using the browser to handle downloads enables the browser's built-in download UI, including a progress bar when downloading larger files.

Changes

Previously, we used Angular's HttpClient to request the result file from the backend as a Blob and download the Blob to the local filesystem. Now, we use a standard HTML form submission to request the result file, allowing the browser to handle the download. The backend logic for generating the file stream remains the same.

Headers such as Authorization (used for Bearer tokens) cannot be added to standard form submissions. To work around this, we pass the JWT token directly as a form parameter and manually check for validity of the token in the backend. We also manually verify that the user role is valid.

Summary of Changes

  • Changed frontend logic for local workflow result downloads to use a standard form submission instead of HttpClient to request the download, allowing the browser to handle the download
  • Added endpoint to receive form request and authenticate the request via the JWT token before triggering download

Demonstration

texera_workflow_result_download_demo.mp4

Comment thread core/auth/src/main/scala/edu/uci/ics/texera/auth/JwtAuth.scala Outdated
Comment thread core/auth/src/main/scala/edu/uci/ics/texera/auth/JwtAuth.scala Outdated
Comment thread core/auth/src/main/scala/edu/uci/ics/texera/auth/JwtAuth.scala Outdated
@madisonmlin
madisonmlin force-pushed the enable-workflow-single-file-download-progress-bar branch from e9b290c to 7fe4a70 Compare September 28, 2025 23:27
@chenlica

Copy link
Copy Markdown
Contributor

@kunwp1 Please review this PR after @aicam's pass.

@github-actions github-actions Bot added engine frontend Changes related to the frontend GUI labels Oct 6, 2025

@kunwp1 kunwp1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The changes look good! Thanks.

@aicam

aicam commented Oct 7, 2025

Copy link
Copy Markdown
Contributor

@madisonmlin I test it on staging and merge, thanks

aicam and others added 2 commits October 9, 2025 13:04
…nload-progress-bar' into enable-workflow-single-file-download-progress-bar

# Conflicts:
#	core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/workflow/WorkflowExecutionsResource.scala
#	core/gui/src/app/dashboard/service/user/download/download.service.ts
#	core/gui/src/app/workspace/service/workflow-result-export/workflow-result-export.service.ts
@kunwp1

kunwp1 commented Oct 10, 2025

Copy link
Copy Markdown
Contributor

@madisonmlin Please merge the PR once you resolve the conflicts. Thanks!

aglinxinyuan and others added 3 commits October 10, 2025 17:09
…s-bar

Signed-off-by: Xinyuan Lin <xinyual3@uci.edu>
…nload-progress-bar' into enable-workflow-single-file-download-progress-bar
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file infra labels Oct 11, 2025
@aicam

aicam commented Oct 11, 2025

Copy link
Copy Markdown
Contributor

I just fixed the Kubernetes deployment @kunwp1

@aicam
aicam merged commit 1317199 into apache:main Oct 11, 2025
11 checks passed
aicam pushed a commit that referenced this pull request Oct 16, 2025
…o be separate and symmetric (#3916)

### What changes were proposed in this PR?
This PR updates the function names and docstring for workflow result
exports to local/dataset to be symmetric.


### Any related issues, documentation, discussions?
Refactors #3728.


### How was this PR tested?
This PR involves a simple refactoring of the existing workflow result
export functionality. Apart from verifying that the functionality has
not changed, no additional tests are needed.


### Was this PR authored or co-authored using generative AI tooling?
No.
SarahAsad23 pushed a commit to madisonmlin/texera that referenced this pull request May 20, 2026
apache#3728)

### Purpose ### 
This pull request partially addresses issue apache#3404 by switching workflow
result downloads to use the browser's native download functionality.
Using the browser to handle downloads enables the browser's built-in
download UI, including a progress bar when downloading larger files.

### Changes ### 
Previously, we used Angular's `HttpClient` to request the result file
from the backend as a `Blob` and download the `Blob` to the local
filesystem. Now, we use a standard HTML form submission to request the
result file, allowing the browser to handle the download. The backend
logic for generating the file stream remains the same.

Headers such as `Authorization` (used for Bearer tokens) cannot be added
to standard form submissions. To work around this, we pass the JWT token
directly as a form parameter and manually check for validity of the
token in the backend. We also manually verify that the user role is
valid.

#### Summary of Changes ####
- Changed frontend logic for local workflow result downloads to use a
standard form submission instead of `HttpClient` to request the
download, allowing the browser to handle the download
- Added endpoint to receive form request and authenticate the request
via the JWT token before triggering download

### Demonstration ###

https://github.com/user-attachments/assets/a2d5278e-5ebf-441f-99bf-ff93d1667271

---------

Signed-off-by: Xinyuan Lin <xinyual3@uci.edu>
Co-authored-by: Chris <143021053+kunwp1@users.noreply.github.com>
Co-authored-by: ali risheh <ali.risheh876@gmail.com>
Co-authored-by: ali <a_icam@yahoo.com>
Co-authored-by: Xinyuan Lin <xinyual3@uci.edu>
SarahAsad23 pushed a commit to madisonmlin/texera that referenced this pull request May 20, 2026
…o be separate and symmetric (apache#3916)

### What changes were proposed in this PR?
This PR updates the function names and docstring for workflow result
exports to local/dataset to be symmetric.


### Any related issues, documentation, discussions?
Refactors apache#3728.


### How was this PR tested?
This PR involves a simple refactoring of the existing workflow result
export functionality. Apart from verifying that the functionality has
not changed, no additional tests are needed.


### Was this PR authored or co-authored using generative AI tooling?
No.
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
apache#3728)

### Purpose ### 
This pull request partially addresses issue apache#3404 by switching workflow
result downloads to use the browser's native download functionality.
Using the browser to handle downloads enables the browser's built-in
download UI, including a progress bar when downloading larger files.

### Changes ### 
Previously, we used Angular's `HttpClient` to request the result file
from the backend as a `Blob` and download the `Blob` to the local
filesystem. Now, we use a standard HTML form submission to request the
result file, allowing the browser to handle the download. The backend
logic for generating the file stream remains the same.

Headers such as `Authorization` (used for Bearer tokens) cannot be added
to standard form submissions. To work around this, we pass the JWT token
directly as a form parameter and manually check for validity of the
token in the backend. We also manually verify that the user role is
valid.

#### Summary of Changes ####
- Changed frontend logic for local workflow result downloads to use a
standard form submission instead of `HttpClient` to request the
download, allowing the browser to handle the download
- Added endpoint to receive form request and authenticate the request
via the JWT token before triggering download

### Demonstration ###

https://github.com/user-attachments/assets/a2d5278e-5ebf-441f-99bf-ff93d1667271

---------

Signed-off-by: Xinyuan Lin <xinyual3@uci.edu>
Co-authored-by: Chris <143021053+kunwp1@users.noreply.github.com>
Co-authored-by: ali risheh <ali.risheh876@gmail.com>
Co-authored-by: ali <a_icam@yahoo.com>
Co-authored-by: Xinyuan Lin <xinyual3@uci.edu>
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
…o be separate and symmetric (apache#3916)

### What changes were proposed in this PR?
This PR updates the function names and docstring for workflow result
exports to local/dataset to be symmetric.


### Any related issues, documentation, discussions?
Refactors apache#3728.


### How was this PR tested?
This PR involves a simple refactoring of the existing workflow result
export functionality. Apart from verifying that the functionality has
not changed, no additional tests are needed.


### Was this PR authored or co-authored using generative AI tooling?
No.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file engine frontend Changes related to the frontend GUI infra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch workflow result download to use browser native downloads

5 participants