fix: Insert Section visible in SECTION-TAB context menu

JSX rendering menu at line 17500 lacked the
!sessionTabs.some(s => s.id === activeTab) guard.
Added it - section tab context menu no longer offers
Insert Section (sections cannot contain section items).
This commit is contained in:
2026-07-28 09:55:37 +07:00
parent f4a364df51
commit 385d62cfaf
3 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -17497,7 +17497,7 @@ const App = () => {
className: "h-px bg-zinc-700 my-1"
}), /*#__PURE__*/React.createElement("div", {
className: "px-3 py-0.5 text-[10px] text-zinc-500 font-bold uppercase tracking-wider"
}, "Insert"), /*#__PURE__*/React.createElement("button", {
}, "Insert"), !sessionTabs.some(s => s.id === activeTab) && /*#__PURE__*/React.createElement("button", {
onClick: () => { insertSectionAtPlayhead(); closeContextMenu(); },
className: "w-full px-3 py-1.5 text-xs text-zinc-200 hover:bg-zinc-700 text-left flex items-center gap-2"
}, /*#__PURE__*/React.createElement("span", {
File diff suppressed because one or more lines are too long
+6
View File
@@ -539,6 +539,12 @@
- **Ghi chú/Test (nếu có):** `npm run build` pass. Ctrl+Click+Drag section/MIDI item → copy đến vị trí mới, item không bị selected.
---
### [2026-07-28 09:55] Task: Remove Insert Section từ context menu trong SECTION-TAB
- **Tóm tắt thay đổi:** Thêm `!sessionTabs.some(s => s.id === activeTab)` cho "Insert Section" button trong JSX context menu. Section không thể chứa section item. Data-driven menu (line 14905) đã có check này.
- **Các file ảnh hưởng:** `app/static/js/app.jsx`, `app/static/js/app.precompiled.js`
- **Ghi chú/Test (nếu có):** `npm run build` pass. Right-click trong SECTION-TAB → không thấy "Insert Section".
---
### [2026-07-28 09:50] Task: Program change ở note time, không phải call time
- **Tóm tắt thay đổi:** Di chuyển `program_change`/`program_select`/`bank_select` từ synchronous (call time) vào trong `doNote` (note time via setTimeout) trong `_playNoteFluid`. Trước đây tất cả program_changes xảy ra ngay khi `startTrackPlayback` chạy → MIDI items processed trước sections → section's program_change override cuối cùng → ALL notes (section + MIDI) play với section instrument. Fix: mỗi note có program_change tại đúng thời điểm của nó.
- **Các file ảnh hưởng:** `app/static/js/services/soundfontPlayer.js`