fix(drop): recognize TCP/MCP FX-button hotspot for instrument drop (S-VIEW-BUG-1)

The FX-hotspot classifier matched only fx_ (the FX-chain/floating windows),
so a drop on a track TCP FX button (info tcp*) never armed the drop and the
capture fell through to arrange as audio. Widen to fx_/tcp/mcp in a pure,
unit-tested predicate; shell calls it.
This commit is contained in:
2026-07-27 13:26:10 -04:00
parent 3b9b78b82c
commit fef595be91
4 changed files with 74 additions and 15 deletions
+8
View File
@@ -39,6 +39,14 @@ std::string buildInstrumentDropChunk(const std::string& sampleId) {
return encodeBase64(instrumentDropStateBytes(sampleId));
}
bool infoNamesFxHotspot(const std::string& info) {
// See the header contract. The FX-chain / floating-FX windows report "fx_*"; the track /
// mixer panel that carries the FX button reports "tcp*" / "mcp*". Prefix-match all three —
// the TCP/MCP surfaces are the fix for S-VIEW-BUG-1 (the "fx_"-only predicate missed them).
auto startsWith = [&info](const char* p) { return info.rfind(p, 0) == 0; };
return startsWith("fx_") || startsWith("tcp") || startsWith("mcp");
}
std::string encodeBase64(const std::vector<std::uint8_t>& bytes) {
std::string out;
out.reserve(((bytes.size() + 2) / 3) * 4);