Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No loading spinner for long poll actions #7545

Open
Kimeiga opened this issue Mar 8, 2025 · 3 comments
Open

No loading spinner for long poll actions #7545

Kimeiga opened this issue Mar 8, 2025 · 3 comments
Labels
bug Something isn't working UI Any broken visuals like layouts, colors etc.

Comments

@Kimeiga
Copy link

Kimeiga commented Mar 8, 2025

Version

0.14.8

Operating System

macOS

Distribution Method

dmg (Mac OS - Apple Silicon)

Describe the issue

Currently when you take actions that will take a while, such as moving a commit from one branch to another, moving a changed file from one commit to another, or etc, these actions can take around 2 seconds on a large monorepo like mine, but there is not loading spinner that indicates that the action is in progress.

How to reproduce (Optional)

  1. Drag a commit from one branch to another branch on a large monorepo

  2. Drag a changed file from one commit to another commit on a branch in a large monorepo

Expected behavior (Optional)

There should be a loading spinner somewhere indicating the action is in progress

Relevant log output (Optional)

@Kimeiga Kimeiga added the bug Something isn't working label Mar 8, 2025
@Byron Byron added the UI Any broken visuals like layouts, colors etc. label Mar 11, 2025
@Byron
Copy link
Collaborator

Byron commented Mar 11, 2025

Thanks a lot for reporting.

Even though the next major release is going to be much more efficient, there is still no notion of long-running processes. For instance, when cloning a repository, the UI just hangs there without any progress indication.

Showing progress certainly is yet to be solved in the UI (I think), but hope @PavelLaptev will correct me. Also CC to @amrbashir in case tauri already has support for long-running operations and progress reporting.

@amrbashir
Copy link

Unfortunately not, that will need to be handled by tauri users, here is a few things to note:

  1. Use an async command for long running operations so it won't block the main thread and thus UI.
  2. Use Channel to send data in a streaming fashion. Use this for reporting progress.
  3. Long running operation can be stored in the ResourceTable and give back the rid to front-end for later queries or termination.

We use these techniques in our HTTP plugin, see https://github.com/tauri-apps/plugins-workspace/blob/95e8f909b103c5c8f7c52a756fb5501b77267779/plugins/http/src/commands.rs

@Byron
Copy link
Collaborator

Byron commented Mar 11, 2025

I see, thanks a lot @amrbashir, very helpful! I found this portion of the linked file most interesting as it brings together all concepts very concisely: https://github.com/tauri-apps/plugins-workspace/blob/95e8f909b103c5c8f7c52a756fb5501b77267779/plugins/http/src/commands.rs#L316-L333 .

I can definitely see how this would be used to implement progress reporting.
CC @mtsgrd and @krlvi .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working UI Any broken visuals like layouts, colors etc.
Projects
None yet
Development

No branches or pull requests

3 participants