Skip to content

Show recorder and save failures where you are, and make the shortcut, section and reference controls keyboard-friendly. - #101

Merged
dillonstreator merged 6 commits into
mainfrom
fix/error-states-a11y
Nov 28, 2026
Merged

dillonstreator merged 6 commits into
mainfrom
fix/error-states-a11y

Conversation

@dillonstreator

Copy link
Copy Markdown
Member

Summary

Renderer error states and keyboard access from the 2026-11-28 audit: LYRA-UX-001, LYRA-UX-002, LYRA-UX-003, LYRA-UX-004, LYRA-A11Y-001, LYRA-A11Y-002.

What was wrong

  • Raw IPC error text (UX-001). Starting or finishing a recording, saving a voice and naming a speaker could show "Error invoking remote method 'whisper:warmUp': Error: …".
  • Recorder problems hidden away from the session (UX-002). If you started a meeting and went to Home or People, losing the mic or computer audio, or a full disk, showed nothing until you reopened the session.
  • A refused edit got one easy-to-miss notice (UX-003). It raised a single polite toast for 6 seconds, once per session. Later failures were silent.
  • Wrong announcement for a recording that never started (UX-004). With mic access denied, screen readers heard "Recording stopped".
  • The shortcut button hid its value (A11Y-001). Its accessible name was "Change shortcut", without the shortcut it shows. Tab was swallowed while it listened, trapping the keyboard until Esc.
  • Mouse-only actions (A11Y-002). The section heading's menu (Reference in notes, Play, Copy) and following a reference chip in the notes needed a mouse.

What changed

  • ipcErrorMessage is used at the four call sites, with a plain fallback. Mic errors keep their own wording.
  • App renders the recorder's messages (DictationMessage, SystemAudioMessage) in the Home/People toast stack as well as the session's.
  • usePages exposes saveFailed. The session view shows a role="alert" line until it's dismissed or the next edit lands. The one-off toast is gone. (Disk-write failures in main get their own Activity row in Keep a session's changes until they are saved, and never delete recordings on an unreadable setting. #99. This PR covers edits that main refuses over IPC.)
  • phaseAnnouncement('starting', 'idle') is now "Recording cancelled". The existing assertion for that case moved to listening → idle, and a new case covers starting → idle.
  • HotkeyInput:
    • Takes a label. Its name is "Session shortcut: . Change", or "Session shortcut: press a shortcut, or Esc to cancel" while it listens. The name helper is shortcutButtonLabel in lib/keys.ts.
    • Tab or Shift+Tab ends listening and moves focus.
  • Transcript section headings take focus (tabIndex=0, aria-haspopup="menu"). They open their menu with Shift+F10 or the menu key, using the same double-open guard the lines use.
  • NotesEditor: Ctrl+Enter (⌘↩) with the caret on a reference follows it. Elsewhere it still inserts a hard break.

How it was tested

  • pnpm install --frozen-lockfile: OK.
  • pnpm check in apps/lyra (typecheck, lint, config:check, vitest): 86 files, 649 tests pass (646 on main).
  • New tests: keys.test.ts (the shortcut name contains the visible text and says how to cancel) and status.test.ts (a start that never happened is "cancelled").
  • The repo has no React test setup, so the hook and component changes have no unit tests. Adding one would mean a new dependency.
  • Not run: pnpm smoke:ui (it launches Electron; CI runs it).

I couldn't verify the UI changes visually. Please click through:

  1. Start a recording with computer audio on, go Home, and unplug the mic or block computer audio. The message should appear on Home.
  2. Make main refuse an edit (for example, delete the session's folder while it's open, or force sessions:edit to throw). A red line should stay in the session until you dismiss it or the next edit saves.
  3. With VoiceOver or NVDA, go to Settings → Shortcut: the name should include the shortcut. Click it, then press Tab: focus should move on.
  4. In a sectioned transcript, Tab to a section heading: there should be a focus ring, and Shift+F10 (or the menu key) should open its menu. Check the menu doesn't open twice on Windows.
  5. In the notes, put the caret inside a § reference and press Ctrl+Enter or ⌘↩. It should jump to the line. Elsewhere it should insert a line break.
  6. Deny mic access and press Record. You should hear "Recording cancelled".

For the reviewer to decide

  • Each section heading is now its own Tab stop inside the transcript. If that's too many stops, the section's items could go in the first line's menu instead.

Left out

  • UX-005 (Open Settings on a mic-denied error): DictationMessage gets only a string. Knowing which error it is would mean threading an error kind through useDictation and capture, which is bigger than a small fix.
  • A11Y-003 (hoverable tooltips): this changes pointer behaviour, and I can't check it without running the app.
  • A11Y-004 (reduced-motion meter): Info level, and it's arguably essential feedback.
  • PR Name speakers from what was said, with the notes model. #98: Transcript.tsx changes are at the speaker picker's error line and the section headings. They are outside Name speakers from what was said, with the notes model. #98's hunks.

Checks

  • pnpm typecheck (and the rest of pnpm check)
  • Changeset added (.changeset/error-states-keyboard.md, patch)
  • pnpm smoke:ui: not run locally (CI runs it)
  • Stays local-first

…warning on screen.

- A recording keeps going when its session is left; the lost-mic, computer-audio and
  recorder errors now show in Home and People's toast stack too.
- An edit main refused used to raise one 6-second polite toast per session, then nothing.
  The session now keeps a role="alert" line until it's dismissed or an edit lands.
…, voice and speaker errors.

- Starting or finishing a recording, saving a voice and naming a speaker showed main's error
  with the IPC wrapper; they now go through ipcErrorMessage, as About and Settings do, with a
  plain fallback.
…ve it while it listens.

- Its accessible name was "Change shortcut", hiding the value it shows; it is now
  "Session shortcut: <shortcut>. Change", and "press a shortcut, or Esc to cancel" while
  listening.
- Tab used to be swallowed while listening, trapping the keyboard until Esc.
…board.

- Section headings are focusable and open their menu (reference in notes, play, copy) with
  Shift+F10 or the menu key, as transcript lines do.
- Ctrl+Enter (Cmd+Enter on macOS) on a reference chip in the notes jumps to its line; elsewhere
  it still inserts a line break.
@vercel

vercel Bot commented Nov 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
lyra Ready Ready Preview Nov 28, 2026 7:20pm UTC

@dillonstreator
dillonstreator merged commit 35d5d21 into main Nov 28, 2026
13 checks passed
@dillonstreator
dillonstreator deleted the fix/error-states-a11y branch November 28, 2026 20:32
@adavila0703 adavila0703 mentioned this pull request Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant