Skip to content

Add sidebar upload progress toast and optional finish title#8308

Merged
Light2Dark merged 4 commits intomarimo-team:mainfrom
xfy0012:feat/upload-loading-bar
Feb 18, 2026
Merged

Add sidebar upload progress toast and optional finish title#8308
Light2Dark merged 4 commits intomarimo-team:mainfrom
xfy0012:feat/upload-loading-bar

Conversation

@xfy0012
Copy link
Contributor

@xfy0012 xfy0012 commented Feb 13, 2026

Summary

This PR adds upload progress feedback for file uploads from the editor sidebar. issue(#8120).

Description of Changes

  1. Extended withLoadingToast (frontend/src/utils/download.ts) with an optional finishTitle argument.
  2. Updated sidebar file upload flow (frontend/src/components/editor/file-tree/upload.tsx) to reuse withLoadingToast.
  3. Wired upload progress updates by file count (progress.addTotal(...) + progress.increment(1)).
  4. Added tests in frontend/src/utils/__tests__/download.test.tsx for:
    • showing a finish toast when finishTitle is provided
    • not showing a finish toast when the operation fails

Behavior

  • During upload: a loading toast with progress bar is shown.
  • On success: loading toast dismisses, then a completion toast is shown.
  • On failure: loading toast dismisses and existing error handling remains unchanged.

Validation

  • pnpm --filter @marimo-team/frontend test src/utils/__tests__/download.test.tsx --run
  • pnpm turbo --filter @marimo-team/frontend typecheck

@vercel
Copy link

vercel bot commented Feb 13, 2026

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

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Feb 14, 2026 11:10pm

Request Review

@github-actions
Copy link

github-actions bot commented Feb 13, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@xfy0012
Copy link
Contributor Author

xfy0012 commented Feb 13, 2026

I have read the CLA Document and I hereby sign the CLA

@xfy0012
Copy link
Contributor Author

xfy0012 commented Feb 14, 2026

I also noticed a small UX edge case: if a drop includes both accepted and rejected files, users may see a rejection toast without a clear confirmation that the accepted files were uploaded successfully.

Would you like me to address this in a small follow-up PR by showing a combined summary message (e.g. “Uploaded N files, skipped M files”)?

@Light2Dark
Copy link
Collaborator

I also noticed a small UX edge case: if a drop includes both accepted and rejected files, users may see a rejection toast without a clear confirmation that the accepted files were uploaded successfully.

Would you like me to address this in a small follow-up PR by showing a combined summary message (e.g. “Uploaded N files, skipped M files”)?

Oh, yeah that looks like we missed something. A follow-up would be great, thank you for this!

Copy link
Collaborator

@Light2Dark Light2Dark left a comment

Choose a reason for hiding this comment

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

ty! this will improve molab experience too

@Light2Dark Light2Dark added the enhancement New feature or request label Feb 17, 2026
@Light2Dark Light2Dark merged commit d9cd672 into marimo-team:main Feb 18, 2026
25 of 26 checks passed
LiquidGunay pushed a commit to LiquidGunay/marimo that referenced this pull request Feb 21, 2026
…eam#8308)

## Summary


This PR adds upload progress feedback for file uploads from the editor
sidebar. issue(marimo-team#8120).

## Description of Changes

1. Extended `withLoadingToast` (`frontend/src/utils/download.ts`) with
an optional `finishTitle` argument.
2. Updated sidebar file upload flow
(`frontend/src/components/editor/file-tree/upload.tsx`) to reuse
`withLoadingToast`.
3. Wired upload progress updates by file count (`progress.addTotal(...)`
+ `progress.increment(1)`).
4. Added tests in `frontend/src/utils/__tests__/download.test.tsx` for:
   - showing a finish toast when `finishTitle` is provided
   - not showing a finish toast when the operation fails

## Behavior

- During upload: a loading toast with progress bar is shown.
- On success: loading toast dismisses, then a completion toast is shown.
- On failure: loading toast dismisses and existing error handling
remains unchanged.

## Validation

- `pnpm --filter @marimo-team/frontend test
src/utils/__tests__/download.test.tsx --run`
- `pnpm turbo --filter @marimo-team/frontend typecheck`

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants