Repository navigation
Mapper: a save that declines says so; captured media keys map to Kanata names - #1326
Conversation
…ta names The overlay Mapper saves on capture and has no Save button, yet it never rendered the view model's status message and the save path's early returns did not log — so a declined save looked like a mapping that vanished (seen on the Air, 2026-10-20: a ` → mute rule disappeared with nothing in the log). The overlay now shows the status under the keycaps; autosave logs why it skipped and reports a missing runtime coordinator as an error; save logs each early return and the rule it is about to write. KeyMappingFormatter also mapped no media names, so a captured volume or brightness key reached the generator as "volumeup" and would have been typed as letters. The names KeyboardCapture assigns now map to the Kanata names the session posts. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Review (diff only) Overall looks good: the autosave paths now surface a status message and log instead of silently returning, and the overlay shows it. A few points worth a look:
No blocking correctness bugs found in the diff itself. 🤖 Generated with Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 45ac7ecb15
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Media keys as `KeyboardCapture.mediaKeyCodeToString` names them, to | ||
| // the Kanata names the session can post (phase 6). Fast-forward, | ||
| // rewind and keyboard backlight have no Kanata name and stay as is. |
There was a problem hiding this comment.
Handle the media names emitted by real F7/F9 presses
On Apple keyboards, F7/F9 media-mode presses arrive as rewind and fastforward (KeyboardCapture.mediaKeyCodeToString handles codes 20/19), not previous and next. Leaving those names unchanged means an output captured from these common keys reaches ConfigurationService.convertToKanataSequence, which treats the unknown multi-character token as a text macro, so the saved mapping types “rewind” or “fastforward” instead of controlling playback. Translate them to prev/next, or reject them explicitly rather than allowing a wrong rule to save.
Useful? React with 👍 / 👎.
Found during the phase 6 hardware check on the Air: a
`→ Mute rule captured in the overlay Mapper disappeared with nothing on screen and nothing in the log.Why it was silent
viewModel.statusMessage(only set it), so every refusal, "nothing to save" and failed save was invisible.autosaveCapturedMappingandsavereturned early without logging.What changes
overlay-mapper-status), red for errors.savelogs each early return and the rule it is about to write.KeyMappingFormatter.keyNameMapmaps the media namesKeyboardCaptureassigns (volumeup,playpause, …) to the Kanata names the session posts (volu,pp, …). Before this a captured volume key reached the generator asvolumeupand would have been typed as letters (the generator-unknown-names card covers the general case).Tests
MapperAutosaveVisibilityTests(no coordinator → visible error; identity and missing-capture declines carry a message),MapperKanataFormatTests.testCapturedMediaKeysBecomeKanataMediaNames;AdmissionEnvironmentTestsupdated to the mapped name.KEYPATH_TEST_ENFORCE_CLEAN_SUMMARY=1 Scripts/run-tests-safe.sh: 5,784 passed, 0 app warnings/errors, 0 build warnings.check-accessibility.pyclean.🤖 Generated with Claude Code