fix: show all presets always, no filter by selection

Remove selection-based filter entirely. Suggestions list stays
stable across select/deselect — no preset appears at top when
deselecting.
This commit is contained in:
2026-07-29 10:18:47 +07:00
parent 614d83b971
commit e544d5e694
3 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -16181,7 +16181,7 @@ const App = () => {
aiPromptMgrRef.current = new window.PromptTemplateManager();
}
const promptMgr = aiPromptMgrRef.current;
const suggestions = promptMgr ? (hasSelItem ? promptMgr.presets.filter(function(p) { return p.category === 'Rearrange / Variation'; }) : promptMgr.presets) : [];
const suggestions = promptMgr ? promptMgr.presets : [];
const handleApplySuggestion = (preset) => {
if (hasSelItem) {
setAiPrompt(`Rearrange this melody line in ${preset.name} style`);
File diff suppressed because one or more lines are too long
+6
View File
@@ -712,3 +712,9 @@
- **Các file ảnh hưởng:** `app/static/js/app.jsx`
- **Ghi chú/Test (nếu có):** `npm run build` — build passes.
---
### [2026-07-29 10:19] Task: Show all presets always, no filter by selection
- **Tóm tắt thay đổi:** Luôn hiển thị `promptMgr.presets` đầy đủ, không filter theo selection state — tránh preset đầu tiên nhảy vào list khi bỏ chọn item.
- **Các file ảnh hưởng:** `app/static/js/app.jsx`
- **Ghi chú/Test (nếu có):** `npm run build` — build passes.
---