mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-28 13:02:21 +01:00
* Labs: contributed options behind toggles; Annotate in stable * fix * fix tests; voice-filter playground path * Labs contrib: docs, goldens, playground paths
221 lines
14 KiB
Markdown
221 lines
14 KiB
Markdown
# Labs
|
||
|
||
Labs holds features we're unsure about, **especially features people asked
|
||
for that we built**: they land in Labs, off by default, instead of shipping
|
||
on. There is no master switch. **Labs** is always the last item in the
|
||
sidebar and lists every Labs feature as one flat row (name, one-line
|
||
description, toggle), each **off by default**, plus Send feedback and Run
|
||
setup again.
|
||
|
||
```ts
|
||
Feature Pane Toggle (settings.json, hex settings) On: what it does
|
||
├── Meetings (beta) yes meetings.enabled (macOS) Meetings joins the sidebar: call detection, recording, transcripts
|
||
├── Voice Filter yes experimental.hex_microphone (macOS, Linux) Voice Filter joins the sidebar; feeds the Hex Microphone (macOS driver, Linux PipeWire source)
|
||
├── Playground yes labs.playground a Playground sidebar item and ⇧⌘D open the story browser (restart)
|
||
├── Live text no labs.live_text provisional words beside the HUD while dictating (restart)
|
||
├── Live chapters no labs.live_chapters (macOS) chapters a meeting while it records, boundary pass after Stop
|
||
├── Vocabulary biasing no labs.vocabulary_biasing Parakeet transcription biased toward the vocabulary (#452/#457)
|
||
├── Switch model with keyboard language no keyboard_model_switching.enabled (macOS, Windows, X11)
|
||
│ the input source picks its mapped model (#216); General shows the mappings while on
|
||
├── Mouse shortcuts no labs.mouse_shortcuts (macOS) mouse buttons record as shortcuts (#209)
|
||
├── Also pause the browser no pause_browser_media (macOS) pause a playing tab too, with Pause media (#301); General shows its permission row
|
||
├── Share dictation shortcut no share_dictation_shortcut (Windows) apps such as Discord see the shortcut too (#176)
|
||
└── Terminal paste no paste_with_shift (Windows) paste with Ctrl+Shift+V (#477/#478; Linux keeps it in General)
|
||
|
||
Settings › Labs // labs.page
|
||
├── "Try unfinished features. They may change or break." + Send feedback -> https://github.com/anomalyco/hex/issues/new
|
||
├── One row per feature this OS has -> press flips it, saved at once
|
||
│ ├── A pane feature on -> its pane is a normal top-level sidebar item; off -> hidden entirely
|
||
│ └── Voice Filter while its driver is installed -> on, disabled, "Uninstall the driver in Voice Filter to turn it off."
|
||
└── Run setup again -> replays the new onboarding (below)
|
||
|
||
hex labs // labs.cli; edits settings.json, no running Hex
|
||
├── (list) -> every feature: name, on/off, description, its hex settings key
|
||
├── on <feature> | off <feature> -> save it; print the restart hint
|
||
├── off voice-filter with the driver installed -> refused: uninstall the driver
|
||
└── hex experiments … -> points at hex labs
|
||
|
||
hex settings set labs.live_text true // macOS: through the running Hex
|
||
```
|
||
|
||
Settings saved before this model may carry `labs.enabled`; it is read and
|
||
ignored, and every feature keeps its own toggle. `hex status` lists the
|
||
features on (`Labs` line on macOS, `labs` array in the macOS and Linux JSON,
|
||
`labs\t…` on Windows).
|
||
|
||
Live text and the playground are read at launch and apply after a restart;
|
||
Live chapters are read when a recording starts; the others apply at once.
|
||
Nothing starts at launch for a feature that is off.
|
||
|
||
Gate a Labs feature where its work starts (the worker, thread, or capture),
|
||
not only where its UI appears: `labs::live_text()`, `labs::live_chapters()`,
|
||
`labs::playground()`, `labs::vocabulary_biasing()`,
|
||
`app_settings::meetings_enabled()`, or `app_settings::hex_microphone_enabled()`.
|
||
Add a new feature to `labs::Feature` (name, settings key, description), give
|
||
it a row in `rune_ui/labs.rs` and a `hex settings` key, and default it off.
|
||
When a feature graduates, remove it from Labs.
|
||
|
||
Mouse shortcuts off: the recorder ignores mouse buttons, `hex settings`
|
||
refuses one, and a saved mouse-button shortcut goes back to its default when
|
||
settings load (macOS), with a one-time note in General
|
||
(`mouse_shortcut_notice`). Check:
|
||
`mouse_shortcuts_go_back_to_their_default_while_their_labs_toggle_is_off` in
|
||
[app_settings.rs](../../src/app_settings.rs).
|
||
|
||
Normal features, not Labs: dictation, Annotate (every build; its own pane
|
||
and switch), lowering audio while dictating (#210), Dot scope, chord shortcuts, QuickJS transformations, clipboard
|
||
restore, the vocabulary list itself (rewriting and search), and Linux's
|
||
Terminal paste.
|
||
|
||
## Features
|
||
|
||
- Live chapters: chapter a meeting's transcript live while it records
|
||
(macOS, Apple Intelligence; see
|
||
[Live Chapters](meetings.md#live-chapters-labs)). Its own switch is
|
||
`labs.live_chapters` (off by default). The gate,
|
||
`labs::live_chapters()`, is where the work starts: the recorder's chapter worker, recording
|
||
chapters in the manifest, and the boundary pass after Stop.
|
||
- New onboarding (no toggle; it runs only when invoked): the onboarding
|
||
story, replayed on every OS
|
||
(`rune_ui/onboarding_kit/live.rs`): the real model download, Microphone and
|
||
Accessibility rows that follow macOS (ready at once on Linux and Windows,
|
||
which ask for no permissions), and a practice dictation with the real
|
||
shortcut and the HUD on the live microphone level. The window's tour stays
|
||
the state machine underneath. Labs' **Run setup again** and
|
||
`hex onboarding reset` (macOS control socket, the Linux service socket,
|
||
and a named event on Windows) forget that onboarding finished
|
||
(`onboarding::reset_at`) and replay the first run without touching
|
||
settings, history, models, or permissions; ready steps pass at once. A new
|
||
install still gets the tour as its first run. Checks:
|
||
`labs_run_setup_again_opens_the_first_run` and
|
||
`run_setup_again_opens_the_first_run_on_linux_and_windows` in
|
||
[panes.rs](../../src/rune_ui/tests/panes.rs). Every OS reads the practice
|
||
dictation from the listener's event log (`rune_ui/practice.rs`). Not yet:
|
||
words flying into the field.
|
||
- Live text: a streaming dictation shows what you have said so far while
|
||
you dictate, as one click-through line just past the recording HUD (every
|
||
OS; see [Streaming Finish](dictation.md#streaming-finish)). Its toggle
|
||
is `labs.live_text` (off by default), read at launch. The
|
||
gate, `labs::live_text()`, is where the work starts: with it off, the engine gives a hotkey capture's
|
||
live stream no partial slot and never reads the model's text between
|
||
feeds, and no host adds the line's overlay. Each dictation's `finished
|
||
live stream` line in process.log counts its text changes (`partials`);
|
||
`RUST_LOG=hex=debug` adds a `live text` line per change with the audio
|
||
fed and the word counts, never the words. Checks:
|
||
`a_dictation_stream_publishes_its_text_after_each_feed_with_live_text`,
|
||
`without_live_text_a_dictation_stream_publishes_nothing`,
|
||
`each_dictation_stream_has_its_own_text`, and
|
||
`a_failed_feed_clears_the_text_and_stops_publishing` in
|
||
[transcription_engine.rs](../../src/transcription_engine.rs);
|
||
`live_text_follows_the_recording_and_never_outlives_it` in
|
||
[dictation.rs](../../src/dictation.rs); the three tests in
|
||
[live_text.rs](../../src/live_text.rs) (a recording's end clears only its
|
||
own text); `a_spot_places_the_plate_just_past_the_hud`,
|
||
`a_short_line_hugs_its_words_in_the_middle`,
|
||
`a_long_line_stays_inside_the_overlay_on_one_line`, and
|
||
`no_words_draw_nothing` in
|
||
[rune_ui/live_text.rs](../../src/rune_ui/live_text.rs), whose opt-in
|
||
`snapshots` renders the line in light and dark; and
|
||
`live_text_hangs_just_past_the_plate_wherever_it_sits` in
|
||
[hud_placement.rs](../../src/hud_placement.rs). The line has no golden
|
||
and no `--snap` scene (overlays have none), and nothing headless checks
|
||
how it appears and hides on screen.
|
||
- Playground: Rune's playground in the window (every OS), `labs.playground`
|
||
(off by default, read at launch). While on, a **Playground** sidebar item,
|
||
⇧⌘D (View › Playground on macOS), or Ctrl+Shift+D swaps the window for a list of
|
||
folded groups, nested by path:
|
||
|
||
```ts
|
||
Prototypes stories that aren't the window
|
||
├── Onboarding the options and First run
|
||
├── Meetings Live notes: a canned call's chapters and notes under a
|
||
│ draggable capsule, hidable, copied whole, new, or by
|
||
│ chapter (nothing real runs; live_notes.rs)
|
||
├── HUD (macOS) each placement × look × ending, Processing, Your voice + live HUD Lab Dot scope sliders & Save
|
||
└── Capture capsule (macOS) whole flow and each state × flow, notch, family
|
||
Window every macOS-window fixture scene by pane, under a readable name
|
||
├── General Settings, Microphone missing, Shortcut/…, Updates/…
|
||
├── Output, Modes … HUD Lab, Activity, Transcription model, Shortcut explainer, Onboarding tour
|
||
Linux & Windows the portal and Windows fixtures
|
||
```
|
||
|
||
Every group starts folded; opening a story, from the list or a link,
|
||
unfolds the groups above it, and folds hold until Hex quits. The list
|
||
keeps only its own keys (arrows, Return, J/K, a story's trigger letters,
|
||
Tab, Esc, `/` to filter) and ⇧⌘D; every other key, ⌘-chords and digits
|
||
included, reaches the open story. Each
|
||
story starts from a fresh fixture; the real window keeps running
|
||
underneath. While it is on, the window resizes everywhere (Linux and the
|
||
macOS tour otherwise keep one fixed size), so the stage beside the
|
||
playground's columns has room. Off, nothing is attached: no shortcut, menu item, or scene list.
|
||
Headless renders take `--playground [story]` while it is on, e.g.
|
||
`hex app -- --snap out.png --playground "Window/General/Settings"`. Checks: `every_scene_but_live_has_a_path_under_a_group`,
|
||
`the_playgrounds_keys_work_with_a_story_open`, and
|
||
`a_scene_opened_from_the_list_hears_command_digits` in
|
||
[playground.rs](../../src/rune_ui/playground.rs).
|
||
On macOS a story opens from a link or the CLI:
|
||
|
||
```ts
|
||
open 'hex://story/prototypes/hud/notch?variant=pulse-fail&play=1' // hex-test:// in Hex Test.app
|
||
open 'hex://story/prototypes/capture-capsule/suggestions?variant=toast'
|
||
hex window story Prototypes/HUD/Processing [--variant 2] [--play]
|
||
├── the window opens on the story: its path, name, or slug, `/` or `-` between groups and name
|
||
├── a link from before the groups nested (`hud/processing`, `General/mac-settings`, `mac-settings`) → that story now
|
||
├── variant=<n|name> → that variant
|
||
├── play=1 → its `r` trigger runs, as pressing R does
|
||
├── playground off → only the window opens; process.log says why, the CLI answers feature-off
|
||
└── another link, or longer than 2 KiB → ignored and logged
|
||
```
|
||
|
||
An unknown story opens the list and an unknown variant the story; Rune
|
||
logs which to stderr. Checks: `reads_story_links`, `links_from_before_the_list_nested_still_open_their_story`, `ignores_other_links`
|
||
in [story_link.rs](../../src/rune_ui/story_link.rs);
|
||
`every_hud_story_and_variant_opens_from_its_link` and
|
||
`every_capsule_story_and_flow_opens_from_its_link` in
|
||
playground.rs open every HUD and capsule link headlessly. The URL
|
||
handler and the replay have no automated end-to-end check.
|
||
- Voice Filter: the Voice Filter pane (macOS and Linux), the only home of
|
||
the Hex Microphone (macOS's driver, Linux's PipeWire virtual source), its
|
||
filter modes, and Try it
|
||
([Hex Microphone](README.md#experimental-hex-microphone-and-voice-filter)).
|
||
Its toggle is `experimental.hex_microphone` (off by default). Off, the pane
|
||
is hidden and Hex neither reads the driver's status nor starts its sink
|
||
supervisor. While the driver is installed the Voice Filter runs (apps using
|
||
the Hex Microphone keep their audio), its pane shows, and its Labs row is
|
||
on and disabled: "On while the Hex Microphone driver is installed.
|
||
Uninstall the driver in Voice Filter to turn it off." Checks:
|
||
`voice_filter_shows_only_while_its_labs_toggle_is_on` and
|
||
`an_installed_driver_keeps_the_voice_filter_on` in
|
||
[panes.rs](../../src/rune_ui/tests/panes.rs);
|
||
`the_setting_or_an_installed_driver_turns_the_voice_filter_on_and_labs_never_does`
|
||
in [app_settings.rs](../../src/app_settings.rs).
|
||
- Meetings (beta): see [Meetings](meetings.md). Its toggle is
|
||
`meetings.enabled`; on, Meetings is a top-level sidebar item (debug builds
|
||
keep it available regardless).
|
||
- Vocabulary biasing: Parakeet transcription biased toward the
|
||
[vocabulary](vocabulary.md) (`transcribe_cpp::RunExtension::ParakeetVocabulary`),
|
||
the request behind issue 452 / PR 457. Off (the default),
|
||
`vocabulary::transcription_bias` returns nothing, so no run or stream takes
|
||
the list; rewriting and search still use it, and the Vocabulary sheet says
|
||
so.
|
||
- Terminal paste (Windows): paste with Ctrl+Shift+V instead of Ctrl+V for
|
||
apps that ignore a synthetic Ctrl+V (issue 477 / PR 478). Its toggle is the
|
||
shared `paste_with_shift`; Linux keeps it as a General › Advanced row.
|
||
|
||
Checks: `labs_is_one_flat_list_of_toggles_off_by_default`,
|
||
`contributed_options_are_labs_toggles_off_by_default`,
|
||
`the_browser_labs_toggle_turns_on_and_asks_for_system_audio`,
|
||
`keyboard_model_switching_is_a_labs_toggle_wherever_layouts_are_observable`,
|
||
`voice_filter_shows_only_while_its_labs_toggle_is_on`, and
|
||
`an_installed_driver_keeps_the_voice_filter_on` in
|
||
[panes.rs](../../src/rune_ui/tests/panes.rs);
|
||
`every_feature_is_off_by_default_and_round_trips` and
|
||
`the_old_master_switch_is_read_and_ignored` in [labs.rs](../../src/labs.rs);
|
||
`labs_parse_as_a_read_command` in [main.rs](../../src/main.rs);
|
||
`status_reads_for_a_person` and
|
||
`status_reports_labs_and_reads_older_replies_without_it` in
|
||
[control/cli.rs](../../src/control/cli.rs);
|
||
`every_persisted_setting_has_a_cli_key` in
|
||
[control/settings.rs](../../src/control/settings.rs). Passed on Linux on
|
||
2026-10-30; the macOS build was not checked, and the Windows build was
|
||
type-checked only.
|