Skip to content

Preserve legacy dictation choices during Quattro upgrades - #14654

Open
VykosMolt wants to merge 5 commits into
omacom:quattrofrom
VykosMolt:fix/retire-copied-voxtype-hook
Open

VykosMolt wants to merge 5 commits into
omacom:quattrofrom
VykosMolt:fix/retire-copied-voxtype-hook

Conversation

@VykosMolt

@VykosMolt VykosMolt commented Oct 9, 2026 •

Copy link
Copy Markdown

A legacy Quattro upgrade copies missing defaults before running migrations. That seeded Superwhisper before the ordered backend migration could preserve an existing Voxtype user's selection. Upgrades also left the exact old install-voxtype invitation hook pointing at a command that no longer exists.

Defer only the missing dictation default when Voxtype is installed and its packaged backend migration is still pending. Use the same per-user migration state/default path as the real queue, so completed migrations cannot defer forever. Existing explicit selections and links remain intact, including dangling links; users without Voxtype and older packaged trees keep normal default copying. Migration ordering and failure/retry behavior stay intact.

A separate idempotent migration removes only the byte-identical obsolete invitation hook. User-edited hooks and symlinks are preserved.

Validation at fa692a5: 38 upgrade and 15 dictation checks pass, plus Bash syntax and diff checks. The upgrade fixtures execute the actual copy function and actual migration queue, covering pending/completed/custom markers, a failed earlier migration and retry, explicit backend choices, links, non-Voxtype users and older sources. The new regression check fails before the source correction. These isolated tests do not establish a full live legacy upgrade or physical audio capture.

@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The PR appears safe to merge; no blocking issues were found.

Summary

Preserves legacy Voxtype choices by leaving the missing dictation default for the ordered migration to create.

  • Existing selections and links remain unchanged.
  • The cleanup now recognizes both exact forms of the retired invitation hook.
  • Added checks cover the quoted hook form while retaining checks for user edits and links.

No actionable new issues were found in the changes since the previous review. No previous review threads were supplied. This review did not run the tests.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Copy missing defaults] --> B{Voxtype installed and backend migration pending?}
  B -- Yes --> C[Leave dictation choice missing]
  B -- No --> D[Copy packaged default if missing]
  C --> E[Run ordered migrations]
  D --> E
  E --> F[Preserve existing choice or select Voxtype]
  F --> G{Invitation exactly matches either stock form?}
  G -- Yes, regular file --> H[Remove retired invitation]
  G -- No --> I[Keep hook unchanged]
Loading

Reviews (3) · Last reviewed commit: "Retire the invitation hook v4.0.0 instal..." · Reviewed by Greptile

@VykosMolt VykosMolt changed the title Retire the copied obsolete Voxtype invitation hook Preserve legacy dictation choices during Quattro upgrades Oct 9, 2026
@jandrusk

Copy link
Copy Markdown

Small thing on migrations/1791506046.sh: the byte-for-byte match only works if the heredoc is exactly the hook Omarchy used to copy, including the double space in -g "Install Dictation with Voxtype". That hook isn't on quattro anymore, so could you point to the release or commit it came from (or add a test fixture built from that exact file)? Then a reviewer can confirm the match isn't off by one character. If it is off, the cleanup silently does nothing.

@VykosMolt

Copy link
Copy Markdown
Author

The heredoc is byte-for-byte identical to the hook at commit 1554a522ccd641a603d94aae28c495ce30afa428, immediately before the selectable-dictation rewrite in c24889096. I added that immutable source link beside the match in c82a8cc.

I extracted the historical Git blob and compared all 302 bytes to the heredoc, including the final newline: they match exactly (SHA-256 2e20b0aa831f2dacc0e4c575a38e2340ffe71aebebc831b54095d643375e9a24). The apparent extra space after -g contains the icon glyph U+EC12. The existing dictation suite passes all 15 checks, including exact-hook deletion, repeat execution, and preservation of customized hooks and symlinks.

omarchybot and others added 2 commits October 16, 2026 11:27
House style quotes string literals compared inside [[ ]].

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex Medium <noreply@openai.com>
v4.0.0 shipped install-voxtype.hook with the --exec command quoted as one argument; v4.0.1-v4.0.4 shipped it unquoted. First run copies the hook once and nothing replaces it, so machines installed from v4.0.0 still carry the quoted copy, which the exact match missed. Match both stock texts, byte for byte, and keep leaving edited copies and links alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review labels Oct 16, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed and verified on a disposable Omarchy worker. The bug is real on quattro: omarchy-upgrade-to-quattro copies missing defaults (including omarchy/defaults/dictation = superwhisper) before it runs migrations, so migrations/1791479273.sh finds the file already there and a user with voxtype-bin installed comes out of the upgrade on Superwhisper.

Reproduction. A standalone script runs the upgrade's real copy_missing_config_defaults against an empty ~/.config with voxtype-bin reported installed, then the backend migration. On quattro it ends with superwhisper. On this branch, and on this branch merged with today's quattro, it ends with voxtype. With only the upgrade-script change reverted, it ends with superwhisper again.

Tests. ./test/cli passes. upgrade-to-quattro-test.sh (38) and dictation-test.sh (15) pass on the branch merged with quattro. The full ./test/shell run is not green on the worker, but every failing file (ascii, background-instant-reload, background-intro-clone, branding-about-animation, hyprland-startup-cursor-cold, i18n, lock-appear-budget, passwordless-grant-lifecycle, runtime-smoke, screenshot-sanity) fails the same way on quattro itself, and none of them touches this change. preinstalls-test.sh failed once in a full run and passed on its own on both trees.

Pushed two commits:

  • f2e23ba: migrations/1791506046.sh only matched the hook that v4.0.1–v4.0.4 copied. v4.0.0 shipped the same hook with the --exec command quoted as one argument, and first run copied it once, so machines installed from v4.0.0 kept it. The migration now matches both stock texts byte for byte (checked against git show v4.0.0: and v4.0.1:install/user/first-run/install-voxtype.hook, glyph included), and dictation-test.sh covers the v4.0.0 copy. That test fails if the migration change is reverted. The comment above the heredocs now names those releases instead of linking a commit, so @jandrusk's question can be checked with git show against the tags.
  • 67a9cf4: quotes the "omarchy/defaults/dictation" literal at bin/omarchy-upgrade-to-quattro:1811, per house style.

A leftover copy of the old hook does little harm: once omarchy-done has recorded the invitation, it never shows again. The cleanup just stops it pointing at the removed omarchy-voxtype-install command.

Second opinion. Codex Medium reviewed the original change and then the two commits above. It agreed the bug is real and that the deferral is correct whether the backend migration is pending or done, with a custom OMARCHY_MIGRATION_STATE, without Voxtype, on older trees, and when an earlier migration fails and is retried. Independence isn't guaranteed. The house-style issue was its own finding. It confirmed the v4.0.0 gap by comparing every released hook. It found nothing wrong with the follow-up commits. Both reviewers note that the hook cleanup is a separate change from preserving the dictation choice, though small and in its own migration. Whether to keep it here or split it out is the maintainer's call.

Next: waiting on the maintainer. Nothing is left for the author.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants