Skip to content

Discard pending Voxtype output after daemon restart - #1

Open
zihaomu wants to merge 3 commits into
bscott:fix/voxtype-xwayland-pastefrom
zihaomu:fix/16537-voxtype-output-lifetime
Open

zihaomu wants to merge 3 commits into
bscott:fix/voxtype-xwayland-pastefrom
zihaomu:fix/16537-voxtype-output-lifetime

Conversation

@zihaomu

@zihaomu zihaomu commented Oct 26, 2026

Copy link
Copy Markdown

Follow-up to omacom/omarchy#16537, addressing the restart/cancellation review.

If Voxtype stops after begin but before end, its output marker survives. Cancelling a recording after the restart then treats that old marker as new output and pastes the previous clipboard contents.

The marker now records the daemon PID and process start time. Both hooks resolve the daemon through Voxtype's runtime PID file, avoiding temporary hook-shell PIDs and supporting manual launches as well as the service. Comparing the start time also distinguishes a reused PID. end consumes the marker and pastes only for the matching daemon; stale, legacy, and unverifiable markers are discarded.

Validation on an HP ZBook / Ryzen AI MAX+ PRO 395 / Radeon 8060S:

  • The restart-then-cancel regression fails on the original PR head and passes with this commit. Coverage also checks new output after restart, legacy markers, missing daemon identity, repeated end, and type/paste modes.
  • Dictation: 18 checks; clipboard: 84; emoji: 10; CLI: 125. All passed, as did Bash syntax and whitespace checks.
  • Six native checks in a disposable Hyprland 0.56.2 compositor passed: the actual clipboard helper and Voxtype hooks pasted Unicode text into both Wayland and XWayland GTK entries; simulated daemon restart followed by cancellation inserted nothing in either backend. Screenshots were inspected.

The native hook fixture models Voxtype's PID-file and sh -c behavior from v1.1.1 source. Voxtype is not installed on this laptop, so audio transcription and a real Voxtype service restart were not exercised.

This PR targets your existing branch so it can be incorporated directly into upstream omacom#16537.

bscott and others added 3 commits October 24, 2026 18:05
…ive them

wtype types through a keymap XWayland clients never load, so its
Shift+Insert reaches them as Shift+Escape and nothing is pasted. The
clipboard history paste, file paste and emoji picker now send the chord
through Hyprland's send_key_state, as the universal clipboard bindings do.
In type mode wtype's keys reach XWayland apps, such as the ChatGPT and
Hermes desktop apps, as Escape and digits instead of the transcript.
New installs copy the transcript and paste it from the output hooks with
a Shift+Insert sent by Hyprland. The hooks only paste after real output,
not after a cancelled or empty recording, and only in clipboard mode.
@bscott
bscott force-pushed the fix/voxtype-xwayland-paste branch from 4954a80 to 7feb244 Compare November 14, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants