Skip to content

refactor(app): re-export LedMode so apps never import task internals - #635

Open
ArthurGibert wants to merge 2 commits into
mainfrom
refactor/app-facade-ledmode
Open

refactor(app): re-export LedMode so apps never import task internals#635
ArthurGibert wants to merge 2 commits into
mainfrom
refactor/app-facade-ledmode

Conversation

@ArthurGibert

Copy link
Copy Markdown
Member

Summary

  • Apps must only reach hardware-task internals through the App<N> facade in app.rs, never by importing crate::tasks::* directly — this closes the one confirmed gap in that boundary.
  • app.rs re-exported leds::Led but not leds::LedMode, even though Leds::set_mode() requires it — three apps (tb3po, lfo, lfo_plus) had worked around this with a direct use crate::tasks::leds::LedMode import to use LED effects.
  • Add LedMode to app.rs's existing re-export block, and update those three apps to pull it (and, for lfo/lfo_plus, AppParams/ParamStore) through crate::app:: only.
  • Note in AGENTS.md that any new App<N> method taking/returning a crate::tasks::* type must re-export it in the same change, so this doesn't recur.

No behavior change — this only moves import paths and widens a re-export.

Test plan

  • On hardware: TB-3PO reseed button flash (channel 0 button) still shows the white flash-then-static LED effect
  • On hardware: LFO / LFO+ still display correctly, no LED regressions
  • cargo fmt --all -- --check, cargo clippy --bin faderpunk --target thumbv8m.main-none-eabihf -- -D warnings, cargo clippy -p libfp -- -D warnings, cargo test --lib -p libfp all pass (already verified locally)

@ArthurGibert
ArthurGibert requested a review from chmanie August 10, 2026 06:26
@ArthurGibert ArthurGibert added bug Something isn't working rust Pull requests that update Rust code Priority: High Review requested and removed bug Something isn't working labels Aug 10, 2026
@ArthurGibert ArthurGibert added this to the 1.12 milestone Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: High Review requested rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant