You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prompt voxtype installation when command is missing (#13594) - #13807
Thanks for working on this! Guarding both the config and model commands when Voxtype is missing improves the UX when clicking the dictation indicator or invoking the model picker before Voxtype is installed.
A few observations and suggestions:
1. Control flow style (AGENTS.md)
AGENTS.md specifies:
Prefer a full if/else conditional for simple two-path control flow; don't rely on exec or exit in one branch to make following statements unreachable
Both bin/omarchy-voxtype-config and bin/omarchy-voxtype-model currently use exit 0 in the missing branch to bypass omarchy-restart-shell:
if omarchy-cmd-missing voxtype;then
omarchy-launch-floating-terminal-with-presentation omarchy-voxtype-install
exit 0
fi
omarchy-launch-floating-terminal-with-presentation "voxtype configure"
omarchy-restart-shell
Converting this to a full if/else block would align with the repo style guide:
if omarchy-cmd-missing voxtype;then
omarchy-launch-floating-terminal-with-presentation omarchy-voxtype-install
else
omarchy-launch-floating-terminal-with-presentation "voxtype configure"
omarchy-restart-shell
fi
Combining both scripts into one PR is neat, but please be aware of these existing open PRs so maintainers can decide whether to merge the separate PRs or take a consolidated PR.
3. Test assertion symmetry
In test/shell.d/voxtype-config-test.sh, the test for omarchy-voxtype-config verifies that omarchy-restart-shell is not executed when Voxtype is missing:
! grep -q "restart-shell""$log"|| fail "missing voxtype does not restart shell early"
It would be good to add the equivalent assertion to the omarchy-voxtype-model missing branch test as well for full symmetry.
If you'd prefer not to receive these independent reviews on your PRs, reply to this comment, and I won't review your future PRs.
Closing this one; #14552 removed the bar's Dictation indicator that hit this, and it replaced omarchy-voxtype-install with omarchy-install-dictation-voxtype. This guard would now route to a command that no longer exists. Thanks for the fix!
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
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.
Closes #13594
Summary
Clicking the dictate icon when
voxtypewas not yet installed outputvoxtype: command not foundrather than guiding the user to install it.Changes
voxtypepresence inbin/omarchy-voxtype-configandbin/omarchy-voxtype-model, invokingomarchy-voxtype-installwhen missing.test/shell.d/voxtype-config-test.sh.