Skip to content

Labs: Vocabulary menu in the macOS menu bar - #2550

Merged
thdxr merged 1 commit into
devfrom
menu-vocabulary
Nov 23, 2026
Merged

thdxr merged 1 commit into
devfrom
menu-vocabulary

Conversation

@thdxr

@thdxr thdxr commented Nov 23, 2026

Copy link
Copy Markdown
Member

Adds a macOS Labs toggle (Dictation group, off by default) that adds Vocabulary ▸ to the menu-bar menu directly after Speech Model ▸. Off, the row is hidden and the menu is exactly unchanged.

With it on:

  • Add term… opens Settings with the Vocabulary sheet open and a new focused blank term row at the end, which the list glides to. An empty list already opens with one focused blank row, so no second row is made. It saves through the sheet's existing draft path.
  • The last five persisted terms, newest first, as disabled informational rows on one line each (whitespace collapsed and cut like other menu titles). The separator and rows are left out while the list is empty.
  • Open vocabulary… opens the Vocabulary sheet.

The submenu is rebuilt as the menu opens from dictation::vocabulary::entries(), only while labs::vocabulary_menu() is on; the row is hidden otherwise.

Tests added:

  • vocabulary_lists_the_last_five_terms_newest_first (macos_rune/status_item.rs, macOS only): newest-first order, five-term cap, truncation, empty list, and item titles.
  • the_vocabulary_menu_is_a_macos_dictation_lab_off_by_default (labs.rs): descriptor, Dictation group, macOS only, off by default.
  • adding_a_term_from_the_menu_opens_the_sheet_with_one_blank_row_last and adding_a_term_to_an_empty_list_opens_the_one_blank_row_it_made (rune_ui/vocabulary.rs).
  • The status-item row-order test covers the new row; i18n tests cover every new string in every language; the mac-labs* goldens are regenerated.

Check macOS on 3633ac5: https://github.com/anomalyco/hex/actions/runs/45231540095 — success.

Closes #2540

Labs › Vocabulary menu, off by default, adds Vocabulary ▸ right under
Speech Model ▸: Add term… opens Settings' Vocabulary sheet with a new
focused row at its end, the last five saved terms list newest first as
disabled informational rows, and Open vocabulary… opens the sheet. Off,
the row is hidden and the menu is exactly as before.

requested in #2540
@thdxr
thdxr merged commit 9e9ce59 into dev Nov 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Menu bar: quick-add a Vocabulary term (Labs)

1 participant