mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-06-04 07:51:20 +00:00
d00ba91b1a
## Summary Adds a customizer checkbox that toggles `localStorage["channels-show-encrypted"]` — the read-gate that controls whether `/api/channels` is fetched with `?includeEncrypted=true`. Today operators can only flip that gate from DevTools; this PR gives them the obvious affordance. Default behavior is unchanged: key remains unset → server filters encrypted entries → ~19 channels rendered. Toggle ON sets the key to `"true"` → fetch grows to ~265 with `Encrypted (0xAB)` entries. ## Behavior - **Display tab → new "Channels" subsection → "Show encrypted channels" checkbox.** - ON writes `localStorage["channels-show-encrypted"] = "true"`. - OFF *removes* the key (never writes `"false"`) so the read-gate cleanly returns false and the customizer match-default detection still works. - Toggling dispatches `mc-channels-show-encrypted-changed`; `channels.js` listens and re-fetches via `loadChannels()` — no page reload. - Tooltip / hint copy: "Encrypted channels appear as 'Encrypted (0xAB)' with no name. Operators usually leave this off." ## TDD `test-issue-1454-channels-toggle.js` — source-grep invariants: - Red commit `feb9dcee`: assertions on customizer + listener — failed (production code not yet present). - Green commit `d8742f2c`: production patch — passes. Read-gate at `public/channels.js:1564` is left untouched; the test asserts it. ## Out of scope - Migration of legacy localStorage values into customizer overrides (no override store needed — we keep using the raw localStorage key as the single source of truth). - Per-region toggle. - Decryption key UI. Closes #1454 --------- Co-authored-by: openclaw-bot <bot@openclaw.local>
51 lines
1.8 KiB
Bash
Executable File
51 lines
1.8 KiB
Bash
Executable File
#!/bin/sh
|
|
# Run all tests with coverage
|
|
set -e
|
|
|
|
echo "═══════════════════════════════════════"
|
|
echo " CoreScope — Test Suite"
|
|
echo "═══════════════════════════════════════"
|
|
echo ""
|
|
|
|
# Unit tests (deterministic, fast)
|
|
echo "── Unit Tests ──"
|
|
node test-packet-filter.js
|
|
node test-packet-filter-ux.js
|
|
node test-aging.js
|
|
node test-issue-1065-gesture-hints-gates.js
|
|
node test-frontend-helpers.js
|
|
node test-url-state.js
|
|
node test-perf-go-runtime.js
|
|
node test-channel-psk-ux.js
|
|
node test-channel-sidebar-layout.js
|
|
node test-channel-fluid-layout.js
|
|
node test-channel-modal-ux.js
|
|
node test-channel-decrypt-insecure-context.js
|
|
node test-channel-qr.js
|
|
node test-channel-qr-wiring.js
|
|
node test-channel-issue-1087.js
|
|
node test-issue-1409-no-encrypted-flood.js
|
|
node test-analytics-channels-integration.js
|
|
node test-observers-headings.js
|
|
node test-marker-outline-weight.js
|
|
node test-traces.js
|
|
|
|
# #1418 — route-view v2 (Tufte) coverage
|
|
node test-issue-1418-raw-hex-extraction.js
|
|
node test-issue-1418-edge-weights.js
|
|
node test-issue-1418-cb-preset-ramp.js
|
|
node test-issue-1418-spider-fan.js
|
|
node test-issue-1418-deeplink-hops-channels.js
|
|
node test-issue-1418-polish-review.js
|
|
node test-issue-1420-tile-providers.js
|
|
node test-issue-1438-marker-css-vars.js
|
|
node test-issue-1438-customizer-mcrole.js
|
|
node test-issue-1446-cb-preset-cascade.js
|
|
node test-issue-1450-logo-aspect.js
|
|
node test-issue-1454-channels-toggle.js
|
|
|
|
echo ""
|
|
echo "═══════════════════════════════════════"
|
|
echo " All tests passed"
|
|
echo "═══════════════════════════════════════"
|