This file provides guidance to AI coding assistants working with code in this repository.
Prerequisites:
Core Development:
# Install dependencies
bun install
# Run in development mode
bun run tauri dev
# If cmake error on macOS:
CMAKE_POLICY_VERSION_MINIMUM=3.5 bun run tauri dev
# Build for production
bun run tauri build
# Frontend only development
bun run dev # Start Vite dev server
bun run build # Build frontend (TypeScript + Vite)
bun run preview # Preview built frontendChecks (run before pushing):
bun run check # CI code-quality job: audit, translations, platform rules (`check:platforms`), file size (`check:file-size`), the Playwright path filter (`check:playwright-paths`: every file the UI tests or the frontend read outside `src/` and `tests/`, such as `src-tauri/src/app_windows.rs`, must match `frontend=` in `playwright.yml`), no doctest (`check:doctests`), versions, ESLint, format (Prettier + cargo fmt --check), build, test typecheck. Clippy on macOS.
bun run test:playwright # UI changes. This is the Playwright CI job.From src-tauri on macOS, Rust behavior changes also need cargo test --locked. The macOS CI job runs that, plus Clippy with -D warnings.
Model Setup: A new install dictates on the device (Engine::Local, Parakeet Ultra). The app downloads the model itself, from the onboarding or Transcription settings (local_models/). The cloud engine uses the Codex / ChatGPT session on the machine ($CODEX_HOME/auth.json, by default ~/.codex/auth.json), which Murmur can also create (codex_login.rs).
For macOS build setup, code signing, and notarization, see BUILD.md.
Murmur is a macOS and Windows (beta) desktop speech-to-text application built with Tauri 2.x (Rust backend + React/TypeScript frontend).
lib.rs- Main entry point, Tauri setup, manager initialization (app_windows.rsbuilds, shows and places the settings window and dispatches single-instance actions,logging.rsholds the log levels and filters,headless.rsruns--transcribe-file, the tests of the log filters and the headless guard are inlib/;specta_builderand theRunEvent::Exitarm stay inlib.rs)managers/- Core business logic:audio.rs- Audio recording and device management (audio/:mute.rssystem mute, on macOS through Core Audio (mute/core_audio.rs) withosascriptas the fallback, skipped when the default output is headphones (meetings/capture/route.rs; an Intel Mac cannot tell and always mutes),microphone.rsdevice choice and stream,recording.rsstart/stop/cancel; tests inaudio/tests.rs, and two ignored ones inmute/tests.rsthat read and flip the mute of the Mac that runs them)transcription.rs- Speech-to-text processing pipelinehistory/- Transcription history storage:schema.rs(migrations,init_database),startup.rs(open_or_reset_database,set_aside_recordings),recordings.rs(recording paths),retention.rs(cleanup_old_entries),versions.rs(the transcripts a re-transcription replaced, intranscription_versions: the replaced text, raw text, cleanup outcome, engine and time become a version in the same transaction as the update, at most 5 per dictation, none for an empty first attempt or an identical result; restoring swaps the version with the current text so nothing is lost; the search index followstranscription_historyonly, so it holds the current text; a delete trigger removes the versions with their dictation;transcribed_atdates the current text, and a row from before it reads as the dictation's own time),entries.rs(save, update, list, search, delete, andclear_history, which deletes every row that is not starred (saved = 0) in one write transaction and then only the recordings those rows name, so starred dictations and their recordings stay; the search index follows through the delete trigger; meetings are not touched; Settings → History → "Clear all history…" asks first, and on theclearedevent the page drops its unstarred rows and reads the first page again; "Transcribe again" takes an optional language for that run only,transcribe_samples_in/process_transcription_output_inapply it to a copy of the settings so the Language setting is never read back or written, and the caret menu beside it lists Auto plusget_retranscribe_languages: the 25 languages of the local model when that engine is chosen, every language otherwise; each entry shows its engine discreetly next to the date, "On this Mac"/"On this PC" or "ChatGPT"), tests intests/
audio_toolkit/- Low-level audio processing:audio/- Device enumeration, recording, resampling.recorder.rskeeps the stream open and tells when it must be rebuilt (needs_reopen: a cpal error, no callback for 3 s, another default device, or a finished clip of exact zeros, which a warm stream a call app took the device from goes on delivering; asked at most every 30 s, since a muted input gives zeros too). A recording can start with aFrameTap(AudioRecorder::start): it hears exactly the frames appended to the capture, in order and with nothing else, the 15-minute cap included, becauseClip::pushis the one place that appends and calls it; it is dropped when the capture is handed back, at a stop or a cancel, which tells its owner that the audio ended, and it runs on the recorder's thread, so it must not wait. The log never names an audio device, since a name often holds its owner's: it says the default or the chosen onerelease_tail.rs- How long a dictation records after the key is released: a pure state machine on 20 ms frame levels. 200 ms, or 80 ms when the last 100 ms of the recording were already quiet (nothing in flight; speech that starts in the tail is still followed); on, up to 600 ms, while 100 ms of unbroken speech is heard, ending after 160 ms of quiet; energy during the stop sound plus 60 ms is ignored (audio_feedback::stop_sound_length); a recording under 250 ms or without signal gets none, a cancel (Escape) never reaches it, andextra_recording_buffer_ms(Debug) is a minimum. The capture runs it inside the recorder's stop (ReleaseTailRequest)
commands/- Tauri command handlers for frontend communicationcli.rs- CLI argument definitions (clap derive)shortcut/- Global keyboard shortcut handlinginput.rs- Synthetic keystrokes posted to one process. On macOS a modifier press or release is a flags-changed event and never a key-down or key-up, and the events of a chord (Cmd+V, and Return with Command or Control for auto-submit) go out 15 ms apart (chord_plan, pure and tested; the tail is posted from a task, so the main thread never waits). Remote-desktop and VM clients follow the modifier state from their own events and typed a barevwhen Command arrived as a key-down in the same instant as the key. Command stays down forPASTE_CHORD_HOLDand its release is scheduled byclipboard.rs. Windows usesinput/win32.rs(SendInput), unchangedsettings.rs- Application settings management: theAppSettingsstruct, itsdefault_*fns and the Windows one-time migrations; childrensettings/{types,defaults,load,recovery,file,transaction}.rs(types, default values, load and repair, damaged-file recovery, file and write queue, update lock)overlay.rs- Native macOS recording overlay window (state, notices' types and constants stay here;overlay/placement.rspositions the window,recording.rscreates it and emits levels,notices.rsholds the copy, mic-lost, cancelled and error pills,call_prompt.rsthe call prompt). The overlay and the call prompt are left out of screen shares and screenshots (content_protected). A dictation shows a 34-point orb, on both platforms: its ring wobbles with the voice while recording and runs an arc while it transcribes (no arc under reduced motion). Withdictation_live_texton (off by default; "Show text while dictating" in Advanced under the overlay rows, there only while the overlay is on, and disabled with the local engine, whose text comes only after the stop), a dictation that streams to ChatGPT shows its words after the orb, on one line, as the server hears them (overlay/live_text.rs,src/overlay/LiveText.tsx):TranscriptionManager::open_cloud_streamgives the stream a listener (seecodex_stream/) when the setting is on, the overlay is on and ChatGPT is the engine the user chose (live_text::shown; with the local engine the switch reads off, so a dictation that falls back to ChatGPT shows no words either), and the listener sends each text so far to the page as the eventdictation-live-text. The text that is pasted is not this one: it still comes from the stream's final text or the upload. The pill is as wide as its content up to 440 points, then keeps its newest words and clips the oldest on the orb's side with a short fade, in either writing direction (dir="auto"); its width is never animated, the line isaria-hidden(a live region would read the user's words back over the dictation) and at most its last 400 characters are rendered. Under the same three conditions the dictation window is 472 points wide instead of 66 for both the recording and the transcribing states (live_text::dictation_window_size, one function of the settings, whose result the Windows placement gets too), so nothing resizes while the user speaks; the orb stays in the middle of the window, which ignores the mouse, and the page never draws a pill wider than its window. A text reaches only the dictation it was heard for.DICTATION_EPOCHmoves on at each dictation state, soRECORDING_EPOCHkeeps the epoch of the recording whose dictation is on screen, which the transcribing state leaves as it is; the listener remembers it when the stream opens, andlive_text::reachesdrops a text once another recording took the overlay or no dictation shows. The check and the emit run on the main thread, where the overlay's states are emitted, so a text never lands in the page after the state of a newer dictation or after the hide. The page keeps the text with the dictation's own states: a recording starts with none, the transcribing state that follows it keeps its words, dimmed, and any other state ends them. The words are never logged. Every notice (copy, mic lost, cancelled with Restore, error) opens from that circle and starts with a small orb glyph. One notice at a time: a copy pill that also lost the microphone shows first and the microphone warning follows once it goes (Notice::Copy { mic_lost_next },notice_after). When a meeting finishes processing (ProcessEvents::finished,meetings/announce.rs), the same orb shows a notice for 15 s (overlay/meeting_notice.rs): the title with "Transcript ready" and Open and Copy, a failure, or several meetings batched into one line. It waits behind a dictation or another notice, is dropped when that meeting is already open in Settings, and never takes the focus. Open shows the Settings window on the meeting (MainAction::OpenMeetings, kept while the window is closed), Copy puts its Markdown on the clipboard (clipboard::copy_to_keep), and Escape is never taken. The call prompt is:show_call_promptbuilds its window on the call watcher's thread, as WebView2 deadlocks a window built on the main one, andhide_call_promptdestroys itsignal_handle.rs-send_transcription_input()reusable functionrecently_cancelled.rs- Restore after a cancel. A user's cancel (shortcut, tray, overlay,--cancel) of a dictation with at least 1 s of audio, while recording or before its paste is claimed, keeps the audio, and the transcript if the engine had answered, in memory only for 60 s, never on disk. One slot: it is zeroed when the minute ends, when a new recording starts, when another cancel replaces it, and on quit (the slot closes when a quit begins, inbegin_shutdownor atRunEvent::Exit, and refuses every keep after, so a pipeline the quit cancels cannot refill it). A short-tap discard, a quit and a cancel after the paste keep nothing. A keep takes the overlay epoch of the dictation it cancels (DictationEpoch, counted byshow_overlay_state): one that lands after a newer dictation took the overlay leaves that overlay alone (show_cancelled_notice), while the cancelled dictation's own pill shows even before the coordinator hides its overlay. The overlay shows "Dictation cancelled" with Restore for 5 s (on macOS Escape dismisses it; on Windows the pill only times out, as the copy pill does, and Escape is never taken), the tray "Restore cancelled dictation (m:ss)" for the whole minute while idle. The coordinator admits Restore only while idle (Command::RestoreCancelled); it runs the normal pipeline (actions::restore: engine unless the transcript was kept, dictionary, cleanup with the window focused now, history) and pastes into the app focused at Restore time. No settingcleanup/- AI cleanup prompt and the Codex responses clientengine/- Which engine transcribes a dictation: a pureroute/reroutetable (Local or Cloud, one fallback at most, History records why) andlocal/, Parakeet on this Mac.local/session.rsloads the model when a recording starts, runs one request at a time and releases it after 10 idle minutes (never while recording) or before the models are deleted, as Windows may refuse to delete the file the CPU model maps; long dictations are cut at pauses (audio_toolkit/pauses.rs) into pieces of one pass. While a local dictation records,local/stream.rscuts it the same way as the audio arrives (the recorder's tap,next_cut, noise floor of the audio so far) and transcribes each closed piece, so the release transcribes only the tail (one piece at most); a dictation shorter than one piece is never cut. The pieces are used only when the stop's language, terms and level are the ones they were heard with (a clip the quiet-speech gain raises is transcribed whole, as before), and a cancel throws them away.local/seams.rsjoins the pieces' texts: a period before a piece that goes on in lowercase is dropped, and a capital the cut gave a word that appears in lowercase elsewhere is lowered. The dictation language, when it is not "auto", goes with every piece (the helper'slanguage, FluidAudio's per-request language, which keeps French text from drifting into English); meetings send none. Inside one window the model sometimes emits no word over a whole stretch of speech, next to a sentence from another speaker: the helper's reply carries the word times (words, which the request asks for: every dictation piece does, as does a live meeting piece), and a stretch of at least 3 s with no word and at least 1 s of speech is transcribed again on its own, its text put where the stretch was (local/holes.rs, pure; the speech frames arespeech_framesinpauses.rs). A piece with no word at all (the same audio gives the same text), a text the custom words rewrote, and Intel Macs, which give no word times, are not retried; a stretch that fails the second time keeps the first text. Apple silicon runs it in the meetings helper's long-livedservemode (local/fluid.rs, one WAV per request inapp_cache/local-stt), Intel Macs on the CPU with transcribe.cpp (local/cpu.rs, the only[target.'cfg(…)']sectioncheck:platformsallows on macOS). On Apple silicon the helper boosts the custom words with FluidAudio's CTC keyword spotting (local/boost.rs; the CTC model is an optionallocal_modelssource, fetched after the others are ready); Intel and Codex take no vocabulary. Debug builds fail the local run withMURMUR_FORCE_LOCAL_FAILURE. Inservethe read loop runs at QoS user-interactive and each request in a task of priorityuserInitiated, orutilitywhen the request says"background": true(dictation never does). Each load sends a 1 s silent prewarm request right after the helper reports ready, discards its text, and a failed prewarm fails the load. Every load logsLocal model ready in {ms} ms(spawn to ready) andLocal model prewarm {ms} ms, numbers only, to decide the 10-minute idle release from real loads..murmur-os-build, next to.murmur-ready, holds the macOS build (kern.osversion, read withsysctlbyname) Core ML last compiled the models for, written after every successfulprepare. At launch, ready models whose recorded build differs or is missing get one backgroundprepare, stateoptimizing("Optimizing the speech model for this macOS version…" in Transcription settings). Meanwhile a dictation goes to Codex when the user is signed in (History reasonlocal_preparing), else waits for the compile. A Codex run that fails meanwhile (offline) is tried once on the local engine, which waits for the compile, with no reason recorded, since local is what the user chose. Intel Macs record no build and never optimizecodex_stream/- Live dictation through ChatGPT's dictation WebSocket (wss://chatgpt.com/backend-api/dictation/stream, undocumented; settingcloud_stream_enabled, on by default, switch on the Debug page). While the user speaks, the recorder'sFrameTaphands each frame to the session, and when the recording stops the text comes from that stream about 0.6 s later whatever the length, instead of from an upload of the whole clip. The upload (codex_transcribe.rs) stays the answer to everything else: a dictation is never worse than without the stream, except for a bounded wait.TranscribeAction::startmakes the tap and itsLiveDictation(pair, no I/O) and parks the stream (park, one slot; a stream still there is closed). The thread that warms the connection opens it (TranscriptionManager::open_cloud_stream,open_parked) when the setting is on,engine::routesays Cloud, the user is signed in andhealth.rsallows, in the general dictation language (none for "auto"); otherwise the audio that waited is dropped and the tap costs nothing.session.rsis the task that owns the socket (State:Connecting,Streaming,Closing,Done): it sendssession.start(transcript_delivery_modefinal_only, orsegmentfor a dictation with a listener), keeps the audio untilsession.started, sends it in messages of 1,920 samples (120 ms) as base64 of little-endian PCM16, and once the tap is dropped sends what is left, 250 ms of silence andsession.close, then reads until the session is closed.feed.rsis the channel between the recorder and the session; it never waits, and gives up once a minute of audio waits (about 4 MB).protocol.rsholds the messages (an event of an unknown type is ignored, a frame that is no event fails the session).transcript.rsbuilds the text as the official client does: utterances in order of first appearance, each with a partial and a final text and their revisions. A dictation can be opened with aListener(Wanted, down to the session'sParams; the overlay gives one whendictation_live_textis on, seeoverlay.rs): insegmentmode the server sends the text of an utterance each time it hears more of it, and the session calls the listener withso_fareach time atranscript.segmentortranscript.finalchanges that text, not when it leaves it as it was. The call is made on the session's task, so a listener must not wait, and none is made once the stream is aborted (the flag is read before each call) or the session ended. The final text and the rules below are the same with a listener. The handshake carries the subprotocolchatgpt-dictation, the bearer token,ChatGPT-Account-Idand the user agent, and names no client: withcodex-desktopbeside it the server answered 403, so the Codex identity of the upload could not be verified there, and the stream counts against ChatGPT's own dictation quota. It has its ownreqwestclient (reqwest-websocket, HTTP/1.1 only, which an upgrade needs), so the TLS trust and the proxy settings are those of the upload. At the stop the pipeline takes the stream (take, once the recorder dropped the tap) and the Cloud arm ofrunasks it once (stream_or_upload,managers/transcription.rs).decision::decidesettles it from plain facts, the first rule that applies wins, and each skip logsCloud stream not used: <reason>: not opened; the operation is cancelled; quiet speech was raised for the engine (the stream heard the original level); the language at the stop is not the one the stream started in (a language by kind of app); nosession.started400 ms after the stop; more than 3 s of audio unsent when the recording stopped, what was left not sent within 1 s, or a minute waiting while it recorded; no closed session 2.5 s aftersession.close; a failure (transcript.failed, a fatalsession.erroror one before the start, an unreadable frame, the socket closed early, an utterance left with a partial and no final, a refused handshake, no connection, no session); an empty text, which the upload decides as for any silent clip. Otherwise the text isfinish_sentence(text): the stream leaves out the closing mark of a long dictation, so a text that ends on a letter or digit of the Latin, Greek or Cyrillic scripts gets a full stop.health.rskeeps the next dictations off the stream after a setback, in memory only: an hour after a refused handshake (a status other than 101 or 401), 5 minutes after any other failure, the three waits included; a stream that gave its text clears it. A cancel closes the socket at once, withoutsession.close:abort_parked(utils.rs, before the recorder stops), the operation's cancellation while the pipeline waits, and the drop of aLiveDictationanywhere. What was sent until then stays sent. The log holds numbers and enum names only, never text. The tests run the session against a local server (fake_server.rs).cargo test --lib live_stream_handshake -- --ignored --nocaptureopens and closes a real session with the stored session and no audio.MURMUR_LIVE_WAV=<16 kHz mono PCM16 WAV> cargo test --lib live_stream_transcribes -- --ignored --nocapture(MURMUR_LIVE_LANGUAGE=frto name the language) streams a clip at the pace of a microphone and prints the time tosession.started, the time fromsession.closeto the text and the word count, never the text; it draws on the ChatGPT dictation allowancelocal_models/- The on-device speech models shared by dictation and meetings: a manifest pinned to Hugging Face commits with every file's SHA-256 (pinned.rs, written byscripts/generate-model-manifest.ts), a resumable downloader, and theMissing → Downloading → Preparing → Readystate behind the*_local_model*commands. Apple silicon keeps them inapp_data/meetings/modelsas FluidAudio expects and loads them once with the helper'sprepare; folders an earlier version downloaded are checked file by file. The speech model is Parakeet Ultra (parakeet-ultra). A folder left ready with Parakeet TDT 0.6B v3 (manifest::PREVIOUS, recognised by its.murmur-ready) stays ready and in use while Ultra downloads beside it, with no state change and no UI; once Ultra is checked and prepared, the ready marker names it and the v3 folder is deleted (again at each launch, after a crash in between, or when Windows refused to delete a v3 file a loaded model still mapped). A failed fetch keeps v3 and tries again at the next launch. The helper's--asr ultra|v3and the GGUF path of Intel Macs and Windows followlocal_models::asr_in_use. Ultra writes<unk>where its training text had characters its tokenizer cannot spell (quotes, brackets, dashes):engine/local/unknown.rsremoves them from the text and the timed words alike at the helper protocol's parser, since FluidAudio keeps them; transcribe.cpp drops them itself on Intel Macs and Windows (keep_special_tagsoff). A delete during the background fetch of Ultra cancels it and deletes everything. On Windows the manifest set (pinned::WINDOWS) is that of Intel Macs plus the speaker model, pyannote Community-1 as ONNX files (CC-BY-4.0, with WeSpeaker and BUT Speech@FIT; 33 MB in three optional sources that share thepyannotefolder: the segmentation network fromaltunenes/speaker-diarization-community-1-onnx, the embedding encoder split before its statistics pooling with the weight and bias of its last layer fromwelcomyou/pyannote-community-1-onnx-split, and the two PLDA JSON files the Mac pins fromFluidInference/speaker-diarization-coreml): the same required sources and ready marker as before, so dictation never waits for it and models ready before it came stay ready. The first Windows speaker model, Sortformer (at most 4 voices, trained on English), is gone from the manifest because it is not Mac quality; nobody had fetched it, since Meetings were hidden on Windows, and asortformerfolder an earlier build left is deleted once the optional files are in place (manifest::RETIRED_FOLDERS,LocalModels::remove_retired).Host::optional_wantedkeeps it from being fetched, at launch or after a download, until Meetings are on (meetings_enabled); on Windows a meeting start (download_unless_declined,Host::optional_at_meeting_start) fetches it for ready models too, and the analysis waits for that fetch (wait_optional). A Mac fetches its optional files at launch and after a download only. A missing or damaged file means one speaker per track, never an errormeetings/import_audio/- "Import audio…" on the Meetings page (macOS and Windows):decode.rsstreams a WAV, MP3, M4A (AAC or ALAC), AIFF, CAF or FLAC file through symphonia and rubato into a 16 kHz mono WAV (a packet at a time, never the whole file; the container is found from the content, the extension is a hint; AAC in CAF gets itsAudioSpecificConfigunwrapped from theesdsdescriptor).mod.rsdecodes into a staging folderimport-<pid>-<n>with animport.pendingmarker beside the meeting folders, then gives the complete track a meeting (stored as the system track so speakers are told apart; title = file name until the summary writes one; dated at import time, not by the file) and queues it like a recording.sweepruns at launch (Library::open) and deletes marked staging folders only, never through a link; anything that lists the meetings folder must treatimport-*as not a meeting.meetings/open_panel.rsis the file dialog (NSOpenPanel / IFileOpenDialog). One import at a time (MeetingImportChangedevent,get_meeting_import,cancel_meeting_import).meetings/- (mod.rskeeps the types,initand the shortcut action; itsLibraryandMeetingsManagermethods are inmanager.rs, the processing queue inqueue.rs, the processing run and its events inprocessing.rs, the audio sweep inaudio_retention.rs; the soak test's harness is insoak/:harness.rs,children.rs,fake_codex.rs,mac.rs; the tests ofmod.rsare intests.rs) Meeting recording, on by default (meetings_enabled, switch in Advanced): microphone and system audio (Core Audio process tap inswift/meeting_audio.swift) streamed to two WAVs (synced to disk every 10 s; audio a full writer queue drops is counted indropped_ms), the 3-hour cap (cap.rs, warned 5 minutes before; theprevious_idandpartcolumns of an unreleased build stay unused), a low-disk warning at start and a clean stop when a write fails (coordinator.rs), a power assertion that keeps an idle Mac awake while recording (power.rs; a lid closed still sleeps it, which is noticed on waking, told in a notification and counted inslept_ms), a notification once the writers dropped more than 2 s, and library (store/:migrations.rs,types.rs,library.rs,processing.rs,transcript.rs,summary.rs,audio.rs,search.rs, tests intests/). What a reset or an orphan sweep set aside next to it (meetings.orphaned-*,meetings.corrupt-*,meetings.db.corrupt-*) is deleted after 30 days, read from the name, andmeeting_audio_retention(off by default) deletes the audio of processed meetings after 7, 30 or 90 days, at launch and once a day (retention.rs). A person's Delete of a meeting moves it to the macOS Trash, or the Windows Recycle Bin, instead of erasing it (trash.rs;NSFileManager'strashItemAtURLon the Mac,SHFileOperationWwithFOF_ALLOWUNDOandFOF_WANTNUKEWARNINGintrash_windows.rs, behind theTrashtrait so tests use a folder and never the real Trash). On Windows the shell would erase for good, without a word, what it cannot recycle (a drive with no bin, "Don't move files to the Recycle Bin", a folder bigger than the bin):FOF_WANTNUKEWARNINGmakes it ask, a no is an error that puts the folder back, and Murmur never falls back to erasing itself.trash_windows::recycle_listrefuses a path the shell reads as something else (a wildcard, a relative or\\?\path, 260 characters or more) andoutcomemaps the shell's answer, both tested on any host. In order: the notes (export::notes_markdown, the summary then the transcript, the sections Copy and Export write) go into the meeting's folder as<export file name>.md; the folder is renamed to that readable name inside the meetings root ((2)on a clash); it is trashed; only then are the rows deleted (the search triggers and live state follow). A failing step puts the folder back, removes the notes it wrote and keeps the rows, so the meeting stays listed and the error is "Couldn't delete the meeting." A meeting whose audio retention already removed still trashes its notes.safe_meeting_dir's symlink guard applies, and a meeting being recorded is refused. "Delete audio" moves the audio files the meeting still has to the Trash in a folder named<name> audio(the analysis file is erased), the rows are updated only when that succeeded, and a retry after a failure finds nothing left to move. Restoring from the Trash into Murmur is not supported: the files open on their own. Automatic deletions stay permanent, since they exist to free space: audio retention, the 30-day cleanup of set-aside folders, and Discard while recording. A system track of pure digital zeros while the mic has speech and another app played sound (polled from Core Audio's per-process output state,system_played) flags the meeting (system_audio_silent), since that is what a denied System Audio Recording permission produces. A denied microphone is read from macOS at start (microphone_denied, alertMicrophoneDenied), never guessed from zeros, which a muted input gives too; each processing run logs its stage timings (Meeting N timings:). After a meeting stops,processor/(mod.rsruns the stages,saver.rssaves each piece,transcript.rsbuilds the transcript) splits each track at pauses (chunking.rs), sends the pieces to Codex (transcribe.rs, at most 3 at a time, resumable; after about 5 minutes without a connection the pieces left go to the local model when it is ready, else the queue waits and checks the connection,offline.rs; a meeting a crash cut off is processed at the next launch), and interleaves both tracks into the transcript (spread.rs,merge.rs). Withmeeting_on_deviceon (off by default; "On-device meeting transcript" in Advanced) and the local model usable for the meeting (ready, and the dictation language one of Parakeet's), the local model transcribes every piece and no audio goes to Codex (Runner::on_device,Outcome::DoneOnDevice): only the transcript does, for the summary. A piece that fails there is failed, never sent to Codex, and these pieces are not a fallback (local_fallback_msstays 0). Otherwise Codex transcribes as usual. Once the transcript is complete, Codex writes the title and summary (summary.rs, people as[[key]]markers so a rename needs no rewrite; the user's custom words, deduplicated and cut at 30, go in each request's instructions as "Names and terms that may appear: …", read from Settings when the job starts,summary::Hints). The same reply ends with the speakers the conversation named, as lines[[key]] = Name(NAMES; asked of every request that reads the transcript, never of the merge of a long meeting): a name is taken out of the notes and given to a speaker still shown under its default name, never to one the user renamed nor to the user's own track (summary::accepted).MeetingsStore::save_summarywrites the summary and the names in one transaction, and checks each name against the speakers as they are then, since the user can rename one while the summary is written. The reply names the user as well, so that a name given to two speakers, in any of its lines, goes to neither: the user's name, said to them, is the one the model tends to hand to the speaker who said it. No call app tells a local app who takes part, so the transcript is the only source;cargo test --lib live_names_write_samples -- --ignored --nocaptureruns invented meetings through the model with the stored session. Then the tracks are compressed into oneaudio.m4a(archive.rs,swift/meeting_archive.swift, on Intel too; on Windows via Media Foundation, loaded at run time, andsymphoniainarchive/, about 43 MB an hour; after 3 failures the WAVs stay and are no longer requeued). Meanwhilemurmur-meetings-helper(swift/MurmurMeetingsHelper, FluidAudio, a separate process;helper.rs,protocol.rs, the sharedlocal_models, fetched with a meeting unless declined,models.rs) times the words heard on device and tells speakers apart, on system audio when the remote side was heard speaking there, else on the microphone (analysis.rs);align/places the Codex words at those times,speakers.rsgives each word its speaker andbleed/drops remote voices the microphone echoed. Without the models, or on Intel, each track keeps one speaker. Without the modelsbleed/still runs, on the sentences as placed by the levels, with a stricter match. Where the meeting played sound is read from the default output each second (capture/route.rs,output_route): a meeting on headphones throughout keeps every microphone word. When a call app (Zoom, Teams, Slack, FaceTime, Webex, Discord, or a browser on a meeting page, read through Accessibility) holds the microphone for 3 s, a panel of its own beside the overlay asks whether to record it, until it is answered, a meeting starts, or the call has left the microphone for 15 s (calls.rs, pure;call_watch.rspolls Core Audio's per-process input each second, macOS 14 on Apple silicon; settingmeeting_call_prompt). While a meeting records, the same panel shows "Call ended." once every call app that held the microphone 3 s during the meeting has been off it for 3 s (ENDED_PROMPT_AFTER), with Stop and transcribe (the normal stop) and Keep recording (asks again only after a call is back on the microphone for 3 s and leaves again). It hides when a call comes back or the meeting stops, and otherwise stays: unanswered, the meeting goes on to the 3-hour cap. A meeting started by hand with no call on the microphone gets no such prompt. An answer acts only while the prompt it answers shows (CallAnswer,PromptKind). It never stops a meeting by itself, and a dictation never hides it. Every call asks: there is no per-app rule, and Murmur never starts a meeting without a click. On Windows the same state machine runs on the microphone consent store instead of Core Audio (call_probe_windows.rs; the Windows tablesWINDOWS_EXECUTABLESandWINDOWS_PACKAGESincalls.rs): an app is on the microphone while itsLastUsedTimeStartis set and itsLastUsedTimeStopis 0, a desktop app only while its executable runs (Windows leaves Stop at 0 when an app dies), Murmur's own entry is skipped, and a browser joins a call on a Meet window title or, read through UI Automation at most every 5 s, an address bar that shows a meeting (PageReader). FaceTime has no Windows version.call_watch.rsreads the system through theProbetrait, so its loop is tested with a fake one, and the watcher waits formeetings_enabled. Seedocs/windows-meetings.md. The "Me" track follows the input device the call app records from (capture/call_input.rs, pure and tested on every host;capture/mic.rsreopens the stream on it): on a Mac with macOS 14 on Apple siliconmurmur_mic_user_inputs(swift/meeting_audio.swift) lists, per process on the microphone, the input devices of Core Audio'skAudioProcessPropertyDevices(input scope) by the name cpal gives them, and on Windowscapture/call_input_windows.rsreads the active sessions of every active capture endpoint (IAudioSessionManager2,IAudioSessionControl2::GetProcessId) and maps a helper process to the call app up its parent chain (app_of). Murmur reads this once a second while a meeting records and only for known call apps and browsers (calls::mic_app; call apps before browsers). Rule: a microphone chosen in Settings (or the clamshell one) is respected unless it delivers digital silence (peak under -70 dBFS) for 10 s while a call app records from another device; "Default" follows the call app, after the same device is seen for 2 s (Router,SETTLE). A call app that leaves the microphone leaves the track where it is, a device that cannot be found or told apart by its name, fails to open or stalls falls back to the Settings choice (and is not tried again for 60 s,AVOID), the first look at the call apps is given 1 s so a hung audio driver cannot delay the start, and nothing is changed in the system: the default input is never switched, so a Bluetooth headset keeps its profile. Device names are never logged. Intel Macs, macOS 13, other systems and any failed read keep the old behaviour. Meetings are on by default on Windows too:default_meetings_enabledis true everywhere, and a store the betas wrote with Meetings forced off is switched on once (meetings_turned_on_once,turn_on_meetings_once, which also moves the stored beta shortcut to the Windows defaultalt+shift+m, since Ctrl+Alt+Win+M reads as AltGr on layouts with that key). The Windows copy reads "PC" (thewindowssubtree of each locale, the*Windowstray keys ofuser_alert.rs), the permission row opens the Windows microphone settings (Windows has no system audio permission), and the tray item, sidebar page, shortcut and Advanced switch are the Mac's. While a meeting records,live/makes a live transcript (settingmeeting_live_transcript, on by default; Apple silicon, or Windows on x86_64 with the model ready,PLATFORM_RUNS_LIVE, so an Intel Mac has none): each track writer hands the audio it writes to aLiveTap, which cuts it at the first pause after 6 s, or at 12 s with the next piece starting 2 s earlier (live/chunker.rs, the pauses ofaudio_toolkit/pauses.rs; pieces under -60 dBFS are not sent).live/worker.rssends the pieces one at a time to the dictation's ownLocalEngine(the same helper and model copy, never a second one, never Codex) asbackgroundrequests asking for word times (the helper'swordsinprotocol.rs, so it runs them at utility priority;TimestampKind::Wordon the CPU model,CpuModel::transcribe_words, whose run goes below the normal thread priority on Windows);Session::transcribe_backgroundanswersBusywithout queuing while a dictation records, transcribes or holds the model, and the worker tries again 250 ms later, so a dictation waits at most for the one piece running.live/seam.rsjoins pieces on a word both heard within 300 ms nearest the overlap's middle (else cuts at the middle and drops a repeated 2-12 word phrase) and publishes a sentence only once no later piece can change it;live/echo.rsholds microphone sentences until system audio is heard 1.5 s past them and hides those sharing 60 % of their words with system sentences around them (not on headphones). Over 30 s of speech waiting shows "Catching up"; over 120 s skips the oldest pieces with a gap entry; three failed pieces in a row stop the live text for the meeting. Sentences are appended tolive.ndjsonin the meeting's folder and sent asMeetingLiveUpdated;get_live_transcriptreturns them, or after a crash the file's, asstopped. The live text is a draft, never saved as the meeting's transcript: the processor deleteslive.ndjsononce it saves final turns, and a worker that outlives Stop appends nothing after that (draft::removeseals the folder until the next meeting starts there). Without the local model (or on Intel) the live view says why and the transcript is made after Stop as before. The "Paste new meeting text" shortcut (meeting_paste_new, shipped unbound; a binding whose default is empty can be cleared again; like the meeting toggle it holds its keys only while meetings are on and yields them to an action that uses them, both listed inshortcut::MEETING_BINDINGS) pastes the sentences published since its last use, or of the last minute, asYou:/Others:lines.scripts/echo-probemeasures macOS voice processing on speakers (it plays sound; not shipped). On Windows the analysis runs in the app, with no helper process (analysis_cpp.rs,CppAnalyzer;AnalysisSupport::Availableon x86_64): Parakeet Ultra through transcribe.cpp on the CPU times the words of each track in the pieces dictation uses (MAX_PIECE, cut at pauses), and pyannote Community-1 tells the voices apart on the trackdiarized_trackpicks, as many as there are and in any language, with the Mac's weights and thresholds (diarize/). The pipeline is the offline diarization of FluidAudio 0.17.7 re-implemented in plain Rust with its.communityparameters (diarize/config.rs, each with its Swift line): windows of 10 s every 2 s, powerset segmentation, fbank, masked statistics pooling, PLDA, AHC at 0.6, VBx, constrained assignment, reconstruction into exclusive segments. ONNX Runtime runs only the segmentation network and the ResNet encoder (diarize/pyannote.rs): theortcrate with the CPU provider only, whose prebuilt binaries the build downloads, checks against the hash the crate pins and links statically (download-binaries, so noonnxruntime.dllships beside the app or can be picked up by name from the system), pinned=2.0.0-rc.15undercfg(all(windows, x86_64))liketranscribe-cpp. The prebuilt binaries need AVX2; a processor without it never starts ONNX Runtime and keeps one speaker per track. Every other stage is plain Rust on slices, tested on every host. The files are checked by SHA-256 when the analysis opens them: a file that is missing or differs means no speaker model. What decides the result is platform-neutral and tested without models (analysis_local.rs: pieces, word times on the track, turnsS1,S2… with no maximum, in a stable order, how a failure ends the run;Diarizer::tell_apart_reportinghands the share of windows done to the progress); the models,catch_unwind, the cancel token and a time limit scaled to the audio (time_limit) wrap it. Half of the cores are used, so a dictation made meanwhile still runs. Without the speaker model the words are kept and the analysis says the models are missing: one speaker per track, run again once it is there; a speaker model that cannot run ends the speaker stage as a failure with the same result. Memory, speed, limits and the real-speech check are indocs/windows-meetings.md(see also "Live transcript on Windows" there). Windows records system audio with WASAPI loopback (capture/wasapi.rs, the platform-neutral part incapture/loopback_logic.rs), which asks for no permission, andpower_windows.rsholds the awake assertionwindow_names.rs,accessibility.rs,field_excerpt.rs- Name hints and the text around the cursor, read from the frontmost window for cleanup. On Windows,uia.rs(UI Automation, background threads only) stands in foraccessibility.rsleading_space.rs- The rule for one space when a dictation is pasted right after a word (settingleading_space, on by default):needs_leading_spaceover the last two grapheme bases before the caret, pure and platform-neutral.clipboard::pastereads them for CtrlV and Direct pastes only, on a blocking thread with a 150 ms budget, and not at all when the setting is off. Any failure, timeout, secure field, non-empty selection, missing caret or truncated context adds no space. macOS reads the keyboard target throughaccessibility.rs(field_excerpt::char_before); Windows reads the foreground app's focused element throughuia.rs(char_before_caret, TextPattern,field_excerpt::char_before_selection) and never in an app that exposes no caretupdates/- Automatic update checks whileupdate_checks_enabledis on: at launch and every 4 hours of wall-clock time (schedule.rs: the time the Mac sleeps counts, so a check that came due during a sleep runs within a minute of the wake, and a shorter sleep adds none; a failed check is retried after 5 minutes, then at waits that double up to 4 hours), one check at a time (checks.rs). The result is the one update status the tray item and the settings footer show (update-statusevent). Nothing downloads until the user clicks the footer's "Update available". On Windows the checks are on by default as well (update_checks_turned_on_onceturns them on once for a store the earlier betas wrote with them off), the footer pill, the Advanced "Updates" switch and the tray item exist, and the feed is the Windows-only one described under "Windows updates". Before the installer starts, the page callsprepare_update_install: on Windows the updater plugin ends the process right after launching the installer, which skips the exit sequence that saves settings, so the command leaves the update-relaunch marker and flushes the pending settings writeutils.rs- Tray, window, and application helperssearch.rs- Search across meetings and dictations (search_meetings,search_history, 50 results).fts_queryturns the user's words into an FTS5 query: each word a prefix, quoted phrases kept, every piece quoted so no input is FTS5 syntax, nothing under 2 characters. A meeting matches when every word is somewhere in it (title, summary or any turn,fts_termschecked one at a time), a dictation when its text holds every word. The FTS5 tables (meetings_ftson title and summary andmeeting_turns_ftsinmeetings.db,history_ftsontranscription_textinhistory.db, accents folded, prefix indexes for 2 and 3 letters) are external-content tables kept current by triggers only, never by call sites, so cascades, reprocessing and retention deletes update them; their migrations stay append-only like the others.meetings::store::searchandHistoryManager::search_with_conntake any&Connection, so a read-only one works. Meetings rank by where they matched (title, summary, transcript), then relevance, then date; a query matching more than 2,000 turns skips the per-turn ranking and reads the newest turns (search_bench, ignored, measures it). Hits come back as plain text with highlight ranges in UTF-16 units, never HTML; summary snippets show speaker names for[[key]]markers. Speaker names andraw_textare not searched.meeting_turns_ftspoints at the implicit rowid ofmeeting_turns: aVACUUMofmeetings.dbmust be followed by a'rebuild'of it. On Windowshistory_ftsships withrusqlite's bundled SQLite (FTS5 included) and its migration builds the index from existing rows whenhistory.dbopens; the meetings half is the Mac's, since Meetings are on there toomcp/-murmur mcp, the read-only Model Context Protocol server AI assistants launch (hand-written JSON-RPC 2.0 over stdio, one message per line, onserde_json; see "Read-only MCP server" below).main.rsrunsmcp::run()and exits beforemurmur::run, so the process starts no Tauri, window, tray, single-instance plugin, microphone or network.access.rsreads the two switches,rpc.rsframes and dispatches,tools.rsholds the five tools, on both platforms,setup.rswrites the command path the settings page shows,sample.rsseeds an invented data directory for the tests (tests/mcp_stdio.rsruns the built binary against it)settings_window.rs- When the settings window is destroyed, the section it reopens on, and the actions it takes when it opens (see Window Lifecycle). It also knows when the page shows the practice step of onboarding (SettingsView::Practice, reported by the last step of an install that dictates on the device,DoneOnboarding.tsx). A dictation that ends while that page has the keyboard cannot be pasted, as Murmur itself is in front:clipboard::pastehands the text to the page instead (hand_to_practice, thePracticeDictationevent), which shows it, and no copy pill is offered. In any other app the dictation is pasted as usual, even while the step shows, and it goes to History either way
App.tsx- Main component with onboarding flowcomponents/- React UI components:settings/- Settings UIonboarding/- First-run experienceupdate-checker/- App update notificationsshared/,ui/,icons/,footer/- Shared components
hooks/useSettings.ts- Settings state management hookstores/settingsStore.ts- Zustand store for settingsbindings.ts- Auto-generated Tauri type bindings (via tauri-specta)overlay/- Recording overlay window entry pointlib/types/- Shared TypeScript type definitions
Manager Pattern: Core functionality organized into audio, transcription, and history managers initialized at startup and managed via Tauri state.
Command-Event Architecture: Frontend → Backend via Tauri commands; Backend → Frontend via events.
Pipeline Processing: Audio → quiet-speech gain (audio_toolkit/gain.rs) → local or Codex transcription (engine/; from Codex the text is the live stream's when it can be used, codex_stream/, else the upload's) → dictionary (audio_toolkit/text.rs) → text passes (audio_toolkit/text_passes/) → AI cleanup through the Codex session (cleanup/, raw text on any failure) → Clipboard/Paste
Cloud uploads: the audio a dictation or a meeting piece sends to Codex goes as FLAC (codex_transcribe.rs, the flacenc crate): lossless, about 45 % of the WAV for speech, so the transcript cannot differ. The endpoint is undocumented and the Codex CLI sends it WAV, so a refused FLAC upload goes again as WAV at once, and when WAV was taken where FLAC was refused, uploads go as WAV for an hour before FLAC is tried again (FLAC_RETRY_AFTER: the refusal may have been of something else). flacenc writes a short last block as the stream's minimum block size, which strict decoders refuse; pcm_f32_to_flac_bytes sets it back to the block size, and a test decodes the result with symphonia. MURMUR_LIVE_CLIP=<16 kHz mono WAV of speech> cargo test --lib live_codex_session_takes_flac -- --ignored --nocapture sends one clip both ways with the stored session.
Text passes: deterministic fixes on every dictation, English and French only. They run only when the language is known: the dictation setting when it is en* or fr*, in auto a stopword vote on the text (at least 3 hits and twice the other language), otherwise not at all, since fillers are real words elsewhere ("um" in Portuguese, "er" in German). before_cleanup (fillers, spoken line breaks, spoken symbols and quotes) runs before cleanup; raw_only (spoken punctuation) runs only on text cleanup did not edit (off, skipped, failed), because cleanup reads those words in context ("trois virgule cinq"); after_cleanup (typography.rs) runs last, after cleanup or raw_only, and applies French punctuation spacing only (U+202F before ? ! ; and inside « » unless already NBSP, U+00A0 before :; fr-CA keeps spaces only before : and inside « »; fr-CH uses U+202F before ? ! ; :; code spans/blocks, URLs, e-mails, paths, times, ratios, numbers, HTML entities and emoticons stay untouched). A command never sits in a noun phrase: it keeps its words after a determiner ("a new line of products"), after "whole", "brand", "entire", "toute" or "véritable" ("a brand new line"), and, for the break, question, exclamation and full-stop commands only, before "of", "over", "about", "than" or the French "de", "du", "sur" ("a question mark over the launch"); the comma and "virgule" keep firing there ("yes comma of course"). The intensifier list is short on purpose, since an adjective also ends a list item ("big comma small comma") and "completely" or "tout" end the clause before a real command. Meetings do not use them. Spoken symbols (symbols.rs) are unambiguous names only: English "at sign", "hashtag", "hash sign", "underscore", "forward slash", "back slash", "backslash", "hyphen"; French "arobase", "hashtag", "signe dièse", "dièse" (not after a note name), "tiret bas", "tiret du 8", "underscore", "slash", "barre oblique", "antislash", "trait d'union". Bare "slash", "dash", "hash", "dot" and "point" in English, and "tiret", stay words. A symbol needs the word after it and sticks to the neighbours as written (my underscore name is my_name, hashtag release is #release, at sign bob with no word before it is @bob); it never fires after an article or demonstrative, before the key or character it names, before "of", "over", "about" or "than", nor, for "underscore", after "to", "we", "they", "you" or a modal, and after "it", "he", "she", "I", "will", "may" only when an article or possessive follows ("we underscore several risks"; "it underscore value" is it_value). Quotes (quotes.rs) are curly in English (“…”) and guillemets with an inner space in French (« … »): "open quote", "begin quote" and "ouvrez/ouvre/ouvrir les guillemets" open, "close quote", "end quote", "unquote" and "fermez/ferme/fermer les guillemets" close, an open needs a closer within 40 words and a close needs an open said before it (so a lone "open quote" stays words), and a bare "quote" opens only the same way (not "quote unquote" with nothing between). There is no switch; a new language comes in its own pull request with its own must-not-change corpus.
Short dictations: a dictation under 20 words (UAX #29 word count, so Chinese or Japanese count per word) skips the default AI cleanup and is pasted at once, recorded in History as CleanupOutcome::ShortDictation without a raw text, and logged as AI cleanup skipped: short dictation ({n} words). Cleanup still runs on it when cleanup_short_dictations is on or the user chose a transformation: today only a Formal or Casual dictation_style (actions.rs, cleanup_plan). A future user-chosen transformation (custom prompt, translation, per-app prompt) must keep cleanup on short dictations too.
Language by kind of app: category_languages gives a kind of app (AppCategory, the six kinds of "By app type"; Other has none) a dictation language of its own, "auto" or a code. A kind without an entry follows selected_language. The kind is read from the frontmost app when the dictation starts (window_names.rs, ContextReads::kind, also read when cleanup is off), and actions::kind_style::language_for hands the language to transcribe_samples_in and process_transcription_output_in, the path of a one-off re-transcription: the engine route, the text passes and the cleanup hint follow it, and the Language setting is never written. An app Murmur could not place before the key was released dictates in the general language. It needs neither AI cleanup nor an account.
By app type in Settings: the style (category_styles) and the language (category_languages) of the six kinds of app share one row of Settings → Transcription, "By app type" → "Style and language", whose Customize button opens a dialog with one line per kind and a column for each (ByAppType.tsx; the language column uses the searchable list of the Language row, LanguageMenu.tsx). Each choice is saved as it is made. While styles cannot apply (AI cleanup off or no account), the (i) after the dialog's title says so (Dialog's titleInfo). The row says how many kinds are customized (a live status) and nothing when none is. Twelve rows on the page took 39 % of its height; two dropdowns side by side do not fit a row (498 px at the smallest window), which is why they are in a dialog (Dialog's wide).
State Flow: Zustand → Tauri Command → Rust State → Persistence (settings_store.json through durable::write)
Core Libraries:
- Codex cloud transcription via the local ChatGPT/Codex session
reqwest-websocket- The WebSocket of ChatGPT's live dictation stream, over thereqwestclientort- ONNX Runtime (CPU), Windows x86_64 only, for the Meetings speaker modelcpal- Cross-platform audio I/Otauri-plugin-global-shortcut- Global keyboard shortcutsrubato- Audio resamplingrodio- Audio playback for feedback sounds
- Initialization: App starts minimized to tray, loads settings, initializes managers
- Recording: Global shortcut triggers audio recording; a dictation that goes to ChatGPT streams its audio there meanwhile (
codex_stream/) - Processing: Audio transcribed by the local model or by Codex (
engine/) - Output: Text pasted to active application via system clipboard
Settings live in settings_store.json in the app data folder, as {"settings": …} pretty-printed, the shape the store plugin of earlier versions wrote, so an older Murmur still reads the file (settings/file.rs). Every change is written by a background thread through durable::write, so a burst (a slider drag) costs the caller no disk sync and lands as its latest value; update_settings_checked waits for its write to report a failure, and quitting waits for a pending one. durable::write takes a temporary file in the same folder, synced, renamed over the file, then the folder synced (Windows: see below); a symlink stays a link): a crash or power cut leaves the old file or the new one. Write any file that must survive a crash through durable::write, never fs::write. A field this version cannot read falls back to its default; the file as it was is kept first as settings_store.json.unreadable-<12 hex of its SHA-256> (mode 0600, once per content).
Panics on any thread go to murmur.log as one error record (panic_log.rs): thread, file:line:col, the executable's load address and a backtrace, never the panic message, which can quote dictated text. Release builds are stripped; resolve the addresses with the build's murmur.dSYM artifact: atos -o murmur.dSYM -l <load address> <address>….
The settings cover:
- Keyboard shortcuts (configurable; the recording shortcut is hold-to-talk or double-tap hands-free, see
dictation_gesture.rs) - Audio devices (microphone/output selection)
- Codex / ChatGPT session for cloud transcription
- Audio feedback and overlay options
The app enforces single instance behavior — launching when already running brings the settings window to front rather than creating a new process. Remote control flags (--toggle-transcription, etc.) work by launching a second instance that sends args to the running instance via tauri_plugin_single_instance, then exits.
While Murmur sits in the menu bar (the notification area on Windows), the recording pill is the only live webview.
-
Closing the settings window destroys it, web process included, when the tray icon is visible,
initialize_shortcutshas succeeded, and the page reported that it left onboarding (report_settings_view). Otherwise closing hides it: with--no-trayor the tray icon off, before the shortcuts run, on any onboarding step, and while the page holds it (holdSettingsWindowinsrc/lib/) for work whose later steps run in the page, such as an update install and its relaunch; the release destroys a window closed meanwhile. A hidden start builds the window so its page can run the onboarding checks and start the shortcuts. Rust destroys it once both are done and it is still hidden. With no window left,RunEvent::ExitRequestedwithout an exit code is prevented (lib.rs), so the tray keeps the process alive; only the tray's Quit, which carries a code, exits. -
Every open goes through
show_main_window, which builds the window again if it is gone (on Windows from a thread of its own, as WebView2 deadlocks a window built inside the tray menu or single-instance handler). The new page opens on the section the user left (get_last_settings_section, kept in memory, not across launches), as long as that section is still enabled (Meetings is, on Windows as on the Mac, whilemeetings_enabledis on). On Windowsshow_main_windowplaces the new window like any other show (window_placement.rs: the monitor under the cursor, fitted to its work area), it opens at the size the destroyed one had (remember_size, in memory, not when it was maximized, full screen or minimized), and it takes the accent icon again, which the taskbar reads from the window. -
A destroyed page cannot undo what it did in Rust. Hotkeys it suspended while a field captured keys are put back when the window is destroyed (
resume_bindings_if_suspended, off the main thread). -
What happens while the window is closed is kept as a pending action in Rust (
MainAction). The event still goes out. The page takes the action when it hears the event, and once after it listens on mount (take_main_action), so it runs exactly once. The tray's "Check for updates" and the switch to the local engine work this way. Dictation errors are not kept: the pill and the notifications show them. -
The call prompt panel (macOS only: Windows shows no call prompt) is created when a prompt shows and destroyed when it hides, together with its entry in the nspanel store. Its page asks for the prompt (
get_call_prompt) once it listens. Destroy a panel only afterto_window()gave the window its class back, and withset_released_when_closed(false)after it (hide_call_prompt): destroyed as a panel, it raises an Objective-C exception that aborts Murmur; released when closed, tao frees it a second time. -
Locales load lazily: a window loads
enand the active language before its first render (i18nReadyinsrc/i18n). History, Meetings, Insights and the What's New modal load with their first open.
All user-facing strings must use i18next translations. ESLint enforces this (no hardcoded strings in JSX).
Adding new text:
- Add key to
src/i18n/locales/en/translation.json - Use in component:
const { t } = useTranslation(); t('key.path')
File structure:
src/i18n/
├── index.ts # i18n setup
├── languages.ts # Language metadata
└── locales/
├── en/translation.json # English (source)
└── fr/, es/, de/, it/, pt/
Key names. A shortcut shows its keys through formatKeyCombination. The keys named with a word rather than printed on the keyboard (space, enter, escape, tab, backspace, delete, the arrows) take their name from keyNames.* in each locale (useKeyNames): "Option + Espace" in French. Modifiers and letters keep what the keyboard prints, and Windows reads Option as Alt.
For translation contribution guidelines, see CONTRIBUTING_TRANSLATIONS.md.
Rust:
- Run
cargo fmtandcargo clippybefore committing - Handle errors explicitly (avoid unwrap in production)
- Use descriptive names, add doc comments for public APIs
- A source file has at most 1000 lines (aim for 800).
bun run check(check:file-size) fails above it.scripts/file-size-allowlist.jsonis empty: it is where a file over the limit would be listed with a cap that may only go down, and nothing is listed. Split by job intofoo/submodules (foo.rsstays the facade withpub use, tests infoo/tests.rs). A split is a pure move: no edit inside moved items, same test ids,src/bindings.tsunchanged.src/bindings.ts(generated) is not counted.
TypeScript/React:
- Strict TypeScript, avoid
anytypes - Functional components with hooks
- Tailwind CSS for styling
- Path aliases:
@/→./src/
Product rule: Clear history keeps starred dictations; destructive confirms are red. "Clear all history…" never deletes a starred (saved) dictation or its recording, and its dialog and (i) bubble say so in all six locales. The confirm button of a dialog that deletes something for good, with no way back, uses <Button variant="destructive"> (red, --color-error with --color-on-error text, defined in theme.css for both themes): clear history and discard meeting. Deletions that can be undone keep the pink accent Button (tests/meeting-view.spec.ts): moving a meeting or its audio to the Trash, deleting the local model (it downloads again). The row button that opens a destructive dialog stays the neutral accent Button. A new irreversible confirm uses the variant.
Settings rows show a title and a control, nothing else. Any explanation goes in the row's info bubble, the (i) tooltip of SettingContainer (its description, RadioOption's description, DescriptionTooltip elsewhere). SettingContainer has no inline mode and no section heading takes a subtitle: no helper text under or beside a title anywhere in Settings. A dynamic note (a reason a row is disabled, a size) is merged into the bubble's text, not rendered below.
The only text that may stay inline is a live status that is not an explanation, or an error the user must act on: the ChatGPT row's state ("Signed in", "Session expired, sign in again"), a failed model download's reason, a shortcut registration error, a download's progress bar. A state that sits under a row title goes in SettingContainer's detail, in a paragraph marked data-live-status (the ChatGPT row); tests/settings-no-inline-help.spec.ts fails on any other paragraph under a row title. The download failure and the shortcut error are error paragraphs of their own, outside the title block. Dialogs, the onboarding, history entries and the announcement card (LocalSttCard) are not settings rows.
Every text button uses the shared width; page-level actions sit at the bottom of the page. A Button of the default size (size="text") has the one shared width (min-w-control-button) in all six locales; only a label that does not fit widens it. size="chip" is for small in-line actions (back, retry, add), never for a page action. A page-level action such as Insights Share is a size="text" button, right-aligned after the page's last section inside the scroll area: no top band above the first section (tests/button-widths.spec.ts covers Insights, tests/insights-share.spec.ts the position).
Insights share = one square light card, no options. The Share button at the bottom of Insights opens one dialog with one 1080 x 1080 card (src/components/settings/insights/share/), light and pink whatever the app theme or accent, and two actions: Save PNG and Copy image. No format, theme or include toggles. The card holds numbers and the heatmap levels only (ShareStats is its whole input): never transcript text, app names or vocabulary. It shows the figures the page shows, with the page's formats. The webview draws the PNG (html-to-image); copy_insights_card and save_insights_card (insights/share.rs) copy and save it, with the platform's own save dialog. The footer prints the public site, murmur-desktop.vercel.app. A change to the card keeps the design's look (tests/insights-share.spec.ts renders it with sample and huge numbers in the six locales).
Star on GitHub = the last About row and a sidebar button. About ends with "Like Murmur?" and its "Give a star" button, and the sidebar has a star button at its bottom on every page. Both open the project page (openProjectPage, src/lib/projectPage.ts), where the user clicks Star: GitHub has no link that stars a repository. The sidebar button is not a section (not in SECTIONS_CONFIG, never current), so a test that walks the sections reads the first nav > div. Its label has about 91 px: tests/star-on-github.spec.ts fails a locale whose sidebar.star leaves under 2 px.
Murmur supports command-line parameters for integration with scripts and autostart configurations.
Implementation: cli.rs (definitions), main.rs (parsing), lib.rs (applying), signal_handle.rs (shared logic)
| Flag | Description |
|---|---|
--toggle-transcription |
Toggle recording on/off on a running instance |
--cancel |
Cancel the current operation on a running instance |
--start-hidden |
Launch without showing the main window (tray icon visible) |
--no-tray |
Launch without system tray (closing window quits the app) |
--debug |
Enable debug mode with verbose (Trace) logging |
--transcribe-file <FILE> |
Transcribe an audio file headlessly and exit |
--json |
Emit --transcribe-file results as JSON |
mcp (subcommand) |
Read-only MCP server over stdio for AI assistants |
Key design decisions:
- CLI flags are runtime-only overrides — they do NOT modify persisted settings
- Remote control flags work via
tauri_plugin_single_instance: second instance sends args, then exits send_transcription_input()insignal_handle.rsis shared between signal handlers and CLI
murmur mcp lets an AI assistant (Claude Code, Codex, Claude Desktop) list, search and read meetings. The assistant launches it as a child process; it is the same binary as the app. Settings → Advanced → "AI assistants" holds the switch and a copyable setup for each assistant, built from std::env::current_exe() (get_mcp_setup, src/lib/mcp.ts).
Security model. Keep every point when changing it:
- Opt-in.
mcp_enabledis off by default.recent_dictationsneeds its own second switch,mcp_include_dictations, also off, because dictations are more personal than meetings; it needsmcp_enabledtoo. The server readssettings_store.jsonitself on every request (access.rs) and treats anything but a JSONtrueas off, so a switch turned off applies to a running server. Off,tools/listis empty and everytools/callis a tool error saying where to turn it on. Dictations off,recent_dictationsis absent fromtools/listand refused, andsearchwithscope: "all"looks at meetings only. - Read-only. Both databases are opened with
SQLITE_OPEN_READ_ONLYandPRAGMA query_only = ON,busy_timeout2 s (tools::open_read_only). The server never migrates: a database with pending migrations (the app was updated and not opened) gets "Open Murmur once to finish updating". No tool writes, and no tool takes a path: the data directory is~/Library/Application Support/com.dailyxplorer.murmur(the identifier is pinned totauri.conf.jsonby a test), orMURMUR_MCP_DATA_DIRset by whoever launches the process, which is how the tests and measurements point it at invented data. - stdio only. No TCP or Unix socket listener, no HTTP, no network code. Nothing but the launching process can talk to it. Stdout carries protocol messages only; logs never hold transcripts.
- What each tool returns (JSON in one
textcontent item):list_meetings(id, title, start time, duration, status; paged bybefore_id),search(meetings: id, title, start time, plain-text snippets,first_match_seq; dictations: id, time, text; the same SQL as the app's search throughstore::searchandHistoryManager::search_with_conn),get_transcript(turns with speaker display names, times, text, paged byfrom_seq, at most 400),get_summary(title and Markdown with[[key]]replaced by the names),recent_dictations(id, time, delivered text). Speaker names are the current ones, resolved at read time. Never returned: audio, audio paths or file names, raw (pre-cleanup) text, window names, field excerpts, settings, account data. - Threat model. Any process running as the user can already read these files, so this grants no new OS access. The real risk is the assistant sending what it reads to its own cloud model. The opt-in, the second switch and the wording of the setting are the controls; do not weaken them, and do not add a tool that writes, executes, or reads a path.
- Protocol. The handshake-based revisions
2025-11-25,2025-06-18,2025-03-26and2024-11-05; a client asking for another one is answered with the newest. A tool that cannot answer returns a result withisError: true; only an unknown tool is a JSON-RPC error. The stateless revision (server/discover, per-request_meta) is not implemented.
On Windows the server is the same code and lists the same five tools with the same arguments, limits and wording; mcp/ has no per-platform switch. It reads meetings.db and history.db from the Windows data directory, and the meeting tools answer on a library with no meeting as they do on the Mac (an empty list, an error for an unknown id) until a meeting exists. Both switches keep their rules (mcp_enabled alone opens meetings, dictations stay behind their own switch); the server does not read meetings_enabled, on either platform. The page copy in McpAccess.tsx is the same on both platforms; only the setup command differs. The data directory is %APPDATA%\com.dailyxplorer.murmur (Roaming, what Tauri's app_data_dir gives; data_root in mod.rs reads APPDATA). The settings page shows a Windows command with double quotes and the real murmur.exe path without a \\?\ prefix (setup.rs). The release exe has the GUI subsystem, so the assistant's CreateProcess with redirected pipes hands it stdin and stdout and no console window flashes; with no pipes (run by hand in a terminal) Rust's std treats the invalid handles as an empty stdin and discards writes, so it prints nothing and exits. main.rs reaches mcp::run() before any Tauri code, so a running app's single-instance plugin is never involved. tests/mcp_stdio.rs cannot prove this (a test build has a console), so .github/scripts/windows-smoke.ps1 runs the installed release murmur.exe mcp with redirected pipes beside the running app. Do not call AllocConsole: it would flash a window.
Adding a tool: describe it in tools::list with readOnlyHint, read through open_database only, add it to the "never returned" review above, and add its round trip to tests/mcp_stdio.rs. cargo test --release --test mcp_stdio mcp_timing -- --ignored --nocapture prints the startup and search timings.
Access debug features with Cmd+Shift+D (Ctrl+Shift+D on Windows).
- Accessibility permission is required for keyboard shortcuts and text insertion
- Windows code stays behind the macOS and Windows cfg boundaries; run
bun run check:platforms. Windows is a beta. Meetings are on there as on the Mac (docs/windows-meetings.mdholds the parity table and what differs). The updater is on, with the feed described under "Windows updates".
One check, scripts/check-platforms.ts (bun run check:platforms; check:macos-only stays as an alias), holds the rules of every platform. It has one function per platform in the PLATFORMS table: checkMacos() always runs, checkWindows() runs only when src-tauri/tauri.windows.conf.json exists. Every failure names its platform ([macos] ...). Its tests are scripts/check-platforms.test.ts (bun run test:platforms, part of bun run check).
checkMacos()holds the obsolete and required paths, the forbidden text, the capability scopes, the command manifests and the Tauri config.lib.rsmust carry either the macOS-onlycompile_error!or#[cfg(not(any(target_os = "macos", target_os = "windows")))] compile_error!("Murmur supports macOS and Windows only.");. Windows text the rule bans (PasteMethod::ShiftInsert,WindowsMicrophonePermissionStatus, ...) is allowed in a file named for Windows (*_windows.rs,windows.rs,win32.rs,uia*, at any depth) and inside an item under#[cfg(target_os = "windows")], nowhere else. The check is textual: an item ends at its closing brace or its first;.- The macOS contract is
scripts/fixtures/macos-contract.json. It pins what keeps an installed Mac app updating with its permissions intact: the bundle identifier, product name, bundle targets, thebundle.macOSobject,createUpdaterArtifacts,externalBin,macOSPrivateApi, the updater public key and the one feed URL intauri.conf.json; the SHA-256 ofEntitlements.plistandInfo.plist; and the structure ofbuild.ymlandrelease.yml(signing secret names, signing step names, therelease-signingenvironment, the two macOS matrix entries,make_latest). Workflow facts are text, never hashes, so a dependabot bump of an action does not trip them. Every pin carries awhy. - Changing a pin is a deliberate edit of that JSON file in the same pull request, with the reason in the PR body. For a plist, run
sha256sumon the new file. A pull request must never change a pin to make the check pass without that reason. checkWindows()holdswindowsRequiredPaths: the Windows files and the Windows workflow the branch carries. A slice that brings more Windows files lists them in the same commit.
Windows shares the tree, the version number and the update feed URL with the Mac app (see "Windows updates"). It stays labelled beta. What it has now: dictation with local or Codex transcription, AI cleanup, history, Insights, custom words, window names through UI Automation (uia.rs), the foreground-window paste target (foreground.rs, paste_tx/windows.rs, input/win32.rs), shortcuts including modifier-only chords (shortcut/modifier_chord.rs), monitor-aware overlay and settings window placement (window_placement.rs), and a per-user NSIS installer (tauri.windows.conf.json). Meetings are on there as on the Mac (docs/windows-meetings.md). Automatic updates are on (see "Windows updates"), and the What's New window shows after one as on the Mac, with its switch in Advanced; the notes are the Mac's without their closing "Windows (beta)" section (whats-new/platformNotes.ts). The MCP server runs there as on the Mac (see "Read-only MCP server").
- Text: where the Mac text says "this Mac", a locale's
windowssubtree says "this PC";src/i18n/index.tsmerges it over the locale whenisWindows. - CI:
.github/workflows/windows.yml(workflowwindows; jobschanges,rust,clippy,cpu-model,meetings-audio,installer,smoke,windows-ok) runs on every pull request, on pushes tomain, nightly and by hand. A pull request runs only the jobschangesselects from its files (.github/scripts/changed-paths.sh; the regular expressions are in the workflow, and the Rust ones include what the crate reads outsidesrc-tauri: the locale files,src/bindings.ts,HistorySettings.tsx); the installer andsmokeonly for a change to the release build or the app's start. Main, the nightly run and a manual run always run everything.windows-okis the check that says whether it passed. It holds no release secret and builds the installer without updater artifacts. Lint, formatting and the frontend build arecode quality's, the Playwright suite isPlaywright's. - Data folders:
models,meetingsandrecordingslive in Local app data (%LOCALAPPDATA%\com.dailyxplorer.murmur); the settings and the databases stay in Roaming (%APPDATA%), wheremurmur mcpreads them.src-tauri/src/data_dirs_windows/moves the three folders once, safely (seedocs/windows-meetings.md, "Where the files are"). Code that needs one of those folders asksdata_dirs_windows, neverapp_data_dir().join(...). - Console: the release exe has the GUI subsystem.
console_windows.rsjoins the parent terminal's console for--help,--version, a wrong argument,--transcribe-fileandmcponly, and only fills a standard handle that is missing, so the pipes of an assistant'smurmur.exe mcpare untouched. Starting the app never attaches. - Rule: a hunk in a shared file is either inert on macOS (a Windows file,
cfg(target_os = "windows"), or a platform check in the frontend) or listed in the pull request body.
- Feed. The Windows app reads the same feed as the Mac app,
https://github.com/DailyXplorer/Murmur/releases/latest/download/latest.json, the one endpoint of the basetauri.conf.json, which also holds the sharedpubkey.src-tauri/tauri.windows.conf.jsonhas no endpoint and keepswindows.installModepassive(a progress bar, no administrator prompt, per user).latest.jsoncarriesdarwin-*andwindows-*keys, and a Mac never resolves awindows-*key.bun run check:platformsasserts all of it, and that no Tauri config nameswindows-beta. - Legacy feed. Installs of
1.9.0-beta.7and.8readhttps://github.com/DailyXplorer/Murmur/releases/download/windows-beta/latest.json, an asset of the rolling pre-releasewindows-beta. Each stable release with Windows rewrites it to the Windows entries of the unified manifest (same installer, same signature), so the first update of those installs lands on the newest build. It is never deleted, and the previous file is kept as a run artifact for a rollback. The URL belongs in docs and release scripts only. - Test channel.
src-tauri/updater-test.conf.jsonswaps the endpoint tohttps://github.com/DailyXplorer/Murmur/releases/download/updater-test/latest.jsonand nothing else. The release workflow'schanneltestbuilds both platforms with it (versionx.y.z-test.N), publishes a prerelease that is never Latest and writes the manifest to the rolling pre-releaseupdater-test. SeeBUILD.md, "Releasing". - Installers. The installs in the field come from pre-releases
v1.9.0-beta.N(Murmur_1.9.0-beta.N_x64-setup.exeand its.sig).latest.jsonpoints at the newest. The rolling release is titled "update feed" and holds nothing to download. - Version scheme. The updater compares semver, where
1.9.0-beta.8is below1.12.1, so the announced version must equal the built one.check:versionstakes the release notes of the base version for a pre-release. - Signing. The updater key pair is the macOS one: the
pubkeyis the shared one, and the repository secretsTAURI_SIGNING_PRIVATE_KEYandTAURI_SIGNING_PRIVATE_KEY_PASSWORDreach only a release build.createUpdaterArtifactsstaysfalsein the Windows overlay, so ordinary CI builds sign nothing; a release build turns it on with--config src-tauri/updater-artifacts.conf.json. There is no Authenticode certificate: SmartScreen still asks on a first install by hand. - Publishing. One workflow releases both platforms:
release.yml(see "Release workflow" below)..github/workflows/build-windows.ymlbuilds, smoke-tests and signs the installer and attaches it to the draft.
release.yml is owner-only, started by hand on main. Inputs: windows (default true; false gives exactly the Mac-only release of v1.12.1, with the windows-beta pointer untouched) and channel (stable or test). Jobs: validate-release-source, create-release, publish-tauri (the two Mac builds through build.yml, unchanged), publish-windows (build-windows.yml), publish-release. A failed Windows job with windows true stops the release before publication: the manifest is built and every signature checked on the draft, then the draft is published, then the public feeds are checked. build.yml changes only in its cache step (the meetings helper's SwiftPM .build is cached by the swatinem/rust-cache step, which saves only on a push to main, instead of a separate actions/cache step), to close a CodeQL cache-poisoning alert: no default-branch cache is written from a caller-supplied ref; the macOS build output is unchanged. bun run test:release-contract compares it and the Mac jobs of release.yml with scripts/fixtures/release-contract-v1.12.1.json, and fails on a Windows secret or job inside a Mac job, on a make_latest or stable-feed step without inputs.channel == 'stable', and on a test step that makes a release Latest. The release dry run workflow (release-dry-run.yml) builds and signs a Windows installer with a key thrown away with the job and verifies the unified manifest offline, on pull requests that touch release files. A stable version is x.y.z, a test version x.y.z-test.N, checked before anything is built. The procedure and the rollback are in BUILD.md, "Releasing".
- First update. Beta 6 and older have no updater: the first auto-updating build is installed by hand once.
See the Troubleshooting section in BUILD.md.
- Do not edit
src/bindings.tsby hand. It is generated. - Do not remove the
compile_error!at the top ofsrc-tauri/src/lib.rs: Murmur builds for macOS and Windows only. - The macOS app must not change when Windows code is added: Windows code sits in a Windows file or behind
cfg(target_os = "windows"), never behindcfg(not(target_os = "macos")), and a pull request that touches shared code proves the Mac build is unchanged (see "How to prove a change is a no-op on macOS"). - Do not create GitHub labels.
- Do not silence a check with
#[allow],eslint-disable, a skipped test, or--no-verifyunless the pull request explains why. - Do not ask CodeRabbit to push commits. Autofix, fix-ci, and the "Prompt for AI Agents" block are disabled.
- A version bump updates
package.json,src-tauri/Cargo.toml,src-tauri/Cargo.lock,src-tauri/tauri.conf.json, andsrc/content/release-notes/<version>.mdtogether. Do not update one of them alone. The Windows betas of the old line,1.9.0-beta.N, used the notes of1.9.0;check:versionsstill maps a pre-release to its base version. - Do not reformat or refactor files the change does not need.
- Do not add a file to
scripts/file-size-allowlist.jsonor raise a cap; split the file.
Run bun run check before pushing. It is the CI code quality job. On macOS it also runs Clippy.
For a UI change, also run bun run test:playwright. The settings-pages fixture (tests/fixtures/settings-pages.tsx, the page the settings specs load) keeps the window.settingsPages harness and the IPC mock; its data and command handlers are in tests/fixtures/settings-pages/ (params URL switches, settings, models, engine, history, meetings, account, responses). For Rust behavior, from src-tauri run cargo test --locked.
CI runs the Rust tests with cargo nextest run --locked --profile ci (one process per test; .config/nextest.toml fails a test still running after 2 minutes), then, on main and manual runs only, the doctests with cargo test --locked --doc (the crate has none; a pull request skips the step, which was a second compile of the crate, and bun run check:doctests fails a pull request that adds a doctest: write the example as ```text or as a unit test). Windows CPU-model tests also use nextest, and .github/scripts/check-nextest-timeout.ps1 proves that the real CI profile terminates a hung test and reports its name (in the windows workflow on main, nightly and by hand, and on a pull request that changes nextest.toml or the script). cargo test --locked still works locally. A test that needs the state of another test is a bug: fix the coupling, or put the tests in a nextest test-group with max-threads = 1. Tests of the panic hook and logger run in a private child process. Every test process starts UI Automation cold, and processes run side by side, so a test that reads a window through it opens the window with uia::test_window, which waits until UI Automation lists the window's controls, and passes the read a deadline it never reaches unless the budget is what the test checks; a budget is tested with a stepped clock or a deadline already past, never with sleep and an elapsed-time bound.
For a change to how meetings record or process, also run the 3-hour soak on a Mac with the models downloaded: from src-tauri, cargo test --locked meetings_soak -- --ignored --nocapture (about half an hour, headless). It rewrites src/meetings/soak-report.md. On Windows the same kill-and-relaunch check runs in the rust job (a_killed_meeting_is_recovered_and_processed_at_relaunch), and the nightly meetings-windows workflow runs the Windows soak (windows_meetings_soak, 3 hours of tones with a fake Codex), the speaker analysis on spoken dialogue and the system-audio loopback tests (see docs/windows-meetings.md, "Tests").
bun install sets core.hooksPath to .githooks. The pre-commit hook runs the fast subset. Let it run. If you skip it, say why in the pull request.
A change that touches shared code (a refactor, a platform merge) claims the Mac app does not change. scripts/macos-expanded-diff.sh <base> <head> checks it on a Mac: for each commit it runs cargo rustc --locked --lib --profile dev -- -Zunpretty=expanded (RUSTC_BOOTSTRAP=1, in a clean git archive copy, one build after the other), then prints diff -u of the two expanded crates and a summary (N hunks, hunks per top-level module). Exit 0: identical. Exit 1: different, read the diff. Exit 2: the tool failed. The same thing runs on a runner with the manual mac expanded diff workflow (inputs base, head), which uploads the diff as an artifact.
- What it compares. Every Rust item the
murmurlibrary compiles on a Mac, after macros, derives andcfg(the library holds the whole app;src/main.rs, the binary, is added as plain text). A changedcfg,#[tauri::command],spectatype or string gives a hunk, and so does code that moved to another place in the crate (the text is the same, but it sits at another position): a pure refactor that splits files can show big hunks that are one deletion and one identical addition. A change that only adds Windows code, or moves nothing, shows none. The expected result for a PR that must not change macOS is no hunk, or only hunks the PR body explains. - What it does not compare. Tests (
cfg(test)),build.rsand its Swift steps, the Swift sources,Cargo.tomlandCargo.lock,tauri.conf.json, the plists, the frontend. Review those withgit diff, or with the macOS contract of the platform check. - Noise it removes. Absolute directories (the two source copies, the target and the Cargo and rustup homes; the only run-to-run difference in the app crate is one
config_parentpath thattauri::generate_context!expands to), the file, line and column that#[derive(specta::Type)]writes into the code it expands to (impl_location("src/a.rs:12:8"), thesidposition), blank lines and doc comments (///) outside string literals, then rustfmt on both sides. No other line number or file name appears in the expanded text (checked by grep on the whole crate). A blank line or a///line inside a multi-line string is content and still shows up. - Determinism. The same commit twice gives exit 0: checked on the Mac. Before any filter,
origin/mainbuilt twice in two directories differed in one line (theconfig_parentpath), 108,531 lines each. With the final script, HEAD against HEAD (two builds, about 119,400 lines each) exits 0. - Cost. The first run builds every dependency and the Swift helper (tens of minutes); the work directory (
MAC_DIFF_WORK, default$TMPDIR/murmur-expanded-diff) keepstarget/andswift-build/, so the next one rebuilds themurmurcrate only. Run it only when a PR needs the proof. - No
.giton the host. Pass source directories instead of refs; the lane Mac wrapper syncs a worktree without.git.
The scripts' text rules are unit-tested without a Mac (bun run test:macos-expanded, part of bun run check).
publish-updater-manifest.mjs builds one latest.json for the latest release: darwin-<arch>-app and darwin-<arch> from the .app.tar.gz.sig assets, windows-x86_64-nsis and windows-x86_64 from Murmur_<version>_x64-setup.exe.sig when INCLUDE_WINDOWS is true (the default; false gives the macOS-only manifest byte for byte, pinned by a golden file). No other key is allowed, a darwin-* URL ends in .app.tar.gz, a windows-* URL in -setup.exe, so a Mac is never offered a Windows asset (resolveLikeUpdater mirrors the updater plugin's lookup in the tests). --verify-signatures <dir> checks every entry offline against the pubkey of tauri.conf.json. --emit-legacy-feed and --verify-public-legacy handle the Windows-only windows-beta pointer. Rules and flags are in BUILD.md.
build.yml, which the release, main-build, build-test and PR test-build workflows share, launches the release bundle it built, right after the build step (tauri-action has already put the assets on the draft release) and before the build artifacts are uploaded, so a failed launch stops publish-release and a release never goes out with an app that dies at launch. Debug builds are skipped: they write ../src/bindings.ts when they start and only run from src-tauri. scripts/smoke-macos-app.sh <Murmur.app> starts the executable with --start-hidden in a throwaway HOME: the app starts as on a first launch, onboarding not done, so the microphone and shortcuts stay off and nothing asks for a permission. It waits up to 15 s (SMOKE_TIMEOUT; 60 s for the x86_64 bundle, which Rosetta translates at its first launch on the arm64 runner) for the Setup complete (version …) line that lib.rs logs as the last step of setup, keeps watching for 3 s (SMOKE_SETTLE), then stops the app with SIGTERM. The job fails when the line does not come, when the app exits, when murmur.log holds a panic record (panicked at, from panic_log.rs) or when SIGTERM does not stop the app within 10 s. The log tail and the app's own output (a dyld error lands there, not in the log) go to the job log. Keep the Setup complete line, and keep it last in setup: the script reads it.
The script runs the executable directly, so it checks that the signed bundle launches, not Gatekeeper's check of a downloaded app. Run it on a CI runner. The single-instance lock lives in /tmp and the login item belongs to the bundle identifier, so on a Mac with Murmur installed it refuses to start while Murmur runs and it switches Open at Login off; test a copy of the bundle with another CFBundleIdentifier there. If the first runs on a cold runner are too slow, raise SMOKE_TIMEOUT in the step; do not retry. A crash later than the 3 s of watching passes the step.
- Title: Conventional Commits (
feat:,fix:,docs:,refactor:,test:,chore:), focused on why. Branch the same way:feat/short-description. - Body:
## Summary(why, and the issue link),## Changes,## Testing(bun run checkand anything else you ran). Visible UI changes include screenshots or recordings. - Open an issue before a large pull request (a new feature, or a change across several modules).
- User-facing JSX text goes through i18next. Add the English key and keep the other locales in sync.
- Use the bug report form and the feature request form. Translation rules are in CONTRIBUTING_TRANSLATIONS.md. The human workflow is CONTRIBUTING.md.
Address every review comment in one pass, then push once. A real bug fix in that pass includes a test that fails before the fix. A style comment does not need a commit.
A completed round is a review, then your fix. After two completed rounds, stop when the next review arrives. Summarize what is still open and wait for a maintainer. If the same comment comes back after a fix, reply on the thread instead of applying it again.
The review loop workflow may comment and apply the review-loop label. That label is created the first time it is needed. It means a maintainer decides. Do not start another fix round because of it.