#!/usr/bin/env python3
"""
Measure the sidebar holding many groups, at a phone and a desktop size.
Renders the real style.css with the sidebar as `Sidebar()` draws it — twelve
groups, the drawer open on the phone — beside a page long enough to scroll, and
reports what a person would meet: whether the list scrolls, whether its last
group and the legal link can be reached, and whether reaching the end hands the
scroll on to the page.
What this cannot show is the address bar of a real phone: an iframe has no
dynamic toolbar, so `100vh` and `100dvh` measure the same here.
sidebar_scroll_probe.py
"""
import http.server
import json
import shutil
import socketserver
import subprocess
import sys
import tempfile
import threading
import time
from pathlib import Path
STATIC = Path(__file__).resolve().parents[2] / "src" / "meshbay_hub" / "static"
PORT = 8744
SIZES = [(390, 740), (1280, 800)]
GROUPS = "".join(
f''
f''
f'A Shared Library Number {i}'
f'@owner_account'
for i in range(1, 13))
FRAGMENT = f"""