Repository navigation
Description
Effort: M
Part of the Section Practice difficulty override feature tracked in get-flashbacks/feedback-plugin-difficulty-ladder#160 (2/4). Builds on the Host capability shipped in #136 / PR #138 (static/capabilities/practice-difficulty.js). This is the producer integration: Section Practice (a core surface in this repo, static/js/section-practice.js) now drives the practice-difficulty override.
Note: "Section Practice" is not a standalone plugin.
feedBack-plugin-riffrepeaterand others treat core's Section Practice popover as a core surface (e.g. they call core's_sectionPracticeBarInnerHtml()). The producing repository is therefore this repo (feedBack core), not a plugin repository.
Scope
- Activate the
practice-difficultyoverride for the looped section using the manualdifficulty_pctpin, and clear it when the loop ends or Section Practice mode exits. - Register/activate through the Host capability only — no direct writes to another plugin's state.
- The override is a manual percentage pin, not a second adaptive controller. Section Practice owns the practice workflow; Difficulty Ladder keeps owning song-wide adaptive difficulty.
- Track which loop the override belongs to so a foreign loop that clears or replaces ours clears the override exactly once (idempotent clear).
Integration points (current main)
practiceSection(index, opts)—static/js/section-practice.js. Arm the loop viahost.setLoop(start, end, ...)first, and onlyactivateonce the loop is confirmed, so a failed loop never leaves a live override._setSectionPracticeMode(on, opts)— the single teardown funnel for turning the feature off,clearLoop(), and song/arrangement changes. Emitclearhere when an override is active._syncSectionPracticeFromLoop(...)— recognizes externally armed loops that match the current section and can turn Section Practice on. Decide whether a foreign matching loop should activate the core-owned override, or only a loop this feature armed.hasPhraseData()— sections with no authored phrases need an explicit answer, since the override currently changes nothing for them.- Capability surface:
static/capabilities/practice-difficulty.js(register-participant,unregister-participant,activate,clear;override-activated/override-cleared/override-rejectedevents).
Open decisions
- Where does
difficulty_pctcome from? Core Section Practice has no difficulty control today, so the pin needs a source: a core UI, a participant registration from another plugin, or a persisted per-section value. - What is the stable core source ID? Unlike a plugin there is no manifest-based registration, so the capability call needs a fixed, documented source identifier (plus per-source cleanup for participant unregistration).
- External loop ownership — activate on any matching external loop, or only on loops this feature armed?
Acceptance criteria
- With the
practice-difficultycapability present, looping a section pins its effective difficulty and leaving the loop (or exiting Section Practice) restores the song-wide value. - No
activateis emitted whensetLoopfails, and no override leaks afterclearLoop(), song change, or arrangement change. - Clearing is idempotent — a loop ended by another producer clears our override at most once.
- A matching issue/PR links back to feedback-plugin-difficulty-ladder#160 so the tracking issue can be unblocked.
Out of scope
Making Step Mode a difficulty provider (only if it explicitly opts in), per #22.
Activity