Status API: wire default avatars, control ops and the port warning into the runtime #889

Open
opened 2026-11-18 09:01:47 +00:00 by charles · 0 comments
Owner

Shell 31 (#823) gives fluxer-status-api the default-avatar route, control ops, set_control, take_ops and bind_error, and Shell 15 (#807) gives fluxer-core companion_action, voice_status_with / DefaultAvatarBase and the port warning. No task in the Desktop shell plan owns plugging them together in apps/fluxer/src/runtime.rs, which today starts the API with control: false and no images and publishes selectors::voice_status (no avatar URLs). Until this is done, companion apps see no default-avatar URLs and cannot control voice, even with the switch on.

To do in apps/fluxer:

  • Hand the bundled default avatars (crates/fluxer-ui/assets/avatars/0..5.png, already include_bytes!d by fluxer-ui::widgets::avatar) to StatusApiConfig::default_avatars.
  • Publish voice_status_with(&app, Some(&DefaultAvatarBase::new(addr, token))) while the API listens.
  • Apply ShellSettings::status_api_control with StatusApi::set_control at load and on change.
  • Read take_ops() and apply companion_action(&app, op) for each op.
  • Feed bind_error() (AddrInUse) into the state behind companion_section's port warning.

Found while implementing Shell 31 on branch shell-31-statusapi-default-avatars.

Shell 31 (#823) gives `fluxer-status-api` the default-avatar route, control ops, `set_control`, `take_ops` and `bind_error`, and Shell 15 (#807) gives `fluxer-core` `companion_action`, `voice_status_with` / `DefaultAvatarBase` and the port warning. No task in the Desktop shell plan owns plugging them together in `apps/fluxer/src/runtime.rs`, which today starts the API with `control: false` and no images and publishes `selectors::voice_status` (no avatar URLs). Until this is done, companion apps see no default-avatar URLs and cannot control voice, even with the switch on. To do in `apps/fluxer`: - Hand the bundled default avatars (`crates/fluxer-ui/assets/avatars/0..5.png`, already `include_bytes!`d by `fluxer-ui::widgets::avatar`) to `StatusApiConfig::default_avatars`. - Publish `voice_status_with(&app, Some(&DefaultAvatarBase::new(addr, token)))` while the API listens. - Apply `ShellSettings::status_api_control` with `StatusApi::set_control` at load and on change. - Read `take_ops()` and apply `companion_action(&app, op)` for each op. - Feed `bind_error()` (AddrInUse) into the state behind `companion_section`'s port warning. Found while implementing Shell 31 on branch shell-31-statusapi-default-avatars.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#889
No description provided.