Skip to content

Dictation indicator toggles dictation on left click - #7905

Closed
tahadx wants to merge 1 commit into
omacom:quattrofrom
tahadx:fix/dictation-indicator-toggle
Closed

tahadx wants to merge 1 commit into
omacom:quattrofrom
tahadx:fix/dictation-indicator-toggle

Conversation

@tahadx

@tahadx tahadx commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Closes #7900.

What

The dictation glyph sat in the hover cluster acting like a toggle but opened the Voxtype config TUI on both left and right click — the only indicator of the six that didn't act on its own mode, and it left no way to start dictation from the bar at all.

  • Left click now runs voxtype record toggle — the exact action of the existing SUPER+CTRL+X binding (default/hypr/bindings/voxtype.lua)
  • Right click still opens omarchy-voxtype-config

Why this shape

The manual describes these glyphs as status modes, and every sibling (Dnd, NightLight, StayAwake, ScreenRecording) flips its mode on press. Keeping config on right-click preserves one-click access to settings without breaking the cluster's convention.

Tests

Updated test/shell.d/fixtures/indicator-contract/shell.qml, which previously codified the old behavior (asserting two clicks produced two config runs). It now asserts:

  • left press → exactly one voxtype record toggle
  • right press → exactly one omarchy-voxtype-config
  • no omarchy-voxtype-model command from either

indicator-contract-test.sh, voxtype-invitation-test.sh, and the binding-conflict tests pass; full ./test/shell shows only the three pre-existing environmental failures from a missing local omarchy-pkgs checkout.

Every sibling indicator acts on its mode when clicked; the dictation
glyph instead opened the Voxtype config for both buttons, leaving no way
to start dictation from the bar. Left click now toggles dictation, the
same action as the SUPER+CTRL+X binding, and right click keeps opening
the config TUI. Closes omacom#7900.
Copilot AI balanced review requested due to automatic review settings August 23, 2026 15:11

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

Updates the dictation indicator to toggle recording on left click while preserving configuration access on right click.

Changes:

  • Dispatches dictation actions based on mouse button.
  • Updates indicator contract assertions for both actions.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
shell/plugins/bar/indicators/Dictation.qml Adds button-specific dictation behavior.
test/shell.d/fixtures/indicator-contract/shell.qml Verifies left- and right-click commands.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +36 to +38
// Left click toggles dictation, matching the SUPER+CTRL+X binding and the
// toggle-on-click behavior of every sibling indicator. Any other button
// opens the Voxtype config TUI.
@thecdrz

thecdrz commented Aug 24, 2026

Copy link
Copy Markdown

Confirmed on Omarchy 4.0.0-1: left/right click on the dictation glyph both open omarchy-voxtype-config, while SUPER+CTRL+X / F9 toggle correctly. The left=voxtype record toggle / right=config split matches the other indicators and the manual. Looks good to merge from here.

@tahadx

tahadx commented Aug 24, 2026 via email

Copy link
Copy Markdown
Contributor Author

@tahadx tahadx left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewer disclosure: this review was written by an AI coding assistant (ox-alpha) at the contributor's request, and posted with their approval. Please weigh it alongside human review.

What I checked

I verified the plumbing behind the change: WidgetButton.qml declares signal pressed(int button) and triggerPress(button) re-emits it, so onPressed: function(button) receives the real button and the Qt.LeftButton discrimination is sound rather than relying on incidental behavior. Left click matching the existing SUPER+CTRL+X binding and the toggle-on-click convention of every sibling indicator (Dnd, NightLight, StayAwake, ScreenRecording) makes this the consistent shape for the cluster.

Observations

  • Updating the fixture mattered more than it looks: the old indicator-contract fixture asserted two clicks → two config runs, i.e. it had codified the bug. The new assertions cover all three failure modes: exactly one toggle command on left press, exactly one config command on right press, zero model commands from either.
  • Keeping config on right-click preserves one-click settings access instead of forcing users through a menu — good call over dropping it entirely.
  • Minor: "any other button opens the config" means middle-click gets the TUI too; for a two-action glyph that seems fine, just noting the code implements exactly what the comment says.

Small diff, correct convention alignment, contract tests updated to match reality rather than the bug. Nothing further from me.

@tahadx tahadx left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewer disclosure: this review was written by an AI assistant at the contributor's request and posted with their approval. I am an AI, not a human reviewer — please weigh it alongside human review.

Rich code review — #7905 (dictation indicator toggles on left click)

Making the left click toggle dictation (matching the SUPER+CTRL+X binding and sibling indicators) and routing other buttons to the Voxtype config is consistent and user-friendly.

Verified

  • onPressed: function(button) correctly branches on Qt.LeftButton.
  • The indicator-contract test is updated to assert exactly one voxtype record toggle (left) and one omarchy-voxtype-config (right), and zero omarchy-voxtype-model.
  • voxtype record toggle is the same subcommand the keybinding uses — verified present in the codebase.

One thing to double check (non-blocking)

If the user has toggled dictation while the bar is hidden or during a race with the voxtype service starting, a left click could silently no-op. That's inherent to the toggle design and not a regression of this PR.

Verdict: ship.

@omarchybot omarchybot added the enhancement New feature or request label Sep 27, 2026
@paulogeyer

Copy link
Copy Markdown
Contributor

The code this PR changes is no longer on quattro: c248890 (#14552) removed the built-in bar Dictation.qml indicator, so the click handler is gone. Checked against current quattro. I think this one can be closed.

@tahadx tahadx closed this Oct 17, 2026
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.

Dictation indicator opens the config instead of toggling dictation, unlike every other indicator

5 participants