Repository navigation
Fix Voxtype dictation click error for upgraded accounts - #6932
haydenmckay wants to merge 4 commits into
Conversation
Clicking the bar's dictation indicator unconditionally ran `voxtype configure`, which fails with a raw "command not found" shell error when Voxtype isn't installed. Check for the binary first and route to the installer instead, matching the existing guard in the Hyprland keybindings.
The one-time "Install Dictation with Voxtype" notification is registered by first-run provisioning, which existing accounts already have marked complete from before Quattro introduced Voxtype — so upgrading users never receive it and can only discover dictation is missing by hitting the raw error the previous commit fixes. Same gap already fixed once for the agent-picker invitation in 1786549201.sh; apply the same backfill here.
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the Dictation indicator behavior so clicking it first checks whether Voxtype is installed (triggering an install flow if missing) and adds a migration to ensure existing installs receive the Voxtype invitation hook.
Changes:
- Update Dictation indicator click handler to conditionally launch Voxtype install vs config.
- Adjust indicator-contract fixture to expect the new composed command.
- Add a migration to install a post-update hook for the Voxtype invitation on existing accounts.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| test/shell.d/fixtures/indicator-contract/shell.qml | Updates fixture expectation to match the new conditional command executed by Dictation clicks. |
| shell/plugins/bar/indicators/Dictation.qml | Changes click behavior to check install state before opening config. |
| migrations/1786719479.sh | Ensures existing installs get the post-update “install-voxtype” invitation hook. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| onPressed: function() { | ||
| if (!root.bar) return | ||
| root.bar.run("omarchy-voxtype-config") | ||
| root.bar.run("omarchy-cmd-missing voxtype && omarchy-launch-floating-terminal-with-presentation omarchy-voxtype-install || omarchy-voxtype-config") |
There was a problem hiding this comment.
Fixed — pulled the dispatch out into bin/omarchy-voxtype-open-config, a plain if/else so config can only run in the else branch, never as a fallback from a failed install launch. See 77cfd5f.
| onPressed: function() { | ||
| if (!root.bar) return | ||
| root.bar.run("omarchy-voxtype-config") | ||
| root.bar.run("omarchy-cmd-missing voxtype && omarchy-launch-floating-terminal-with-presentation omarchy-voxtype-install || omarchy-voxtype-config") |
There was a problem hiding this comment.
Done — added bin/omarchy-voxtype-open-config and the QML now just calls that single command, matching how every other indicator hands off to a single omarchy-* entrypoint. See 77cfd5f.
| dictation.triggerPress(Qt.LeftButton) | ||
| dictation.triggerPress(Qt.RightButton) | ||
| root.assertTrue(root.commandCount("omarchy-voxtype-config") === 2, "Dictation clicks run config command") | ||
| root.assertTrue(root.commandCount("omarchy-cmd-missing voxtype && omarchy-launch-floating-terminal-with-presentation omarchy-voxtype-install || omarchy-voxtype-config") === 2, "Dictation clicks check voxtype install state before opening config") |
There was a problem hiding this comment.
Resolved as a side effect of the above — the fixture now asserts commandCount("omarchy-voxtype-open-config") === 2, a short stable command name instead of the long inline shell string. Also added a dedicated voxtype-open-config-test.sh covering the install/config branch logic directly. See 77cfd5f.
Address review feedback on the previous commit: the inline `A && B || C` shell string in Dictation.qml could fall through to C (config) if B (the installer launch) itself failed to start, defeating the guard. Extract the dispatch into bin/omarchy-voxtype-open-config with a plain if/else, matching how every other indicator click hands off to a single omarchy-* command rather than embedding shell logic in QML. Also removes the brittle long command-string assertion from the indicator-contract fixture, and adds a focused test for the new command's install/config branching.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.
Suppressed comments (1)
migrations/1786719479.sh:9
- This migration script lacks a shebang and any explicit error handling. If your migration runner executes scripts directly (instead of sourcing them), missing
#!/bin/bashcan cause inconsistent interpreter selection; and withoutset -efailures inomarchy-hook-installcould be silently ignored depending on runner behavior. Add a shebang and enableset -e(matching the repo’s migration/script conventions) so failures stop the migration deterministically.
echo "Invite existing installs to install Voxtype dictation"
# The invitation is installed by first-run, which existing accounts have already
# marked complete, so they would never receive it — the same gap fixed for the
# agent-picker invitation in 1786549201.sh.
#
# Post-update hooks run later in this same update, so the invitation appears
# without waiting for another one. The hook decides whether to notify.
omarchy-hook-install post-update "$OMARCHY_PATH/install/user/first-run/install-voxtype.hook"
The backfill migration hands this hook to upgraded accounts, and Voxtype predates the upgrade, so anyone already dictating would have been served a critical toast inviting them to install what they run. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated no new comments.
Suppressed comments (2)
migrations/1786719479.sh:9
- The Quattro upgrade path runs
omarchy-migrate(bin/omarchy-upgrade-to-quattro:1189-1196,2343) but never runsomarchy-hook post-update; only a normal update does (bin/omarchy-update:48-49). Therefore an account upgrading after this migration ships gets the hook installed and the migration marked complete, but receives no invitation until a later update, contrary to this backfill's stated behavior. Run post-update hooks at a safe point after the upgrade's final package transaction, with coverage for this path.
# Post-update hooks run later in this same update, so the invitation appears
# without waiting for another one. The hook decides whether to notify.
omarchy-hook-install post-update "$OMARCHY_PATH/install/user/first-run/install-voxtype.hook"
test/shell.d/voxtype-open-config-test.sh:28
- This invokes the new command through Bash, while the QML executes it directly from
PATH. That bypasses both its shebang and executable-bit requirement, so this focused test can pass even if the packaged command cannot be launched by the bar (the general CLI mode check only covers a fixed list of other binaries). Invoke the script directly to exercise the production contract.
PATH="$path" TEST_LOG="$log_file" /bin/bash "$ROOT/bin/omarchy-voxtype-open-config"
|
Closing this one; #14552 removed the bar's Dictation indicator, so there's no click handler left to guard. Thanks for digging into the upgraded-install case; the new dictation setup now handles installing Voxtype when it's picked under Setup > Defaults > Dictation. |
Summary
Found when trying to dictate via the Quickshell bar button, on a laptop
upgraded from an earlier Omarchy release to Quattro (not a fresh install).
Clicking the bar's dictation indicator threw a raw
bash: line 1: voxtype: command not foundinstead of guiding the user toinstall it.
Two related, separable problems:
Dictation.qml's click handler had no install-state guard. Itunconditionally ran
voxtype configureregardless of whether thevoxtype-binpackage was present, unlike the Hyprland keybindings for thesame feature, which already gate on
o.cmd_present("voxtype").An upgraded device never receives the Voxtype install invitation at
all. The one-time "Install Dictation with Voxtype" notification is
registered by
omarchy-provision-first-run(
install/user/first-run/install-voxtype.hook→post-update.d), butthat whole sequence is gated on the
first-run-usercompletion marker.Quattro's upgrade path marks that marker complete on upgrade so the device
doesn't get re-served unrelated first-login setup (welcome toast, GNOME
theme, etc.) — but the side effect is that an upgraded device also never
gets registered for the Voxtype invitation, since it rides on the same
first-run sequence. This is the same class of bug already fixed once for
the agent-picker invitation in
1786549201.sh; this PR applies theidentical backfill-migration pattern for Voxtype.
Changes
bin/omarchy-voxtype-open-config: new command the Dictation click handsoff to — checks
omarchy-cmd-missing voxtypeand routes toomarchy-voxtype-install(via the same floating-terminal presentation theinstaller already uses) when missing, otherwise
omarchy-voxtype-config.shell/plugins/bar/indicators/Dictation.qml: click now calls the singleomarchy-voxtype-open-configentrypoint instead of unconditionally openingconfig.
migrations/1786719479.sh: backfill-install theinstall-voxtype.hookpost-update hook for devices that already completed first-run before
Voxtype existed, mirroring
1786549201.sh.test/shell.d/fixtures/indicator-contract/shell.qml: update the Dictationclick assertion for the new command name.
test/shell.d/voxtype-open-config-test.sh: new focused test covering theinstall/config branch logic.
Test plan
./test/clipasses./test/shell—indicator-contract-test.shand the newvoxtype-open-config-test.shpass; the 3 other failures in the fullrun (
config-test.sh,snapper-test.sh,unowned-system-paths-test.sh) are pre-existing on a cleanupstream/quattrocheckout, unrelated to this changeomarchy.indicatorslocally, applied the same click-handler fix, confirmed the install
prompt opens correctly instead of erroring, then installed Voxtype and
confirmed dictation works end-to-end (this PR description was partly
dictated with it)
🤖 Generated with Claude Code