Skip to content

Fix Voxtype dictation click error for upgraded accounts - #6932

Closed
haydenmckay wants to merge 4 commits into
omacom:quattrofrom
haydenmckay:fix-voxtype-missing-click-handler
Closed

haydenmckay wants to merge 4 commits into
omacom:quattrofrom
haydenmckay:fix-voxtype-missing-click-handler

Conversation

@haydenmckay

@haydenmckay haydenmckay commented Aug 15, 2026 •

Copy link
Copy Markdown

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 found instead of guiding the user to
install it.

Two related, separable problems:

  1. Dictation.qml's click handler had no install-state guard. It
    unconditionally ran voxtype configure regardless of whether the
    voxtype-bin package was present, unlike the Hyprland keybindings for the
    same feature, which already gate on o.cmd_present("voxtype").

  2. 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), but
    that whole sequence is gated on the first-run-user completion 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 the
    identical backfill-migration pattern for Voxtype.

Changes

  • bin/omarchy-voxtype-open-config: new command the Dictation click hands
    off to — checks omarchy-cmd-missing voxtype and routes to
    omarchy-voxtype-install (via the same floating-terminal presentation the
    installer already uses) when missing, otherwise omarchy-voxtype-config.
  • shell/plugins/bar/indicators/Dictation.qml: click now calls the single
    omarchy-voxtype-open-config entrypoint instead of unconditionally opening
    config.
  • migrations/1786719479.sh: backfill-install the install-voxtype.hook
    post-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 Dictation
    click assertion for the new command name.
  • test/shell.d/voxtype-open-config-test.sh: new focused test covering the
    install/config branch logic.

Test plan

  • ./test/cli passes
  • ./test/shell — indicator-contract-test.sh and the new
    voxtype-open-config-test.sh pass; the 3 other failures in the full
    run (config-test.sh, snapper-test.sh,
    unowned-system-paths-test.sh) are pre-existing on a clean
    upstream/quattro checkout, unrelated to this change
  • Verified live on the upgraded laptop: cloned omarchy.indicators
    locally, 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

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.
Copilot AI balanced review requested due to automatic review settings August 15, 2026 07:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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")

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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")

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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")

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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.
Copilot AI review requested due to automatic review settings August 15, 2026 07:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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/bash can cause inconsistent interpreter selection; and without set -e failures in omarchy-hook-install could be silently ignored depending on runner behavior. Add a shebang and enable set -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>
Copilot AI review requested due to automatic review settings August 15, 2026 10:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 runs omarchy-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"

@paulogeyer

Copy link
Copy Markdown
Contributor

The code this PR fixes is no longer on quattro: c248890 (#14552) removed the built-in bar Dictation.qml indicator, and 50d687a (#14625) removed install-voxtype.hook. Dictation now goes through omarchy-dictation. Checked against current quattro. I think this one can be closed.

@ryanrhughes

Copy link
Copy Markdown
Collaborator

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.

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.

6 participants