Skip to content

refactor: add physical endpoint label plumbing#48

Open
okhomenko wants to merge 2 commits intotsowell:mainfrom
okhomenko:alex/physical-endpoint-label-plumbing
Open

refactor: add physical endpoint label plumbing#48
okhomenko wants to merge 2 commits intotsowell:mainfrom
okhomenko:alex/physical-endpoint-label-plumbing

Conversation

@okhomenko
Copy link
Copy Markdown

@okhomenko okhomenko commented Mar 21, 2026

Summary

This PR adds preparatory plumbing for physical endpoint labels without changing the default UI behavior yet.

It establishes a shared PipeWire-state layer for endpoint/profile label lookup and exposes a computed naming key that follow-up PRs can start using for endpoint defaults and Configuration titles.

What changed

  • parse and store raw SPA_PARAM_ROUTE_info entries on EnumRoute
  • add shared state helpers for:
    • active route lookup for endpoint nodes
    • physical endpoint label lookup for endpoint nodes
    • physical endpoint label lookup for device profiles
  • add a computed: namespace to the naming/matching system
  • implement computed:physical.endpoint.label
  • refactor view.rs to use shared state helpers for route/profile/device matching instead of owning that logic locally
  • document the new computed key in README.md and wiremix.toml

Behavior

computed:physical.endpoint.label resolves in this order:

  1. node.nick
  2. the active route's device.product.name when it maps unambiguously
  3. unresolved

This PR does not change the default endpoint naming templates or Configuration titles yet.

Follow-ups

  • switch default endpoint naming to prefer {computed:physical.endpoint.label}
  • reuse the same plumbing to enrich Configuration profile titles and selected-profile text
  • expand docs/examples for template overrides using the computed key

Testing

I added unit coverage for route-info parsing, computed-key rendering, computed-key override matching, and ambiguous profile-label cases.

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