Skip to content

fix(dictation): tell the user why the dictation key does nothing without Accessibility - #404

Merged
GeiserX merged 4 commits into
mainfrom
fix/dictation-accessibility-honest
Oct 12, 2026
Merged

GeiserX merged 4 commits into
mainfrom
fix/dictation-accessibility-honest

Conversation

@GeiserX

@GeiserX GeiserX commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Problem

Option+Space did nothing and nothing on screen said why. GET /v1/dictation reported grants.accessibility: denied and swallow_keys: false while System Settings showed akou on. The helper logged no-tap: Accessibility is not granted at every start, the app showed nothing, and akou doctor printed unknown. The row was stale from a re-sign: switching it on did nothing. The fix on the machine was tccutil reset Accessibility io.github.geiserx.akou, a relaunch, and switching the fresh row on.

The helper only ever asks with the non-prompting AXIsProcessTrusted, so macOS never showed its dialog, and akou was not always in the pane's list.

Fix

  • Ask once per install. On a ready from the macOS helper that reports Accessibility denied, the app sends a new ask_accessibility command and writes a marker file in the dictation folder, so it never sends it twice. The helper answers with AXIsProcessTrustedWithOptions and kAXTrustedCheckOptionPrompt. That shows the dialog and lists akou in the pane. The fake helper and the simulate backend only record the command, so no test shows a dialog.
  • Say it. While dictation is on and the grant is denied, the Dictation page shows Dictation is off: allow akou under Accessibility above every panel. It has an Open Accessibility settings button and the recovery for a stale row: switch akou off and on, or remove it and add it back. akou cannot read TCC, so the recovery is a hint. The page reads the grant every 2 s and the line goes once the grant is given. The island shows the same line with no time limit until the grant arrives or its button is clicked.
  • akou doctor reads the microphone and Accessibility from the running app's GET /v1/dictation, never launching it, instead of printing unknown.

Trap [T4.36] in docs/TRAPS.md; DC-N3, the protocol table and the testing rules in docs/ux/DICTATION.md are updated.

Tests

  • tests/dictation-a11y-denied.test.ts: over two starts of the fake helper the ask is sent once and never again; there is no ask with the grant given or on a non-macOS backend; the island shows the line and drops it when the grant arrives or the button is clicked; the controls with the grant given, unknown, or off macOS show nothing; akou doctor reads denied and granted from a fake API.
  • tests/ui/dictation-notices.test.ts: the page line, its button and its going away once granted, with a control for the grant given or dictation off. The line also fits the island.
  • Rust: t4_36_only_ask_accessibility_prompts, plus the shared app-lines fixture.

Each new guard was mutated and its test went red.

Not verified: the dialog itself on a real Mac.

…enied

With dictation on and the macOS helper reporting Accessibility denied there is
no key tap, so the dictation key does nothing. The helper only ever asked
without prompting, akou was not always in the pane's list, nothing on screen
said why, and akou doctor printed unknown. A row granted to an earlier build
reads on in System Settings while macOS denies it, so switching it does nothing.

- The app sends ask_accessibility once per install (a marker file in the
  dictation folder) on a ready that reports the grant denied; the macOS helper
  answers with AXIsProcessTrustedWithOptions and the prompt, which shows the
  dialog and lists akou. The fake and simulate backends only record it.
- The Dictation page and the island say "Dictation is off: allow akou under
  Accessibility" with the pane's button and the stale-row recovery until the
  grant arrives.
- akou doctor reads the microphone and Accessibility from the running app's
  GET /v1/dictation instead of printing unknown.

Trap T4.36.
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 13 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: GeiserX/akou/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 14824a18-4e87-45bf-b09d-d9affac39238
📥 Commits

Reviewing files that changed from the base of the PR and between aac9551 and 8bde67c.

📒 Files selected for processing (23)
  • docs/TRAPS.md
  • docs/ux/DICTATION.md
  • native/akou-capture/src/dictate/fake.rs
  • native/akou-capture/src/dictate/insert.rs
  • native/akou-capture/src/dictate/mac.rs
  • native/akou-capture/src/dictate/protocol.rs
  • native/akou-capture/src/dictate/session.rs
  • scripts/fake-helper.ts
  • src/main/cli/commands/doctor.ts
  • src/main/cli/grants.ts
  • src/main/dictation/protocol.ts
  • src/main/dictation/service.ts
  • src/main/dictation/session.ts
  • src/main/window/pill.ts
  • src/main/window/shell.ts
  • src/ui/dictation-page.ts
  • src/ui/pill-protocol.ts
  • src/ui/pill.ts
  • tests/cli-p1.e2e.test.ts
  • tests/dictation-a11y-denied.test.ts
  • tests/dictation-protocol.test.ts
  • tests/fixtures/akou-dictate/app-lines.jsonl
  • tests/ui/dictation-notices.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The full stale-row hint wrapped the sheet to 212 px against the 200 px window in
CI. The island now carries a short form; the Dictation page and doctor keep the
long one.
Since T4.36 an unknown microphone or Accessibility grant reads as the running
app reports it, and the test app's fake helper reports both given, so a plain
--grant asks for system audio first.
@GeiserX
GeiserX merged commit 367e341 into main Oct 12, 2026
29 checks passed
@GeiserX
GeiserX deleted the fix/dictation-accessibility-honest branch October 12, 2026 22:48
GeiserX added a commit that referenced this pull request Oct 14, 2026
GeiserX added a commit that referenced this pull request Oct 14, 2026
… line comes in about a second (#410)

I want to see my Mac's old recordings and transcripts from my iPhone, the way the desktop app shows them, with what each key may see set by its permissions. 1.1.0 could not do that: a key reached only its own file jobs and the desktop app listened on 127.0.0.1 alone. 1.2.0 is the release that carries #409, so the phone app can read the Mac over the tailnet with a `read` key, and the six post-1.1.0 merges that were already owed a release.

## What 1.2.0 carries

- #409: the `read` key scope, the opt-in network listener (`network.enabled`, `network.bind`, `network.port`, tailnet by default with a 30 s look until Tailscale is up), and `a0`/`a1` audio offsets on transcript lines.
- #406: a default call's first line in 1.3 s instead of 6 to 8 s, `asr.warmAtStart` off by default.
- #405: no invented subtitles on silence and noise, on every preset (T4.37).
- #404: the dictation key says why it does nothing without Accessibility (T4.36).
- #403: `akou events --mention`, `agent.summary_every_minutes`, `akou config get`.
- #402: an idle model's memory back after 10 minutes.
- #401: one recognizer cache and one audio cache shared by the three OSes.

## The release itself

- `bun scripts/stamp-version.ts --set 1.2.0`: every version declaration says 1.2.0 (package.json, app-info.ts, both skills, the plugin, the OpenAPI file, the compose example, both Cargo.toml and Cargo.lock). The docs' image tags and the Mac server clone tag say 1.2.0.
- The CHANGELOG's Unreleased section becomes the 1.2.0 section, with the six other merges written in.
- docs/providers.md: the vendor terms were read again on 2026-10-13, as CI-28 requires after the 1.1.0 tag of 2026-10-12. Nothing changed in the terms. One thing the earlier readings had missed is recorded: OpenAI documents "ChatGPT plan usage for open-source and locally hosted apps" through Sign in with ChatGPT, where the app holds its own OAuth token. It says nothing about akou's route, `codex exec` on Codex's saved login, so the open question stays open with that alternative beside it. No default changes.

## Checks

- `bun scripts/stamp-version.ts --check`: 11 places say 1.2.0. `bun scripts/openapi.ts --check` is clean.
- `bun test tests/release-evidence.test.ts`: 10 pass. The terms check was shown red with the new row redated to 2026-10-12 and green with 2026-10-13.
- The 8-hour soak of the release checklist ran on the reference Mac (MacMini-2) from 23:40Z to 07:40Z on 2026-10-13/14 at real time, with a burner on every core and the release's own `akou-capture` 1.2.0 in file mode: 0 holes, heap growth 0.17 MB, RSS growth -2.3 MB, event loop late by at most 227 ms, 0 unreadable log lines, 9 of 9 checks ok. The JSON is committed as docs/gates/soak-1.2.0.json. Trap found on the way: on that box `CARGO_TARGET_DIR` sends the helper to /Volumes/Data/cargo-targets, so the checklist's `native/akou-capture/target/release/akou-capture` path was a stale 1.0.0 binary; the first start was killed after two minutes and the soak restarted with the binary cargo reports.
- After the merge: tag `v1.2.0` on the merge commit, then release.yml builds the signed app, the images and the update feed.
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