Skip to content

api+webui: expose mDNS discovery config fields (v0.18.1)#90

Merged
snokvist merged 1 commit into
OpenIPC:masterfrom
snokvist:upstream-pr/discovery-webui-fields
Jun 24, 2026
Merged

api+webui: expose mDNS discovery config fields (v0.18.1)#90
snokvist merged 1 commit into
OpenIPC:masterfrom
snokvist:upstream-pr/discovery-webui-fields

Conversation

@snokvist

Copy link
Copy Markdown
Collaborator

Summary

The discovery config section added with the mDNS device beacon (0.18.0) was wired into the config loader/serializer but never registered in the API field table (g_fields[]), so it was unreachable via /api/v1/set, /api/v1/capabilities, and the WebUI dashboard — editable only by hand-editing /etc/waybeam.json.

This registers the four fields and surfaces them in the dashboard. No protocol or beacon behavior change.

Changes

  • src/venc_api.c: register discovery.{enabled,service_type,name,bare_alias} in g_fields[] (all restart_required — the beacon reads config at boot / re-reads on SIGHUP-respawn, with no live re-announce path), plus camelCase aliases for serviceType/bareAlias.
  • web/dashboard.html: new Discovery settings section + per-field tooltips. src/venc_webui.c blob regenerated (make webui).
  • VERSION → 0.18.1, HISTORY.md entry, HTTP_API_CONTRACT.md capabilities list.

Verification

  • make verify clean on both backends (star6e + maruko); host tests pass.
  • Device-verified on Star6E (ssc338q):
    • All 4 fields appear in /api/v1/capabilities as restart_required (absent before).
    • Settable via both camelCase alias (discovery.name, discovery.bareAlias) and canonical snake_case (discovery.enabled); each returns reinit_pending:true, persists to disk, and survives the respawn.
    • Functionally effective: discovery.enabled=false → the 5353 mDNS listener disappears; re-enabling brings it back.

The discovery config section (enabled/serviceType/name/bareAlias) added in
the mDNS beacon work (0.18.0) was wired into the loader/serializer but never
registered in g_fields[], so it was unreachable via /api/v1/set,
/api/v1/capabilities, and the WebUI dashboard — editable only by hand in
/etc/waybeam.json.

- venc_api.c: register the 4 discovery fields in g_fields[] (all
  MUT_RESTART — beacon reads config at boot, no live re-announce path) +
  camelCase aliases for serviceType/bareAlias
- web/dashboard.html: add a Discovery SECTIONS group + field tooltips
- src/venc_webui.c: regenerated blob (make webui)
- VERSION -> 0.18.1, HISTORY.md entry, HTTP_API_CONTRACT.md capabilities list

No protocol or beacon behavior change. Host tests: 1701 passed, 0 failed.
make verify clean (both backends).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@snokvist snokvist merged commit 2b8e206 into OpenIPC:master Jun 24, 2026
7 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