Repository navigation
Overlay Mapper: rendered status test, wiring lint, capture→save end to end - #1327
Conversation
…o end The hardware check found a declined save that nothing showed and nothing logged; the engine's tests could not see it because they assert on the model. Three layers now cover the overlay seam: MapperStatusLine (extracted from OverlayMapperSection) is rendered for real and must draw a message, draw errors in red and draw nothing for nil; a lint keeps the overlay reading viewModel.statusMessage and keeps save() from returning without a status and a log line (it immediately found the unlogged app-specific failure path, fixed here); and MediaKeyCaptureToSaveTests drives a synthesized system-defined Mute/volume/brightness/play event through KeyboardCapture (now a pure `mediaKeyPress(from:)` seam) → Mapper → save → generated config against the real bridge. SwiftUI publishes no accessibility tree in-process, so the rendered test rasterizes rather than reading text; appearance stays with the opt-in snapshot target. 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 of the diff only. No blocking correctness issues in the production changes: the
|
Follow-up to #1326. The hardware check found a declined save that nothing showed and nothing logged; the engine's tests assert on the model, so they could not see it. This covers the overlay seam in three layers:
MapperStatusLine(extracted fromOverlayMapperSection, identical output) is hosted for real: a message takes space and draws glyphs, an error draws in red, nil draws nothing. SwiftUI publishes no accessibility tree in-process (verified: a windowed host exposes one emptyAXGroup), so the test rasterizes rather than reading text; exact appearance stays with the opt-in snapshot target.OverlayMapperStatusLintTests): the overlay must renderviewModel.statusMessage, and every earlyreturninMapperViewModel.savemust be preceded by a status and a log line. It immediately caught the app-specific save failure path, which had a status but no log — fixed.MediaKeyCaptureToSaveTests): a synthesized system-defined event (Mute, Volume Up, Brightness Up, Play/Pause) goes throughKeyboardCapture.mediaKeyPress(from:)(new pure seam, same logic) →MapperViewModel→save→ generated config against the real bridge; asserts the stored rule is the Kanata key and the config never contains(macro.Doc note in rules-admission-review.md.
KEYPATH_TEST_ENFORCE_CLEAN_SUMMARY=1 Scripts/run-tests-safe.sh: 5,791 passed, 0 app warnings/errors, 0 build warnings.check-accessibility.pyclean.🤖 Generated with Claude Code