Skip to content

Add --demo mode with fake router data + README screenshots#8

Merged
vpadman1 merged 1 commit intomainfrom
vignesh/demo-mode
Apr 18, 2026
Merged

Add --demo mode with fake router data + README screenshots#8
vpadman1 merged 1 commit intomainfrom
vignesh/demo-mode

Conversation

@vpadman1
Copy link
Copy Markdown
Owner

Summary

Running the dashboard against a real router means any screenshot for the README would leak your SSID, neighbours' SSIDs, connected-device MACs, and hostnames. This PR adds a `--demo` mode that runs against hardcoded plausible data so the tool can be demoed, screenshotted, and tried by anyone — including people who don't own a compatible router yet.

WiFi Channel Optimizer dashboard

What's in it

  • `drivers/demo.py` — `DemoDriver` with two bands (`MyHomeWiFi` / `MyHomeWiFi-5G`) and four fake clients. `set_channel` mutates internal state so pressing C in the TUI reflects on the next refresh — the demo feels live, not static.
  • `devices/demo.yaml` — registers the driver so it also shows up in `--list-devices` and can be invoked via `--device demo`.
  • `wifi_scanner.demo_scan_networks()` — 10-network fake scan crafted so the RSSI-weighted recommender has a clear winner on each band (channel 11 on 2.4 GHz, channel 149 on 5 GHz).
  • `WifiDashboard` now accepts an optional `scan_fn` kwarg so `--demo` can wire in the canned scan instead of calling CoreWLAN.
  • `main.py` — new `--demo` flag that bypasses keyring, password, and login entirely. Also adds a "Try `--demo` first" hint to the no-password error message so new users have an easy path in.
  • `README.md` — new "Try it in 30 seconds (no router needed)" section at the top, with both screenshots embedded.
  • `docs/screenshot.png`, `docs/screenshot-apply.png` — real captures of the `--demo` dashboard (not leaking any real network data).
  • 9 new tests covering DemoDriver correctness, get_all_data enrichment, set_channel state updates, and scan data shape.

Why this matters for adoption

From the discoverability audit: a CLI tool without a screenshot in the README gets a high bounce rate, and Textual dashboards are visually compelling. `--demo` also makes the "hey, try this out" barrier near-zero — clone, one command, see the thing work.

Test plan

  • `uv run pytest` — 97 passed (88 existing + 9 new)
  • `uvx ruff check .` — clean
  • Smoke test: `WifiDashboard(client=DemoDriver(), scan_fn=demo_scan_networks).compose()` builds widgets without error
  • Manual run: `uv run python main.py --demo` launches cleanly; R/S/C/Q keybindings all behave
  • Screenshots taken from the real `--demo` output
  • CI green

Running the dashboard against a real router means a screenshot for the
README leaks SSIDs, neighbour SSIDs, connected-device MACs, and hostnames.
--demo lets the dashboard boot against hardcoded plausible data so the
tool can be demoed, screenshotted, and tried before users connect real
hardware.

- drivers/demo.py: DemoDriver with two bands (MyHomeWiFi / MyHomeWiFi-5G)
  and four fake clients. set_channel mutates internal state so pressing
  C reflects on the next refresh — feels live.
- devices/demo.yaml: makes "demo" selectable via --device too, and shows
  up in --list-devices.
- wifi_scanner.demo_scan_networks(): fake 10-network scan crafted so the
  recommender has a clear winner on each band (ch 11 and ch 149).
- WifiDashboard now accepts an optional scan_fn so --demo can wire in
  the canned scan instead of CoreWLAN.
- main.py: --demo short-circuits the password/login path entirely; also
  adds a "Try --demo first" hint to the no-password error message.
- README: new "Try it in 30 seconds" section at the top.
- 9 new tests cover DemoDriver correctness and scan data shape.
@vpadman1 vpadman1 merged commit 9fa76ad into main Apr 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant