Skip to content

refactor(core): drop the _with suffix from the engine functions (P1-4 step 6) - #175

Open
n8watkins wants to merge 10 commits into
mainfrom
refactor/p14-rename
Open

n8watkins wants to merge 10 commits into
mainfrom
refactor/p14-rename

Conversation

@n8watkins

Copy link
Copy Markdown
Owner

What

Step 6 (rename) of the engine split in docs/CORE-SPLIT.md: every engine function whose AppHandle wrapper twin is gone loses its _with suffix.
Behavior does not change: the Tauri command names, their arguments, the events, the folders and the installers are the same.

Each name was renamed on its own, with its callers, and the workspace was compiled after each group.
The commits are grouped by module so they can be read one at a time.

Names kept on purpose

  • DictationWorker::spawn_with(executor) is now spawn_with_executor (a test-only constructor, not an engine version).
  • Dispatcher::start_with in sounds.rs (a private helper of the sound player).
  • stop_recording_with_reason, the test helpers restore_with, state_with and host_with, and test names that end in _with.

Names that needed care

  • release_notes::pending_version(db, current) already existed, so it is now pending_version_in, and pending_version_with(core) is pending_version.
  • audio::cancel_recording(parts) already existed, so it is now cancel_recording_on, and cancel_recording_with(core) is cancel_recording.
  • In commands/data.rs the commands open_transcript_externally and open_replacements_file share their name with the engine functions, so the commands call data_hygiene::open_transcript_externally and replacements_file::open_replacements_file through the module.

Left for later

No wrapper, parameter or function without a caller is left by this change.

🤖 Generated with Claude Code

The private body of cancel_recording, which took the same name, is now cancel_recording_on.

Release-note: skip
…release-notes functions

The database-level pending_version, which took the name, is now pending_version_in. The open_transcript_externally command calls the engine function through its module.

Release-note: skip
…, state server, status file, test audio, remote command and dictation state functions

state_server::start_with is now start; the sound player's private Dispatcher::start_with keeps its name.

Release-note: skip
…gpu functions

transcribe_with_output_prefix_with loses only its trailing _with.

Release-note: skip
…lection, file, self-test, parakeet and note-sync functions

NoteSyncWorker::spawn_with(cell) is now spawn. The test-only DictationWorker::spawn_with(executor) is now spawn_with_executor.

Release-note: skip
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.

1 participant