Skip to content

Prompt voxtype installation when command is missing (#13594) - #13807

Closed
szaidi-code wants to merge 1 commit into
omacom:quattrofrom
szaidi-code:fix/voxtype-missing-command-13594
Closed

szaidi-code wants to merge 1 commit into
omacom:quattrofrom
szaidi-code:fix/voxtype-missing-command-13594

Conversation

@szaidi-code

Copy link
Copy Markdown
Contributor

Closes #13594

Summary

Clicking the dictate icon when voxtype was not yet installed output voxtype: command not found rather than guiding the user to install it.

Changes

  • Check for voxtype presence in bin/omarchy-voxtype-config and bin/omarchy-voxtype-model, invoking omarchy-voxtype-install when missing.
  • Add unit test coverage in test/shell.d/voxtype-config-test.sh.

@sanjyay

sanjyay commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

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

(and analogously for bin/omarchy-voxtype-model).

2. Overlap with existing PRs #6832 and #8631

Note that there are two open PRs addressing this area:

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.

@ryanrhughes

Copy link
Copy Markdown
Collaborator

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!

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.

Dictate bar icon errors with "voxtype: command not found" when Voxtype isn't installed

5 participants