Fix 3 bug standalone: VKB chiếm phím V, TCP FX button mở FX chain, VST GUI embed qua bridge

- VKB: stopImmediatePropagation thay stopPropagation (keydown+keyup) — chặn
  transport hotkey 'v' mở prompt Gain khi VKB đang mở (VKB đăng ký trước).
- TCP FX button: onClick -> window.__openFxRack(track.id, track.name), title
  'Mở Track FX Chain', giữ caret ▾ (title 'FX nhanh (cũ)') cho dropdown legacy.
- VST FX GUI embed: copy fx_vst_bridge.exe vào bundle (engine.spec binaries),
  find_bridge_exe tìm được trong _internal/ — hết lỗi 409 'Không tìm thấy bridge'.

Verified bằng Playwright: VKB không mở Gain prompt, FX chain rack mở + GUI VST
embed hiển thị (cả track FX rack lẫn Master FX Chain).
This commit is contained in:
2026-08-21 16:17:33 +07:00
parent bcd8e37e86
commit 9b14c99a7a
3 changed files with 31 additions and 6 deletions
+14 -4
View File
@@ -17449,12 +17449,17 @@ const App = () => {
if (e.type === 'keydown') {
if (e.repeat) return;
e.preventDefault();
e.stopPropagation();
// stopImmediatePropagation (không chỉ stopPropagation): chặn CÁC
// handler capture khác CÙNG window (transport hotkeys ~20193 — phím v
// = Gain, s = split, ...) — stopPropagation chỉ chặn propagation tới
// element khác, không chặn listener cùng node cùng phase (bug user:
// VKB mở, phím V vẫn bật prompt Gain).
e.stopImmediatePropagation();
const vel = Math.max(1, Math.min(127, parseInt(s.velocity) || 100)) / 127;
if (vkbNoteOnRef.current) vkbNoteOnRef.current(pitch, vel);
} else {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
if (vkbNoteOffRef.current) vkbNoteOffRef.current(pitch);
}
};
@@ -31723,7 +31728,8 @@ STRICT CONSTRAINTS:
"data-lucide": "upload",
className: "w-3 h-3"
})), " File"), /*#__PURE__*/React.createElement("button", {
onClick: e => { e.stopPropagation(); setFxSelectorTrackId(track.id); },
onClick: e => { e.stopPropagation(); window.__openFxRack(track.id, track.name); },
title: "Mở Track FX Chain",
className: "px-2.5 py-1 bg-zinc-800 hover:bg-zinc-700 text-purple-400 border border-purple-900 rounded text-xs font-bold flex items-center gap-1"
}, /*#__PURE__*/React.createElement("span", {
className: "inline-flex items-center shrink-0"
@@ -31732,7 +31738,11 @@ STRICT CONSTRAINTS:
className: "w-3 h-3"
})), " FX: ", /*#__PURE__*/React.createElement("span", {
className: "text-zinc-500 font-normal"
}, track.fxType || "None")), /*#__PURE__*/React.createElement("button", {
}, track.fxType || "None"), /*#__PURE__*/React.createElement("span", {
title: "FX nhanh (cũ)",
className: "ml-0.5 text-zinc-500 hover:text-purple-300 cursor-pointer",
onClick: e => { e.stopPropagation(); setFxSelectorTrackId(track.id); }
}, "▾")), /*#__PURE__*/React.createElement("button", {
onClick: (e) => { e.stopPropagation(); openInstrumentSelector(track.id); },
className: "px-1.5 py-1 bg-zinc-800 hover:bg-zinc-700 text-amber-400 border border-amber-800 rounded text-xs font-bold flex items-center gap-1 max-w-[90px] shrink-0"
}, /*#__PURE__*/React.createElement("span", {
File diff suppressed because one or more lines are too long
+10
View File
@@ -12,6 +12,16 @@ binaries = collect_dynamic_libs('soundfile')
# package 'app' (vd thu muc md/). Cac assets cua app (static/templates/models)
# duoc bundle qua collect_data_files('app').
_SPEC_ROOT = os.path.abspath(SPECPATH)
# Native bridge cho VST FX (fx_vst_bridge.exe + DLL + plugin_host) — bundle vao
# root (dest '.') de find_bridge_exe (frozen: exe_dir = thu muc chua
# sys.executable = dist/daw_engine) tu dong tim thay. Chi build tren Windows.
if os.name == 'nt':
_bridge_dir = os.path.join(_SPEC_ROOT, 'native_bridge', 'build', 'Release')
for _b in ('fx_vst_bridge.exe', 'jpeg62.dll', 'libfluidsynth-3.dll', 'plugin_host.exe'):
_bp = os.path.join(_bridge_dir, _b)
if os.path.exists(_bp):
binaries.append((_bp, '.'))
# ⚠️ GOC ROOT CUA MOI LOI 'app\\static does not exist' (gap 3 lan):
# lenh `pyinstaller engine.spec` (entry-point script) KHONG them CWD vao