captive portal: address review

* React: re-read the hotspot address whenever the HotspotToggle starts or
  stops the hotspot, matching the fallback UI's refresh-on-status.
* A WPA3 start that reverts to WPA2 leaves the hotspot up, so it now gets
  the captive portal address correction too.
* The corrective `nmcli connection up` logs a warning on a non-zero exit;
  dnsmasq would otherwise keep the old address silently.
* HotspotStatusResponse.captive_portal defaults to true like everywhere else.
* Trim design narrative from the module docstring and React comments.
* The include-before-activate test now observes the include at the moment
  of the `nmcli ... hotspot` call instead of inferring from call order.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Roland 2026-09-13 19:33:51 -06:00
parent 6bea09600e
commit 85c27b91df
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
6 changed files with 118 additions and 28 deletions

View file

@ -157,7 +157,7 @@ class HotspotStatusResponse(BaseModel):
ssid: Optional[str] = Field(default=None, description="Hotspot SSID when enabled")
device: Optional[str] = Field(default=None, description="WiFi device name")
ip: Optional[str] = Field(default=None, description="Hotspot IPv4 address when enabled")
captive_portal: bool = Field(default=False, description="Whether the captive portal is enabled")
captive_portal: bool = Field(default=True, description="Whether the captive portal is enabled")
portal_url: Optional[str] = Field(default=None, description="Landing page URL when the hotspot is up")