feat: add hyprnote-cli and hyprnote-cli-tauri crates for CLI refactor#2703
Closed
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Closed
feat: add hyprnote-cli and hyprnote-cli-tauri crates for CLI refactor#2703devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
This refactor separates CLI concerns into dedicated crates: - crates/hyprnote-cli: CLI contract with command definitions, parsing, and early-exit command execution (bug, web, changelog). Independent of Tauri. - crates/hyprnote-cli-tauri: Tauri-dependent handlers for commands that need app runtime (update). Fixes bug where 'hyprnote update' didn't work on first instance. - plugins/cli2: Refactored to use new crates, keeping only installation logic and Tauri arg filtering. - apps/desktop: Updated entrypoint to carry CLI invocation forward and execute runtime-dependent commands after app setup. Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for hyprnote-storybook canceled.
|
✅ Deploy Preview for hyprnote canceled.
|
✅ Deploy Preview for howto-fix-macos-audio-selection canceled.
|
Contributor
Author
|
Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it. |
Contributor
Author
|
Closing due to inactivity for more than 30 days. Configure here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR separates CLI concerns into dedicated crates to improve modularity and fix a bug where
hyprnote updatedidn't work on first instance launch.New crates:
crates/hyprnote-cli: Tauri-independent CLI contract with command definitions, parsing,ExecModeenum, and early-exit command execution (bug, web, changelog)crates/hyprnote-cli-tauri: Tauri-dependent handlers for commands needing app runtime (update)Key architectural change: The desktop app now captures the CLI invocation early and executes runtime-dependent commands after the Tauri app is built. Previously, the
updatecommand returnedContinueWithoutWindowbut the actual update logic only ran in the single-instance callback, which never fires on first instance.Review & Testing Checklist for Human
hyprnote updateon first instance launch - This is the main bug fix. Verify the update check actually runs when no other instance is running.bugcommand now usesenv!("CARGO_PKG_VERSION")from thehyprnote-clicrate (0.1.0) instead of the desktop app version. This may need adjustment.hyprnote bug,hyprnote web,hyprnote changelogand verify they open the correct URLshyprnote updatefrom terminal and verify it worksRecommended test plan:
hyprnote updatewith no instance running - should check for updateshyprnote bug- should open GitHub issues pagehyprnote updateagain from terminalNotes
hyprnote doctorandhyprnote runLink to Devin run: https://app.devin.ai/sessions/a8ad4b7f25e24a23af00cb9aaa8c98ce
Requested by: yujonglee (@yujonglee)