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

chore: [DNM] tauri v2 upgrade #1100

Merged
merged 50 commits into from
Dec 5, 2024
Merged

chore: [DNM] tauri v2 upgrade #1100

merged 50 commits into from
Dec 5, 2024

Conversation

shanimal08
Copy link
Collaborator

@shanimal08 shanimal08 commented Nov 21, 2024

Description

  • upgrade tauri to V2 see their migration guide for more info:
    • moved auto update and systray logic to FE using tauri v2 plugins
    • updated imports and uses where needed
  • updated gh workflows:
    • separate workflow for beta builds
    • adjusted CI runs to suit V2
  • split out our tauri_commands to their own file (commands.rs) to declutter main.rs

Motivation and Context

  • we want notifications and cool V2 things!

How Has This Been Tested?

  • locally

What process can a PR reviewer use to test or verify this change?

  • run app
  • check it works the same as before (if not better 🤞🏼)

Breaking Changes

  • yet to be seen

@Misieq01
Copy link
Collaborator

image

Not building on my end

@shanimal08
Copy link
Collaborator Author

image

Not building on my end

did you npm ci? 😅 else you could cargo install tauri-cli @ v2 if that didn't work? but it should

@Misieq01
Copy link
Collaborator

My bad, sorry hahah

Copy link
Collaborator

@Misieq01 Misieq01 left a comment

Choose a reason for hiding this comment

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

LGTM

- wip: update dir resolvers
- wip: move Systray logic to FE
- wip: updated beta build workflows
- wip: emit miner metrics
- ci: updated workflows
- merge: reolve conflicts
@shanimal08 shanimal08 force-pushed the build-chore-upgrade-tauri-v2 branch from 83c2a0a to 4c71ee8 Compare November 29, 2024 10:09
&self,
config_dir: PathBuf,
) -> Result<GpuStatusFileContent, Error> {
let file: PathBuf = config_dir.join("gpuminer").join("gpu_status.json");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hold on aren't cache_dir and config_dir different according to docs ?


const UPDATE_CHECK_INTERVAL = 1000 * 60 * 60; // 1 hour

export const useHandleUpdate = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please verify that download progress works well. I had issue with tauri js API where it would get stuck from massive amounts of incoming Progress events. In the end rust API worked much better with high amount of events.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we did check this with a draft auto update release a long while back and it seemed alright, i didn't get stuck :D but that hasn't been tested recently

}
Err(e) => {
error!(target: LOG_TARGET, "Error loading internal wallet: {:?}", e);
Err(e)
Err::<(), std::string::String>(e.to_string())
Copy link
Collaborator

Choose a reason for hiding this comment

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

👀
did this not work?

Suggested change
Err::<(), std::string::String>(e.to_string())
Err(e.to_string())

shanimal08 and others added 17 commits December 4, 2024 10:30
Description
---

- set up `tauri-plugin-process` correctly for relaunch after install
- adjusted the check for updates 
- adjusted the update handler 

Motivation and Context
---

autoupdate didn't work properly in V2 branch

How Has This Been Tested?
---

locally. painstakingly.
## Fixes part of #1168 and potentialy fixes #1175 
### [ Content ]
- Handle extra case for wallet creation when no data is present on
machine
- Fixed prolonged shutdowns sequences at the end of setup
- Removed unnecessary thread spawn
- Fixed `gpu_detection` and `gpu_status` generation
------------
### [ Testing ]
- Try copy or show seed words | play around with deleting
wallet_config.json
- For closing sequence => Close app around 85% or around time when we
enter main app view
@brianp brianp force-pushed the build-chore-upgrade-tauri-v2 branch from 65dff44 to f5a0827 Compare December 5, 2024 21:43
@brianp brianp merged commit 19e0622 into main Dec 5, 2024
15 checks passed
@brianp brianp deleted the build-chore-upgrade-tauri-v2 branch December 5, 2024 22:49
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.

4 participants