Evolve BLE tab into Connection tab with default-layer and OS-detection support#90
Open
cormoran wants to merge 4 commits into
Open
Evolve BLE tab into Connection tab with default-layer and OS-detection support#90cormoran wants to merge 4 commits into
cormoran wants to merge 4 commits into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Also fix inverted isOpen flags in the demo BLE profile fixtures so paired profiles (MacBook Pro, iPad) show as paired in demo mode. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…n UI Renames BLEConnectionsPage to ConnectionPage and extends it with a status strip, USB card, per-profile OS override and default-layer selects, and a per-OS default layers section. Each section degrades gracefully when its subsystem is unavailable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🚀 Cloudflare Workers PreviewPreview URL: https://137e6cf6-dya-studio.cormoran707.workers.dev Deployed from commit 8b0b358 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Renames the BLE tab to Connection (
IconPlugConnected, tab idconnection) and extends it to integrate three ZMK modules:cormoran_blecormoran__os_detectioncormoran__default_layerUI sections (top to bottom)
Auto / Windows / macOS / Linux / iOS / Android, with adetected: Xcaption when overridden) and a default-layer select (Unset / OS detection / <layer names>).Graceful degradation
Every subsystem is optional and every section renders only if its subsystem exists, with per-section hints instead of a full-page block:
os_detection_available=false) → per-OS selects disabled with a hint linking zmk-feature-os-detection.zmk_os(default-layer proto) and the os-detection proto enum (protoOs = zmkOs + 1) is centralized insrc/lib/osDetection.ts.Implementation
proto/cormoran/{os_detection,default_layer}/with committed buf-generated code insrc/proto/.useOsDetection(auto-load + 5s poll, no notifications in firmware),useDefaultLayer(set responses carry full state, applied directly without refetch),useLayerNames(lightweight keymap-name fetch).OsBadge,LayerSelect.demo-os-detection.ts/demo-default-layer.tshandlers registered indemo.ts, so the demo UI is fully interactive; also fixed invertedisOpenflags in the demo BLE fixtures.t()with Japanese translations.Test coverage
useOsDetection/useDefaultLayerhook tests: encode/decode, sentinel handling (-1/-2), set→state update semantics, 5s polling and cleanup on unmount.mergeConnectionCardsunit tests covering all subsystem-availability combinations and label priority.ConnectionPagetests (17): carried-over BLE behaviors (switch/unpair/rename with 31-char limit), status strip, OS override firingSetBleOverridewith the correct enum, per-OS selects disabled whenos_detection_available=false, USB card, and BLE rows derived without ble-management.npm run lint,npm test(27 suites, 234 passed / 1 pre-existing skip), andnpm run buildall pass. Manually verified in demo mode: all sections render and select changes round-trip through the demo handlers.🤖 Generated with Claude Code