Files
meshcore-analyzer/.github/workflows
Kpa-clawbot 12d96a9d15 fix(#1111): hide My Channels section entirely when empty (#1112)
Fixes #1111.

## Problem
When the user has no PSK channels added, `public/channels.js` still
renders the "My Channels 🖥️ (this browser)" section header plus an
empty-state placeholder ("No channels yet — click [+ Add Channel] to
add one."). The section should not exist in the DOM at all when empty.

## Fix
Wrap the entire My Channels section render in a `mine.length > 0`
guard. When `mine.length === 0`: no section, no header, no placeholder.

## TDD
- **Red commit** (`b8bf938`): adds `test-channel-issue-1111-e2e.js`,
  which fails on the current renderer because the section always
  emits — the test reproduces the bug.
- **Green commit** (`776653d`): the conditional render in
  `public/channels.js` makes the test pass.

## E2E
New test: `test-channel-issue-1111-e2e.js` (wired into the deploy
workflow alongside the other channel E2Es).
- Case 1: clear `localStorage` → asserts `.ch-section-mychannels`
  absent and no "My Channels" text in `#chList`.
- Case 2: seed `corescope_channel_keys` with one PSK key → asserts
  `.ch-section-mychannels` exists with the "My Channels" header.

## Acceptance criteria
- [x] No "My Channels" section when empty (no header, no placeholder)
- [x] Section + header + channel row render with ≥1 stored PSK key
- [x] E2E covers both states

## Performance
None — single conditional around an existing render path.

---------

Co-authored-by: Kpa-clawbot <kpa-clawbot@users.noreply.github.com>
Co-authored-by: clawbot <bot@kpabap.invalid>
2026-05-05 14:01:09 -07:00
..