Write new Annotate captures as atomic .hexannotation packages under Hex's machine-local annotations folder (<support>/annotations, %LOCALAPPDATA%\hex\annotations on Windows) while reading existing .scrawl libraries in place without copying, mutating, pruning, or retrying them.
- Preserve unknown additive v1 fields on both Package and ScrawlBundle plus validated cleanFrames paths for non-destructive ink editing without a formatVersion break
- Bind .hex-annotate-v1 Paste Last receipts to canonical path, directory (dev, ino), generation, ready_at, and manifest identity while accepting pre-cutover .scrawl receipts in place and rejecting copies across Unified History and Paste Last
- Isolate private retry receipts under RouterDirs::retries with deterministic per-bundle keys and immediate forget on redirect or undo
- Support .hexannotation across annotate_read inspect --json, screenshots recording audio muxing, delayed speech re-transcription, router eval, and editor trim
* feat(meetings): launch polish for the capsules, Calls sheet, and Meetings pane
- Recording capsule: red dot before the time, a quiet ✕ on the icon spine
that asks, then discards the recording (capture stops, no final pass,
folder to the Trash).
- Finished capsule: a title band that opens the meeting in Hex, Copy
transcript over Copy agent prompt, and a ring round ✕ that drains over
its stay and holds under the pointer.
- Calls sheet: one card for when a call starts and stopping when it ends.
- Meetings pane: larger detail title, labelled copies, Rename in the ⋯
menu, an empty state, a System Audio notice, and the pane listed while
Meetings is off on macOS.
- Retention: unchosen meetings are kept 7 days, and expiry never trashes
the exported Markdown or notes.
* meetings: pane tests follow Rename in the menu and the Calls dropdown; Stop keeps its grace line
* meetings: goldens for the new capsules, Calls sheet and pane; labs test keeps Meetings in a Mac's sidebar
* rune_ui: the edit icon is only used on macOS now
Labs › Choose meeting audio adds a Computer audio row to Meetings › Settings: all computer audio, one output device, or one app playing audio, read by each OS capture source as it opens and on its route check, so a change applies mid-recording. A chosen source records silence while it is missing and never falls back to all audio.
macOS: Core Audio process taps (per app or with a device UID), Windows: WASAPI process loopback (Windows 10 2004+) and single-endpoint loopback, Linux: PipeWire node and sink targets.
Review fixes: one long-lived thread owns pw-dump, restarts it after a short backing-off wait when it ends, forgets its graph until the next dump answers, and keeps origin/dev's answers for call detection; a chosen app taps every Core Audio process it has, a tap that should be playing but never delivers is rebuilt on a backing-off schedule, and a Windows root is retried on its own thread while the others keep recording, never adopting a restarted stream whose worker already failed; Windows names an app by the process its WebView2 helpers belong to, lists WebView2 helpers with no host as nothing, and reads process start times only for the app listing; Linux adds and removes an app's pw-record captures in place, keeps them when the graph cannot be read, starts a fresh stall window for a capture that appears after silence, and sizes its queue for streams that start later; every source notices a changed choice on its route check; a chosen source needs System Audio Recording consent on macOS; Hex's own playback never lists as an app; a sink pw-record cannot name is skipped once per name, not once per read.
Also makes the Linux playing-app listing independent of pw-dump order: a browser whose first stream reports no application.name kept whichever name the hash map yielded first, which flaked running_output_streams_name_their_apps_and_node_targets and could show "chrome" instead of "Google Chrome".
* onboarding: don't offer or silently drop a found model this build can't run (#2750)
A byte-identical Parakeet Ultra in the Hugging Face cache was mapped to the
Labs-gated catalog model, so the first run listed it as "On this computer".
Picking it validated to nothing: the tour had already latched its download
request, so the page waited at "0 of N MB" forever, with no error.
found::poll now keeps only found models this build offers (available()), so
the model step, the picker's found section and the held download all agree;
a Labs-off Parakeet Ultra file is no longer a row and no longer holds the
recommended download.
A pick that still can't run says so: onboarding records the error, clears the
pick and marks the tour's model failed, the page names the reason with Try
again, Use a model file…, and Continue without a model, and the Linux host
records the same validation error in transcription_error before refusing.
Tests: a_found_model_this_build_cannot_run_is_not_offered,
an_unavailable_pick_fails_the_page_instead_of_downloading_forever,
a_pick_that_cannot_start_stays_failed_until_another_pick,
a_model_this_build_cannot_run_says_why_and_starts_nothing.
* onboarding: a refused pick's reason never hides the next failure
pick_failure feeds the page only while the tour still reports that pick
(Flow::pick_failed), and Try again or Use a model file… clears it, so a
later download failure names itself instead of the old "X is unavailable".
A refused pick no longer sets ui.error: found.error already carries it, and
the window's error is Settings' Status on platforms without a listener card.
The docs now say what actually shows: the list returns to the recommended row
when the pick clears, and the reason with Try again, Use a model file…, and
Continue without a model is on the plain download page, which shows without
a list.
found::poll's filtering gets its own test, feeding a scan with one unusable
and one usable model.
* onboarding: a failed pick keeps its actions when its reason goes
Use a model file… no longer clears the refused pick's reason before the file
dialog: cancelling the dialog left the page at "Setting up Hex 0%" with the
retry and Continue without a model actions gone.
live.failed is also true whenever the tour still reports the pick failed, so
those actions stay even with no message, and an import's own error takes
priority over the pick's reason, so a failed file names itself.
Try again asks again for the choice the language capsule last set
(live.choice), which the docs now say.
Tests: a_failed_pick_keeps_its_actions_without_a_reason,
try_again_after_a_network_failure_asks_once.
* onboarding: a model file being prepared ends the refused pick
While an import loads, the service is preparing a model the window's
settings don't name yet, so the refused pick's reason and its Try again
stayed over the load; pressing Try again cancelled the import.
A pick is now only explained while nothing is being prepared, and choosing
a model file clears the refused pick (Flow::pick_replaced) so no download
of ours starts behind the import. A failed import still names itself first.
Try again also clears an old import's error, and the docs say so.
Tests: a_model_being_prepared_hides_the_refused_pick,
a_chosen_file_ends_the_refused_pick_without_a_new_download.
One key swaps the dictation model and language with a saved other one, and back, installed only, through the same save and reload path the speech-model picker uses. Requested in #2654.
* meetings: stop every call recording lab on windows and linux
The Meetings Labs toggle only shipped on macOS, though the controller rule is shared and Windows and Linux already read the call app's microphone and output for Stop when the call ends. Ship it wherever Meetings is on: an offered or by-hand recording stops 30 s after its call app leaves the microphone, even with that setting off. Calendar recordings stay macOS-only, and a by-hand recording watches the executable named on the microphone (ms-teams.exe, teams-for-linux, zoom, ...) through the same canonical keys detection uses.
Refs #2555
* meetings: tailor stop-every-call copy to the os
Windows and Linux have no calendar recordings, so the lab's card, description and CLI help no longer say calendar there, and the website lists one summary for every build (calendar noted as macOS only). Translate the new summary, document the GNOME Wayland capsule case and the pane's by-hand start, pin no goldens to the brittle added date, and refresh the Labs and What's New goldens that show the new line.
* meetings: stop when the call ends on windows and linux too
The Calls sheet's Stop when the call ends now shows wherever Record
automatically is offered, and the safeguard that keeps a muted call
recording reads the call app's output on every OS: Core Audio's
running-output processes on macOS, an active render session on any output
(IAudioSessionManager2) on Windows, and a running Stream/Output/Audio node
in the one pw-dump graph on Linux. A failed or unknown read counts as
playing, so it never stops a recording.
* meetings: correct the docs on unreadable output and page switches
Onboarding and the Windows listener disagreed about a catalog model already in the Hugging Face cache: onboarding, Settings, and the picker decided with is_installed, while the Windows listener also required is_verified, whose receipt only an adopt step writes. Onboarding finished ready and Enable refused with Model required.
One readiness check (models::is_ready) now requires the pinned file check for GGUF. Enable and hex model use reuse the existing installed-only preparation to verify/adopt a file that is here; a model with no file still shows Model required without starting anything, and the picker/onboarding/list scan remains the only scan. Checks never replace a lost import's fallback, Disable cancels an in-flight check, a cancelled check re-evaluates instead of staying on Enabling, macOS keeps permissions in the setup decision and recognition waits for the check, and Linux reports the Verifying stage as checking.
* Labs: dictate while annotating
A dictation during an Annotate capture started nothing. Labs › Dictate
while annotating (off by default) lets the shortcut dictate as usual
while the capture keeps recording, on macOS, Linux, and Windows.
The capture's narration keeps the dictated words (both read the same
microphone timeline), its words keep the dictated span, and dictation
keeps priority over every background chunk. The dictation HUD shows at
the bottom edge while a capture records, clear of the capsule.
checks: scripts/check labs, capture, guards, i18n; cargo clippy --bin hex
* Labs: dictate while annotating, shorter card line
The card's second clause said the same thing twice; the line fits in
the card's two rows now.
* Labs: dictate while annotating, goldens
From check-linux.yml run 45082152052's golden-actual: the Labs page
lists the new card in Discover beside Voice isolation (Annotate 5 on
macOS, 7 on Linux; All 58 and 52), and the YOLO-mode scene's counts.
* labs: signature line for dictation (#2314)
* labs: fix signature Paste Last, line check, and validation
Paste Last now remembers whether its text was signed and reinserts a signed one
standalone, so a later unsigned dictation never joins the signature line.
append skips only a signature already on its own line, so "Hex" in
"I love Hex" is signed. A saved signature refuses line and control characters,
and signature_text loads the gate like the other gates. Also fixes the German
summary and updates the docs.
`hex meetings delete <id>` is the Meetings pane's Delete, carried out by the
running Hex on every OS through `POST /control`, so a companion app can
remove one call without opening the window. It takes the exact id
`hex meetings list --json` prints and moves the exported Markdown, any
tracked notes file, and the recording folder to the Trash (never `rm`), then
the open pane drops the row at its next scan.
The pane's Delete and the command now share one path (`meeting/delete`),
which refuses an unknown id, a meeting still recording or transcribing, one
whose notes are being written, and one waiting for its final transcript, each
with its own control error code. Adding the command and reply shapes is
additive, so `CONTROL_VERSION` stays 4.
* Screenshots recordings: quality settings, copy as a file, export size (t1607)
Labs › Screenshots gets a Recording group (Scale Retina to 1x, Max resolution, Frame rate, Quality), each with a hex settings key; defaults 1x, Original, 30 fps, High (HEVC 0.50). The editor copies a recording's movie file, and its export-size pop-up (Original, 1080p, 720p) shows an estimate for the span kept, re-encoding off the UI thread with progress on the pressed button. (t1607)
* Screenshots: ⌘⇧5 recording toolbar with microphone and computer audio mixed into the movie (t1607)
* Screenshots: compact recording toolbar, editor playback and tidier toolbar (t1607)
* Screenshots: simplify the toolbar still, export-size save and playhead tick (t1607)
* docs: the compact recording toolbar and editor playback (t1607)
* Screenshots: filmstrip cells keep the movie's shape; mic-off icon is macOS-only (t1607)
* Screenshots: trim editor goldens for the transport and filmstrip (t1607)
* Screenshots: a trimmed export keeps a whole video track; reencode has a deadline (t1607)
* Screenshots: recording sound isn't silenced; toolbar choices apply at once and save in order (t1607)
* Screenshots: Return and Escape reach an open toolbar menu (t1607)
* Screenshots: a menu-only open of the chosen microphone; no microphone keeps no audio; Annotate may take the record key while the Lab is off (t1607)
* Screenshots: an export lands whole or not at all, and reports only to the recording it came from (t1607)
* Screenshots: keep the exact-device open and partial exports macOS-only (t1607)
* feat(labs): make six everyday features standard and retire three cards
* test(settings): keep per-app choices and five existing bindings across saves
* docs: describe the released controls and preserved per-app settings
* test(labs): refresh the nine-card cut in the Linux renders
* Regenerate site/src/labs.json and keep the retired Labs bits unused
* Keep Learn from corrections' bit test off a retired bit
* test(labs): refresh the Labs renders and drop the print-only card from the toggle list
* dictation: pick vocabulary terms from corrections
* labs: add Learn from corrections
* dictation: learn vocabulary from corrections on macOS
* learn from corrections: fix review findings
* learn from corrections: names with apostrophes, line breaks, punctuation edges
* vocabulary: import and export CSV files behind a Lab
The Vocabulary sheet gains Import… and Export… under Labs › Vocabulary
files (off by default, every OS). Import merges a CSV or TXT file's terms
(Teams' custom dictionary columns) into the list through the sheet's draft
path and says what changed; Export writes the header and one row per entry
through a native save dialog, atomically.
The parser, merge, and writer live in dictation::vocabulary::csv with no new
dependency, and desktop::file_dialog gains Rune's save target.
* vocabulary: refuse bad imports and count merges exactly
An unclosed quoted field, a path that isn't a regular file, an oversized
file, or bytes that aren't UTF-8 now refuse the import with a translated
reason, and a failed settings save says so instead of reporting success.
A term this file added is never also counted as updated, a term counts once,
and dropped spellings count as skipped. Export only adds .csv when that name
is free, and one switch now hides the buttons, the status line, and the
dialog answers together.
* vocabulary: clarify csv export naming and fix a French string
The export docs now say .csv is added only when the name has no extension
and the .csv name is free, and the French unclosed-quote reason uses the
masculine noun. The state-word bit says no gate reads it.
* stream: a faster live-text geometry from the model's own menus
Live text trails speech by a whole chunk plus right context: 2.08 s on
Parakeet Unified English, whose default tuple is 70/13/13 frames. The only
knob was HEX_STREAM_CHUNK_MS, which forced right == chunk and silently
disabled streaming when the model's menu rejected the value.
Labs › Faster live text (labs.faster_live_text, off by default) asks for a
shorter tuple chosen from the model's own GGUF chunk menus: the largest
chunk frame count from 2 to 7 and the largest right up to 7, which is
560/560 ms on Unified English (70/7/7, 1.12 s of lookahead) at about 1.6
times the encoder work. A file whose header Hex cannot read still asks for
560/560 in shipped 80 ms frames and trusts the native probe.
HEX_STREAM_RIGHT_MS joins HEX_STREAM_CHUNK_MS; a chunk alone still sets
the right context, and the env wins over the lab. A geometry the model's
menu rejects now warns and falls back to the default tuple instead of
turning streaming off.
The geometry is cached on the session with the tuning it was probed for,
and the engine compares that tuning as each live stream opens, so a toggle
change applies to the next capture without a restart (and every other
capture pays one comparison).
Measured by aymuos15: with 13-frame chunks, live text arrives about 2.08 s
behind speech, and right context is what delays it.
closes#2102
* audio: the press-across-reopen helper is Linux and Windows only
#2098 added a re-export of interruption::capture_idle for the two listeners
that read it, but gated it on test too, so a macOS build carries an import
nothing there uses. Check macOS (clippy -D warnings) fails on dev with
unused import: interruption::capture_idle; PRs only compile on macOS, so it
landed unseen.
* stream: gate the re-probe, adopt it while idle, keep a failed geometry
Review fixes for #2107:
- refresh_stream only runs after the gated probe passed (HEX_STREAMING,
capability, GPU), so a parked engine on a CPU never starts a stream, and
a non-Parakeet model is never re-probed.
- a changed tuning is the only thing that re-probes: a failure keeps the
working geometry and is not retried, and toggling back is a no-op.
- the header is read only when the lab's tuple needs its menus, lazily at
load or on the first re-probe; a header that reads fine without chunk
menus (a cache-aware model) takes no buffered extension at all.
- the engine re-probes after each command and on its idle tick instead of
at capture start, and yielding streams check cancellation first.
- macOS re-probes with stream_run_options, as its load probe and streams do.
- gguf_header keeps only the Parakeet stream keys, and the frame size uses
checked_mul.
- the card and docs say the pasted text comes from the same shorter
lookahead.
* stream: drop the unused architecture from the macOS probe call
probe_stream no longer takes an architecture (the session reads the file's
own), so load_selection's match became an unused variable in a macOS-only
module. Linux clippy cannot see it; Check macOS can.
* stream: re-probe only when the engine is quiet
Review follow-ups for #2107:
- the after-command re-probe waits for `next.is_empty() && !recording()`, so a
queued Begin, deferred meeting chunk, or active recording never waits
behind the probe.
- both idle-tick re-probes check `!recording()` too, and the unload tick keeps
its park behind the same guard.
- docs/features/labs.md's Faster live text row indents its continuation lines
at the table's column like every other row.
* Stage clipboard-preserving capture insertion for Paste Last on Mac
* Update Rune and its Nix source hash for the picker work
* Select the latest ready paste by owner identity and revalidate it
* Exercise a held mixed paste picker with real bundles and a private Mac pasteboard
* Publish ready Annotate identity and queue owner-specific paste requests
* Wire the existing Mac paste shortcut and controls to the opt-in mixed picker
* Recheck the selected field and cover Paste Last with a disposable Mac receiver
* Refresh the Rune revision for the unified History pane
* Unify Mac History and keep only spoken words after a deliberate dictation cancel
* History and Paste Last call a Hex capture an annotation (t1612)
A finished Hex capture is an Annotation in History, its details and the
Paste Last picker, and the type filter is Annotations. The Captures pane no
longer rewrites its own label when the unified History is on, and the search
index drops the old synonym. Scrawl stays only as Scrawl.app and the on-disk
.scrawl format; a Hex-owned format is separate file and engine work.
* Gate the unified History behind a Labs toggle and give it one row shape (t1612)
Labs › Paste Last picker (labs.paste_last_picker; macOS, Dev audience, off by
default) replaces HEX_EXPERIMENTAL_PASTE_LAST and is read where the work
starts: the picker and its gesture, History's unified list, and the cancel
path's word writer. Off, Paste Last and History behave exactly as before.
History's rows now share one shape for dictations, annotations, screenshots
and recordings; a capture's detail card carries its picture, words, facts and
actions; a search or the type filter never leaves a stale card open; an empty
History has one empty state; and the type filter shows only when there is more
than one kind to filter.
The picker's rows sit on its title's left edge.
* Show the Paste Last picker card on macOS only (t1612)
* Refresh the Labs goldens for the Paste Last picker card (t1612)
* Keep the unified History's capture helpers to macOS builds (t1612)
* Keep the unified History's fixture pictures behind the Mac capture gate (t1612)
* Point the docs at the Paste Last picker lab (t1612)
* add fluid speech pro to the speech model catalog
FluidVoice's Fluid Speech Pro, a Parakeet TDT 0.6B v3 retrain that also
declares Moondream's Parakeet Ultra as a base, for the same 25 European
languages. TalkMate converted it to a Q8_0 transcribe.cpp GGUF at d59dc79
(741,819,456 bytes, sha256 c3848e98...); the file says
parakeet/tdt-0.6b-fluid-speech-pro and announces its extra pre-Conformer
block as stt.parakeet.encoder.pre_block_kernel, so it needs a transcribe.cpp
that reads enc.pre_block.
Like Parakeet v3 it takes no language hint, detects the language under Auto,
does not stream, and is never recommended or badged. Its card publishes no
LibriSpeech test-clean figure, so it carries no single word error rate and no
benchmark record; its per-language FLEURS figures and the CC BY 4.0 credit
are in its details.
* bump(transcribe.cpp): 295c7e6, fluid speech pro's pre-conformer block
Fluid Speech Pro's GGUF announces stt.parakeet.encoder.pre_block_kernel and
carries eight enc.pre_block.* tensors: a residual FrameCleaner block between
the subsampler and Conformer layer 0. The old pin's graph never read them, so
the model loaded as plain Parakeet v3 and its encoder was wrong.
Both transcribe-cpp crates move to 295c7e601 on hex/combined-fluid, a
fast-forward of bcb639f that runs the block on pre_encode before xscaling
when the KV is present, and fails the load rather than skipping tensors when
it is only partly there. Cargo.lock changes only those two sources
(`getrandom`'s tempfile pointer was reverted to what it was), and
nix/package.nix carries the hash from a failed `nix build .#hex`, then a full
one whose check phase passed.
`hex model install fluid-speech-pro` followed by `hex model transcribe` on
whisper.cpp's jfk.wav prints the expected sentence, as does Parakeet v3 on
the same clip.
* fluid speech pro: snake_case id, FLEURS-only figures, blurb, notices
* windows: sign the setup engine so smart app control can run setup
Setup extracts a copy of its engine to %TEMP% at launch and writes the
installed uninstaller from the same bytes. Signing only the outer
hex-setup-*.exe left both unsigned, and Windows 11 Smart App Control
blocked the extracted copy ("Unable to execute file in the temporary
directory", error 4551).
SignedUninstaller embeds the engine's signature, but the signature has to
exist before the compile that uses it, and the compile job holds no
credentials. So the release signs it in two passes: the new
windows-setup-engine.yml compiles once with SignedUninstaller=yes and keeps
the unsigned uninst-*.e32 ISCC asks to be signed (ISCC leaves it and aborts
as a compile failure, exit 2); sign-windows-engine signs and verifies it in
the release environment; windows-installers.yml then compiles with the
signed engine and asserts the installed uninstaller's signature.
Test builds and runs without the Azure values keep the unsigned single
compile. Inno Setup is pinned to 6.7.1, read from the compiler's own banner
(ISCC.exe's version resource is 0.0.0), so both passes use one compiler.
* windows: harden the setup engine passes
Review fixes for the signed setup engine:
- sign-windows-engine requires sign-windows to have succeeded, and its
steps are unguarded like sign-windows-installers, so it can never upload
an empty digest.
- setup-engine runs only when Windows is signed (it waits for
sign-windows), so unsigned runs really do a single compile with no
engine pass at all.
- the Inno re-pin uses choco upgrade --allow-downgrade, because choco
install --version treats a preinstalled package as already installed.
- Invoke-Iscc collects native stderr safely under Windows PowerShell 5.1
and pwsh with $PSNativeCommandUseErrorActionPreference on, and echoes
the compiler's lines so build logs stay readable.
- the version probe compiles a minimal script from standard input into a
throwaway OutputDir, so it never touches the caller's -OutDir.
- only .e32 exists for the engine; drop the unused .e64 handling.
- the uninstaller signature test also checks the release publisher, and
the test-builds doc warns that Smart App Control cannot be turned back
on without resetting Windows.
* windows: correct the setup engine comments
* windows: join back-to-back dictations with a space
move the input-activity revision, continuation join and its tests into a
platform-neutral continuation module. windows now invalidates it on real
keys and clicks from the low-level hooks and on foreground-window changes,
and the paster joins dictation and paste last the way macos does.
* windows: end continuations on real input and skip hex's own trigger
injected input from other tools and the auxiliary mouse buttons end a paste
continuation as on macOS, while Hex's own synthetic events and a dictation
trigger that Labs › Share shortcut lets through do not. A standalone macOS
paste clears the continuation only where dev did: at the start of typing, or
after the clipboard is preserved and checked.
* windows: a bare trigger key press ends the paste continuation
Labs › Share shortcut lets the dictation trigger's key reach the app in
front, and the hook treated every event for that key as hex's own. A
plain Space while Ctrl+Space is bound then kept the continuation, so the
next dictation joined with a space for no reason. Mark the press as the
shortcut's only once it claims the capture, and drive the hook's own
state machine in a test.
English instructions and no language rule let the notes model answer in another language. Ask for the title, summary, and chapter names in the language spoken in the transcript, on both backends.
* fix(dictation): release the warm mic while the display sleeps or the screen is locked (#1953)
* fix(dictation): address review on warm mic away release
* docs: fix hex microphone resume wording
* Separate local annotation paste from a routed send
* Render the Paste chip with the capsule theme
* Exercise the ready capsule fixtures on the Linux golden runner
* Keep the displayed result on handoff and test pointer and keyboard selection
* Preserve matched rules through finalization and update checked capsule goldens
* Give the ready annotation one named action and a quiet search control
* Check the two ready surfaces, their accessible names and delivery states
* Put the ready line and its list on shared edges, with Paste a 28 pt button
The preview sat 12 pt from the wall while the list's header and names sat
16 pt in, and Paste was a 32 pt fill 4 pt from the top and bottom beside
28 pt icon boxes. The preview now starts on the list's edge, and Paste,
Search, Inspect and the close button are one row of 28 pt boxes 6 pt apart
and 6 pt from the walls. Paste's 32 pt chip still takes the click.
* Update the Linux references for the ready capsule's shared edges
* Nest the annotation preview in the capsule's left corners
The preview sat 16 pt from the left wall and 10 pt from the top and bottom,
so its 4 pt corners turned about a point 6 pt from where the shell's 14 pt
corners do. It now clears all three walls by 10 pt, the shell's radius less
its own, and the list's 16 pt margin stays for words. The guard that held
the preview on that margin now checks the corner centres instead.
* Update the Linux references for the nested annotation preview
* linux: send portal paste chords as evdev keycodes (#1939)
KWin looks a keysym up in the desktop's active layout group. With a
non-Latin layout (Russian) active it can't find Latin `v` there, and its
fallback to a scratch keymap lost the held Ctrl: the app received a bare
`v` and Ctrl stayed down in the compositor.
NotifyKeyboardKeycode takes Linux evdev keycodes (KEY_LEFTCTRL 29,
KEY_LEFTSHIFT 42, KEY_A 30, KEY_C 46, KEY_V 47, KEY_ENTER 28), which name
the physical key, so the chord is the same in every layout. The session
already asks for the KEYBOARD device type, which keycode notifications
require, so only the method and its numbers change.
Not observed on a real KDE session.
* linux: resolve paste keycodes from the desktop keymap (#1939)
A fixed evdev code is wrong on a non-QWERTY Latin layout: Dvorak puts `v`
on KEY_DOT, so Ctrl+V would arrive as Ctrl+K, and AZERTY puts `a` on
KEY_Q, so select-all would be Ctrl+Q, which quits apps.
Paste now reads the compositor's keymap from a one-shot wl_seat keyboard
(bounded at 250 ms, the fd read through a File with a size cap, no
unsafe), parses it with xkbcommon, and resolves `a`, `c`, and `v` at level
1 across every layout group. A chord goes out as NotifyKeyboardKeycode
only when every group that has the letter agrees on one evdev code (the
xkb keycode minus 8); disagreeing groups such as `us,us(dvorak)`, an
ambiguous group, a missing letter, or no keymap at all send the whole
chord as keysyms, as before. Ctrl (29), Shift (42), and Enter (28) are
fixed codes, and Return never reads the keymap.
KWin 6.8's fake input answered a Latin `v` under a Russian layout from a
scratch keymap that lost the held Ctrl: the app got a bare `v` and Ctrl
stayed stuck (#1939). Mutter's keysym path drops the `v` the same way.
The keymap is read per chord because a portal session can outlive the
keymap it started under, and a layout or variant change replaces it.
Not observed on a real KDE or GNOME session.
* linux: read the shared keymap safely and check every fixed key (#1939)
Compositors hand every client the same keymap fd, and an fd's offset is
shared, so the sequential read left it at EOF: every later paste's read
came back empty, silently falling back to keysyms, and other clients
reading the same fd saw nothing. Read positionally instead
(`FileExt::read_exact_at`, never moving the offset) and strip the NUL the
desktop ends the keymap with.
Ctrl, Shift, and Return are only where the keymap says they are. Options
move them (`ctrl:swapcaps` puts Caps_Lock on 29, `ctrl:nocaps` leaves
Control_L on two keys), so keycode mode now requires Control_L on 29,
Shift_L on 42 when the chord holds shift, and Return on 28, each in every
layout group; otherwise the whole chord is keysyms. Return without a
keymap is a keysym again, as it was before.
The wait no longer spins: `guard.read()` returns Ok(0) when nothing is
ready, so the old loop retried without ever yielding. It now asks for a
wl_display sync once the keyboard exists and stops when that answers
(the keymap comes before it), stops at once when the seat has no
keyboard, and polls the Wayland fd with a deadline like `linux/clipboard`
does. The registry roundtrip before it keeps the comment saying what it
is: Wayland's unbounded startup roundtrip, as in `linux/paste.rs`.
Tests parse a self-contained inline keymap through xkbcommon (no
xkeyboard-config), read it twice through one fd, and cover the moved
modifier and Return fallbacks. The Cyrillic fixtures use the legacy
keysyms xkbcommon reports, in `ru,us` order.
Not observed on a real KDE or GNOME session.
* docs(linux): correct the keymap comments (#1939)
KEY_CAPSLOCK is 58, where `ctrl:swapcaps` puts Control_L, not a key no
keyboard has. The map now says what each key actually requires: a letter
needs one code across every group that has it, while Ctrl, Shift, and
Enter must be on 29, 42, and 28 in every group.
Mutter loses a keysym outside the active group, not `v` specifically.
The wtype paragraph keeps its original wrapping, and a paste that cannot
read the keymap says so at debug level.
* make the labs card copy plain
Rewrite the Labs card titles and lines in words a regular user understands:
YOLO mode says the message sends itself, Live text and Failure notices name
the small recording indicator, Vocabulary help says which speech models it
affects, and the key-side cards name Option, Command, Shift, and Control.
Audit every other card, updating the CLI descriptions, all nine translated
languages, the website lab catalog, the feature docs, and the render goldens.
* fix labs copy review findings
Restore the ISO qualifier on the section-key card, spell out that
double-tap and hold-through shortcuts contain no letter or number key,
cover all Global mode stages in the API text card, and name the print
command in the print-start copy. Restore the developer API card titles,
fix the Annotate capture wording, and retranslate the affected strings.
Remove every replaced translation key and stale lab-name reference.
* fix second labs copy review
Update the live typing test and YOLO goldens. Add a Windows variant of the
hold-through-keys copy naming Ctrl, Alt, Shift, and the Windows key. Remove
the last unused rewrite-by-voice translation key, keep Annotate untranslated
in the replay title, and clean the remaining old lab-name comments.
* use the Polish Annotate pane name in its replay title
Polish calls the Annotate pane Adnotacje, so the Annotate last 15 seconds
title says Ostatnie 15 sekund w Adnotacjach again. Other languages keep
Annotate because their pane name is Annotate.
* dictation: keep the stream inside the clip, and only call a lost opening one
Two regressions in 3.4.0 made most hotkey dictations give up their live
stream and re-transcribe the whole clip, so paste latency grew with the
clip's length.
The release tail (3.4.0) waits for the stop tone plus speech after it before
it decides the tail, keeping capture running up to release + 428 + 160 ms
with the default Classic sound. Every chunk ingested meanwhile was fed to the
live stream, while `Recording::finish` trims the clip to release + its tail:
the stream heard 388 ms of audio the clip dropped, past the engine's 250 ms
overfeed tolerance, so it refused the stream. A finish now caps live feeding
at the release plus `POST_RELEASE_TAIL` (`DictationCapture::limit_stream_to`),
the base tail that is always kept; a grown tail, and audio captured while the
tail decides, arrive through `finish_stream`'s remainder of the finished
clip. macOS, Linux, and Windows all cap at the release they finish on.
`MAX_OVERFED_SAMPLES` is unchanged.
The opening-coverage check (3.4.0) summed every speech frame anywhere before
the first token, so Hex's own start tone and the double tap's click at the
clip's head added up past 300 ms and forced a whole-clip run on a stream that
had lost nothing. `PauseCap` now counts only the contiguous run of speech that
runs into the text's start (syllable gaps of up to 40 ms bridged, ending
within the 400 ms slack the first token may be emitted late by) and names the
run's span in the reason. A sound that sits on its own, seconds earlier, is
never a lost opening.
Checks: `a_long_release_tail_never_feeds_the_stream_past_the_clip` (fails by
4_480 samples without the cap), `an_isolated_burst_before_a_late_first_token_does_not_discard_the_stream`,
`a_split_burst_that_reaches_the_threshold_is_not_a_lost_opening`, and
`speech_running_into_the_texts_start_is_still_a_lost_opening`.
* dictation: ignore the capture's own sounds, not a whole run, before the text
The opening-coverage check counted every speech frame anywhere before the
first token, so Hex's own audio at the clip's head (the pre-roll through the
press, which can hold a retracted first tone and an earlier dictation's stop
tone, then the start tone) added up past 300 ms and forced a whole-clip run on
a stream that had lost nothing. Counting only one contiguous run was worse:
a lost opening followed by a pause longer than the check's 400 ms slack (2 s of
speech, a 1 s pause, text at 3.5 s) was accepted, which is the case the check
exists for, and requiring 300 ms of one run is unproven on real speech.
So the check sums every counted frame again, and skips the capture's own sounds
instead: the clip's press offset plus the current set's start sound
(`feedback::start_tone_length`, zero with sounds off) and the output and input
latency it takes to reach the microphone. `DictationCapture::begin_stream`
passes that count with the stream (`Command::Begin`), so `PauseCap` still reads
its own samples and the 400 ms slack is untouched. The reason keeps the span of
the counted speech.
Checks: `hexs_own_sounds_at_the_captures_head_are_not_a_lost_opening` (the
same clip errs without the exclusion),
`a_lost_opening_after_a_long_pause_still_falls_back_to_the_whole_clip`.
`ReleaseTail` and `ReleaseWait` move to `src/dictation/release_tail.rs` to keep
`src/dictation.rs` under its size cap, and the docs say plainly that a release
handled late can still leave the stream past the clip's trimmed end.
* build: gate ReleaseWait and the zero-head begin to the platforms that use them
macOS has no ReleaseWait (Linux and Windows poll it), so the re-export and
its imports are gated there. The Windows bench is the one non-test caller of
a head-less stream, so it asks for no ignored head explicitly and Transcript-
ionEngine::begin stays test-only.
* docs: word the press window's margin and its blind spots accurately
The 60 ms margin after the start tone covers the 40 ms chord grace before a
provisional tone sounds plus a little latency, not the output and input
latency alone. With sounds off only the pre-roll is excluded, and with
release-while-idle the tone sounds once the capture is intentional or ready,
so the window may not cover it. Say plainly that a short lost opening inside
the window, pre-roll speech included, goes unseen, that the earlier version
likely rejected streams rather than certainly doing so, and that only the
part of the tail audio the clip keeps is fed from the finished clip.
* capture: stream audio to disk so long captures keep all of it
A capture's timeline now writes 16 kHz mono PCM16 to its bundle's
audio.wav as it records, with the leading offset and gaps as silence, so
memory stays flat and the 20-minute drop is gone. An 8-hour guard bounds
disk use only; past it the rest is one recorded gap.
A finished capture is transcribed from the WAV in 30 s pieces, the
reader hex transcribe already used (lifted to transcription/pieces.rs),
and each piece's words move onto the capture clock. The Parakeet, Apple
(path-based), and GGUF paths keep every word without holding the
session. The pipeline never rewrites a streamed audio.wav from empty
samples, an iPhone narration is read back where it must be re-based,
and a cancelled capture closes and removes its file.
* capture: say where a capture's audio stopped
A streamed capture keeps all of its audio, but the 8-hour disk guard (or
a failed audio write) still stops it early, and only the process log
said so. The timeline now carries the stop point onto RecordedAudio,
the bundle stores it as audioStoppedAtMs (serde default, so old bundles
load unchanged), and three places say it plainly: summary.md, `hex
capture show`, and `hex capture status`.
The guard records its point at a 1 s test limit, and the summary line is
tested at 12:34 and 8:00:00 so both clock shapes are covered.
* capture: fill the replay's stop point from its bundle
The 15 s replay builds Written too, on macOS only, so the new field
broke the macOS clippy job while Linux never compiled that function.
* capture: keep a recording out of recovery until it stops
Review fixes for the streamed timeline.
A capture now streams to `audio.wav.partial` and renames it to `audio.wav`
in `Timeline::finish`, so a bundle with a movie and an in-progress audio
file is never mistaken for a capture whose build never ran (recover's
orphan rule, Scrawl.app's `scrawl recover`) and retention cleans a crashed
one like any other bundle. Cancel and discard remove the partial; a failed
publish reads it back into memory rather than pointing at a missing file.
Also: a write failure's stop point is the last sample that reached the
file, not the end of the failed chunk; a trim failure counts every written
sample; the capture's words keep one running frame total instead of
adding truncated per-piece millis; an iPhone narration's `since` drains the
decoded samples instead of copying them and treats a missing file as no
audio; the phone and replay paths carry the audio stop point into their
bundles; and empty audio answers `source: "none"`, as `transcribe_with`
does.
Tests: a movie plus partial audio is never owed, retention trashes a
crashed bundle's media, a write failure records its stop point, a missing
streamed file shifts to no samples, and the replay shift moves the stop
point with the clock.
* capture: publish audio.wav only once its build journals the capture
Follow-ups from review.
A capture now streams to audio.wav.partial and keeps that name after it
stops: the partial is renamed to audio.wav right after the build writes
unfinished.json, so audio.wav never exists without a journal, and a
stopped capture waiting in the finish queue no longer looks like an
orphan to Scrawl.app's recover. A partial that cannot take the name is
read back and written by the build, and its partial name removed; the
replay removes the unshifted partial once the narration is read for
shifting.
Also: a periodic header flush error is now a write failure (the rest of
the capture is a gap) rather than a log line; the midpoint of a failed
write records where the file stopped; and the words test cuts pieces at
odd sample counts and computes offsets from the running frame total, so
per-piece millisecond drift would fail it.
Tests: a streamed audio takes its final name only when the build settles
it (and falls back when it cannot), a capture that has not been
journaled is never owed a rebuild, a mid-capture write failure stops
where the file stopped, and the word offsets are exact at odd piece
lengths.
* capture: consume a streamed recording's partial when it is read
Follow-ups from review.
`RecordedAudio::since` and `into_memory` now remove the partial once its
samples are read: an iPhone narration (capture.rs's `host_narration`
path) used to leave the whole streamed file in the finished bundle. The
replay relies on the same path instead of removing it by hand, and the
light zip leaves `audio.wav.partial` out defensively. A read that fails
is an error to `into_memory` (so a build keeps the only copy) while
`since` still treats a missing file as no audio for an iPhone.
A failed publish now reads the audio back only when it produced the
samples the recording had; a failed read keeps the partial and removes
any half-copied `audio.wav`. `publish_audio` takes `&mut self` and points
the recording at the published file.
A journaled bundle whose `audio.wav` is missing adopts `audio.wav.partial`
before rebuilding. Docs say the guarantee is a streamed capture's, and
that a crash while recording or queued is retention's job, not
recovery's.
Tests: reading a streamed recording consumes the partial; a finished
iPhone bundle keeps none; a streamed audio is published only when its
build settles it, including the read-back and unreadable-partial cases; a
journaled capture adopts its partial.
* capture: keep a failed audio publish recoverable
Follow-ups from review.
The publish fallback read the partial with `into_memory`, which deletes
it, and then ignored whether its own write landed: a failed write left
the audio nowhere. It now reads through `read_streamed` (no deletion),
writes `audio.wav` and checks the result, and removes the partial only
once that write succeeded. A failed read or write removes any half
`audio.wav` and fails the build, which is the pipeline's existing failed
path: `recover::finished` runs only for an `Ok` build, so `unfinished.json`
stays and the next launch's recovery adopts the partial instead of the
capture quietly finishing without its audio.
`publish_audio` also treats a landed copy as success even when deleting
the partial fails, logging it rather than reporting failure and letting
the fallback overwrite a good `audio.wav`.
Tests: a blocked target keeps the partial and fails the build; a
fallback write that lands consumes the partial and writes `audio.wav`;
an unreadable partial is kept.
* add labs › keep long holds through other keys (#1475)
A shortcut with no key, held more than a second, no longer loses a
dictation to a joining key or click on macOS and Windows: the key
reaches the app in front and the release still finishes. Before the
first second, and with the lab off, chords discard exactly as before.
macOS reads the gate in DictationHotkey; Windows reads it in the hook,
where the capture keeps the press's tick count for the same second.
* labs: shorten hold through other keys copy
The card now reads "Hold through other keys", with a one-clause summary
that fits the card. Translations say the keys reach the app and no longer
end the dictation, and "a second or more" matches the >= code.
* labs: tighten hold through other keys translations
The translated summaries fit the two-line card now (74-83 characters
for the Latin and Cyrillic columns, 28-42 for Chinese and Japanese), and
no longer add a clause about keys reaching the app. Ukrainian and Russian
titles fit the card, and the labs doc says which goldens changed and that
macOS clicks were already ignored after 300 ms.
* labs: fix hold through other keys translations
Grammatical Spanish, Portuguese, German, Japanese and French copy from
review, with the French title shortened by two words because "Maintenir
malgré d'autres touches" clipped in the card. The dictation doc now says
the Windows tests need Windows and run in Check Windows.
* Graduate six meeting labs, move four into Meetings settings, and throw capsules into corners (t1532)
* Regenerate goldens and count call rows from the provider list (t1532)
* Trace a recording pill hover and reversal offscreen (t1571)
* Keep the recording meter anchored and show each audio track (t1571)
* Keep light and dark recording snapshots from Linux (t1571)
* Draw dictation’s listening field inside the meeting pill (t1571)
* Refresh meeting pill goldens with the listening field (t1571)
* Paint just the listening dots on the meeting surface (t1571)
* Keep dots-only recording goldens in light and dark (t1571)
* Keep recording controls and the dictation HUD dark on light desktops (t1571)
* Refresh the dark overlays on light-host goldens (t1571)
* Keep the finished meeting in its corner and let Close dismiss it (t1571)
* Refresh finished summary goldens with the close control (t1571)
* Open shipped features from What’s new (t1574)
* Keep release-specific links distinct from feature navigation (t1574)
* Document and translate the feature feed (t1574)
* Verify dark and light navigation to both controls (t1574)
* Show feature icons and calendar-day headings in What’s new (t1574)
* Verify local-day boundaries and refresh both feed goldens (t1574)
* Separate What's new navigation from build details (t1574)
* Check What’s new selection through accessibility (t1574)
* Refresh only the lower sidebar in the Linux goldens (t1574)
* Drop the graduated labs from the Labs card and catalog (t1532)
* Keep the merged meeting files inside the source cap (t1532)
* Regenerate the Labs and Meetings goldens for the cleanup (t1532)
* Drop the graduated labs from the website catalog (t1532)
* Keep the throw's frame hook on every capsule (t1532)
* raise quiet meeting microphone chunks before transcription
* decide the meeting microphone raise from the track's last minute
* keep the 20 ms frame constant to the tests that use it
* reset the chunker's segmenter and leave silence unraised
* fix(macos): type dictation into Windows App instead of pasting (#1048)
* fix(macos): stop paced dictation when another app comes in front (#1048)
* test(macos): keep the paced typing tests within clippy's types (#1048)
* fix(updater): keep one .Hex-update folder, not one per staged dev build
Every staged release unpacked its own `.Hex-update-<version>` folder beside
`Hex.app`, and the only removal was `finish_on_launch`. The Dev channel checks
every ten minutes, so a Hex that runs for days staged a full ~80 MB copy of the
app per published build and left every one of them in `/Applications`
(the folder it replaces was never removed); the launch sweep only ran when Hex
next started, which for a menu-bar app can be days.
Staging a newer release now removes the folder of the one it replaces, once
the replacement is the staged update, so a running install holds exactly one
folder and the app can never be caught without its staged update. The launch
sweep stays as the safety net for a swap or an interrupted stage, and now
skips symlinks (never followed) and the running bundle itself.
The sweep moved to `updater/staging.rs` so it can be tested off macOS:
`launch_cleanup_removes_every_unpacked_update_but_the_running_bundle`,
`a_newer_update_removes_the_folder_of_the_one_it_replaces`,
`a_bundle_running_from_a_staging_folder_keeps_that_folder`, and
`a_symlink_named_like_a_staged_update_is_never_followed`, plus the macOS-only
`a_newer_staged_release_removes_the_folder_of_the_one_it_replaces`.
Observed on macOS 26 with the published 0.0.0-dev-1046 build: the launch sweep
removed both a folder holding an older signed build and one holding a
swapped-in peer beside /Applications/Hex.app.
* fix(updater): never stage a release after a quit installed one
a quit installs the staged update itself (`install_on_quit`) while the updater
thread can still be in `check()`. two things went wrong in that window:
- the late `check` overwrote `shared.staged`, and its `remove_superseded` then
deleted the folder holding the bundle the quit had just replaced (the one
the draining process runs from), orphaning the release it had unpacked.
- `finish_restart` swapped again after `install_on_quit` had applied the
update, exchanging the same two bundles back and losing the update.
`check` now takes the state and staged locks together, in the order
`install_on_quit` takes them, and refuses a release that lands while quitting or
after `State::Applied`: it removes the folder it unpacked and keeps the
installed update. `finish_restart` reports done without swapping once the state
is Applied. The macOS `discard` helper removes that unused folder.
`staging::remove_beside` now canonicalizes the bundle's folder and compares the
kept folder by name (only when its own folder resolves there), so a `..`, `./`,
or symlinked spelling still names the folder to keep, and a path outside it
protects nothing.
tests: `a_restart_after_a_quit_installed_the_update_does_not_swap_again` (fails
without the Applied guard), `a_release_that_finishes_staging_after_a_quit_installed_one_is_discarded`
(fails when the decision adopts everything), and
`the_folder_to_keep_is_recognized_through_a_non_canonical_spelling` (fails with
the old raw path comparison).
* labs: copy a kept dictation recording as a file
Adds the Copy dictation audio lab (Labs › History, off by default,
labs.copy_dictation_audio). It stores no audio: History entries that
Labs › Keep recordings gave a WAV gain Copy audio beside Play, and the
macOS menu bar and the Linux and Windows tray gain Copy last dictation
audio, which copies the newest entry that kept its audio. macOS uses
Scrawl's file pasteboard, Windows CF_HDROP, and Linux a text/uri-list
through the process's one LinuxPaster, which now lives in
linux::paste::with_paster so captures and History share it.
A missing recording or a refused clipboard says so under the row in
History, as a failed Play does; the menus log it, as Copy recent
dictations does. The newest-recording lookup skips entries whose file
is gone, with a unit test. Docs, translations, labs.json, and the Labs
goldens follow.
* labs: copy dictation audio off the UI thread and behind both switches
Review fixes for the Copy dictation audio lab:
- History's Copy audio now runs like Transcribe again: the file lookup on
the window, then a worker named hex-copy-audio does the clipboard write
(which can wait on another app, Annotate's paster, X11 or wl-copy) and
reports Copied or the error back through the window's waker. The button
reads Copying… while it runs.
- HistoryStore::newest_recording now takes now_ms and filters by the
store's retention cutoff, like recent() and search(); the unit test
covers a file deleted behind the store, the cutoff boundary, and an
expired entry.
- The menu bar and tray item, and the History action, need both this lab
and Keep recordings; the gate and every handler re-check both. A copy
failure from the menu or tray stays logged, as the menu's other copy
actions do, and the docs record that limit.
- Copy's text check and Copy audio's check clear each other.
- A UI test pins Copy audio absent with either switch off and present
with both on.
- Card and site summary say menu bar or tray; the validateMenuItem doc
names both dimmed rows; WindowsDesktopHost::history follows new(); the
History feature map mentions the action.
* labs: hold text Copy behind a running Copy audio, and refresh the tray
Follow-ups from the PR review:
- A pending Copy audio keeps a text Copy from starting, since its worker
still lands the WAV on the clipboard; text Copy only clears a settled
audio state. The UI test pins it.
- The Linux and Windows trays compare Copy audio's availability with the
last value, so a recording that appears or expires redraws the menu
without a snapshot or publish change; the gate is read first and
History only with a tray, keeping the check cheap.
- Move Copy audio's worker state into history/audio.rs so
rune_ui/history.rs stays under the 1,500-line cap.
* labs: card titles, lines and OSes in the registry, exported to site/src/labs.json (t1560)
* site: a page and a social card for every lab, generated from the registry (t1560)
* labs: the two newest labs on the website (t1560)