forked from Blendman974/faceclaw
Address review findings for the proximity-pairing PR
Correctness: - Pair-glasses flows no longer strand the app in the manual-disconnected state: the pre-scan disconnect is followed by resumeAutoReconnect(), and the config page's scan hand-off drops the live link too. - The mixed-arms serial warning is reachable now: pairs() groups by the canonical serial key, and a lone left + lone right with different serials get the mismatch warning on both rows (it previously required two different serials inside one serial-keyed group, which cannot happen). - A selected pair that degrades to one arm (prune while the page is open) is deselected, and Save never pads a missing arm from stored addresses. - DiscoveryAggregator.ingest no longer lets a bonded re-emit or split advertisement overwrite the note/name/flag learned from a full advertisement, and reclassifies split reports using remembered fields so a nameless half doesn't drop the arm. - estimateProximity ignores the advertised TX Power Level (radiated power, not measured-power-at-1m); the calibration table is the only reference. - Saving a ring without a glasses pair updates the stored identity's ring name/address instead of leaving the previous ring on record. - Ring detection requires the stock "EVEN R1" name prefix in both the TS classifier and the Java pre-filter; a bare "R1" substring matched unrelated devices, and ring rows are always selectable. - One-shot scans keep every sample (buildAddressSet merges them through DiscoveryAggregator), and flash-flow address resolution takes left/right from one serial-joined complete pair instead of latest-per-role. Lifecycle: - The pairing scan and its refresh timer pause on app suspend and resume with the app, and the model's app-event hooks are detached when the page is left for good. Cleanup: - One MAC normalizer (even-advertisement.normalizeMacAddress, re-exported by device-addresses), used for the ring "Yours" comparison too. - One serial-equality definition (serialKey/serialsMatch); the containment fallback in isPreviouslyPaired is gone. - Shared formatErrorMessage replaces five per-view-model copies; shared hex-util replaces the duplicate TS hex codecs; one Java bytesToHex in FaceclawFirmwareUtil replaces three hand-rolled encoders. - glassesRow/ringRow share a presentation-base helper; dead row address fields, the constant glassesSectionVisibility, the identical-branch status ternary, and zoneRank/ZONE_ORDER are removed. - .gitignore now actually covers .test-build/ as tests/README claims. UI: - Dark-mode styles for the pairing page: readable instructions, dark-gray cards with consistent light text; light mode keeps its current look. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ZqzwmRQ3HQxasBz5rYyZV
This commit is contained in:
1 parent
ee022cdc84
commit
17182532f4
24 files changed
+537
-250
No files matched your search
+80
@@ -109,6 +109,7 @@ Button.-primary {
|
||||
.pairing-title {
|
||||
font-size: 16;
|
||||
font-weight: bold;
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
.pairing-badge {
|
||||
@@ -182,3 +183,82 @@ Button.pairing-link {
|
||||
font-size: 14;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Dark-mode pairing page. The cards keep their light-mode look above; here
|
||||
* they go dark-gray, and every text colour set above gets a light counterpart
|
||||
* so nothing renders dark-on-dark (the instructions) or dark-on-a-dark-card.
|
||||
* Order matters: the -selected/-incomplete rules must follow .pairing-row so
|
||||
* they win at equal specificity.
|
||||
*/
|
||||
.ns-dark .pairing-instructions {
|
||||
color: #b0b0b0;
|
||||
}
|
||||
|
||||
.ns-dark .pairing-empty {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.ns-dark .pairing-row {
|
||||
background-color: #2e2e2e;
|
||||
border-color: #4a4a4a;
|
||||
}
|
||||
|
||||
.ns-dark .pairing-row-selected {
|
||||
background-color: #333c4c;
|
||||
border-color: #5b8def;
|
||||
}
|
||||
|
||||
.ns-dark .pairing-row-incomplete {
|
||||
background-color: #282828;
|
||||
border-color: #3c3c3c;
|
||||
}
|
||||
|
||||
.ns-dark .pairing-title {
|
||||
color: #f0f0f0;
|
||||
}
|
||||
|
||||
.ns-dark .pairing-badge {
|
||||
color: #a8c4f5;
|
||||
background-color: #2a3b5e;
|
||||
}
|
||||
|
||||
.ns-dark .pairing-variant {
|
||||
color: #cccccc;
|
||||
}
|
||||
|
||||
.ns-dark .pairing-proximity {
|
||||
color: #a0a0a0;
|
||||
}
|
||||
|
||||
.ns-dark .pairing-proximity-immediate {
|
||||
color: #7da7f5;
|
||||
}
|
||||
|
||||
.ns-dark .pairing-serial {
|
||||
color: #a0a0a0;
|
||||
}
|
||||
|
||||
.ns-dark .pairing-arms {
|
||||
color: #c0c0c0;
|
||||
}
|
||||
|
||||
.ns-dark .pairing-warning {
|
||||
color: #e08a66;
|
||||
}
|
||||
|
||||
.ns-dark .pairing-swatch-label {
|
||||
color: #aaaaaa;
|
||||
}
|
||||
|
||||
.ns-dark .pairing-chevron {
|
||||
color: #bbbbbb;
|
||||
}
|
||||
|
||||
.ns-dark .pairing-selection {
|
||||
background-color: #2e2e2e;
|
||||
}
|
||||
|
||||
.ns-dark Button.pairing-link {
|
||||
color: #7da7f5;
|
||||
}
|
||||
Reference in new issue
Block a user