Hide the green lock for all encrypted devices in compact views#745
Hide the green lock for all encrypted devices in compact views#745bdraco wants to merge 1 commit into
Conversation
e603efe to
dd4c67c
Compare
|
|
esphbot
left a comment
There was a problem hiding this comment.
No blocking issues found.
The device list/cards and the detail drawer derived the encryption lock through separate code, so a confirmed-encrypted device showed no lock in the list but a green badge in the drawer. Suppress the lock for every active state in compact views and feed the drawer badge from the same VISUALS source so the two can't drift.
dd4c67c to
f58ab8f
Compare
|
Tightened |
Correct split. |
PR Review — Hide the green lock for all encrypted devices in compact viewsClean, well-scoped bugfix; merge-ready, no blocking issues.
Checklist
Automated review by Kōan (Claude) |
esphbot
left a comment
There was a problem hiding this comment.
No blocking issues found.
There was a problem hiding this comment.
Pull request overview
Aligns encryption-state visuals between compact device listings (table rows/cards) and the device detail drawer by centralizing the drawer badge rendering on the shared VISUALS mapping, while hiding the “healthy/active encrypted” lock indicator in compact views for all encrypted-active devices (including YAML-encrypted but not yet mDNS-confirmed).
Changes:
- Extend
EncryptionVisualwith drawer badge metadata (badgeClass,labelKey) and source drawer rendering fromgetEncryptionVisual()to prevent drift between views. - Change
getCompactEncryptionVisual()to returnnullfor all"active"encryption states, so compact views only surface attention states (plaintext/pending/mismatch). - Update and strengthen unit tests to validate the expanded visual contract and the new compact-view behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/util/encryption-state.test.ts | Updates tests to assert new EncryptionVisual fields and the “hide lock for all active” compact-view behavior. |
| src/util/encryption-state.ts | Adds badge/label metadata to the shared visual map and changes compact-view logic to hide all "active" states. |
| src/components/device-card/render-bits.ts | Updates compact-view comment to match new behavior (no functional change). |
| src/components/dashboard/table-columns.ts | Updates compact-view comment to match new behavior (no functional change). |
| src/components/dashboard/device-drawer-content/render-sections.ts | Refactors drawer encryption badge rendering to use getEncryptionVisual() + shared VISUALS mapping. |
What does this implement/fix?
The green encryption lock showed in the device detail drawer but not in the device list for confirmed-encrypted devices, so the two views disagreed. The list and the drawer were deriving the lock through separate code paths, and the list only hid the lock for mDNS-confirmed devices; YAML-encrypted-but-unconfirmed ones still showed it, which read as random.
Now the compact views (table rows, cards) hide the lock for every encrypted (active) device, so the list shows only attention states (plaintext, pending, mismatch). The drawer still shows the full encrypted badge for single-device inspection, and it now reads from the same VISUALS source the list uses so the two can't drift apart again.
Related issue or feature (if applicable):
Types of changes
bugfixnew-featureenhancementbreaking-changerefactordocsmaintenancecidependenciesChecklist
npm run lintpasses.npm run testpasses.