techfreakworm commited on
Commit
2e5af7a
·
unverified ·
1 Parent(s): 9071450

docs(plan): update task c5 wiring for sidebar architecture

Browse files
docs/superpowers/plans/2026-05-18-ace-music-studio.md CHANGED
@@ -1440,12 +1440,14 @@ git commit -m "feat(ui): add generate tab builder with prompt/lyrics/duration/vo
1440
 
1441
  ### Task C5: Wire Generate tab into `app.py`
1442
 
 
 
1443
  **Files:**
1444
  - Modify: `app.py`
1445
 
1446
- - [ ] **Step 1: Replace the Generate placeholder with the real tab**
1447
 
1448
- Edit `app.py`'s `build_app()`:
1449
 
1450
  ```python
1451
  import random
@@ -1489,33 +1491,22 @@ def on_generate_click(
1489
  except ValueError as e:
1490
  raise gr.Error(str(e)) from e
1491
  return out_path, meta
 
1492
 
 
1493
 
1494
- def build_app() -> gr.Blocks:
1495
- with gr.Blocks(theme=theme.build_theme(), css=theme.CSS, title="ACE Music Studio") as demo:
1496
- gr.HTML(HEADER_HTML)
1497
- gr.HTML(CTA_HTML)
1498
-
1499
- with gr.Tabs():
1500
- with gr.Tab("🎵 Generate"):
1501
- g = ui.build_generate_tab()
1502
- g["generate_btn"].click(
1503
- fn=on_generate_click,
1504
- inputs=[g["prompt"], g["lyrics"], g["duration_s"], g["instrumental"]],
1505
- outputs=[g["output_audio"], g["output_meta"]],
1506
- )
1507
- with gr.Tab("🎤 Cover"):
1508
- gr.Markdown("Cover tab placeholder — implemented in M3.")
1509
- with gr.Tab("⏩ Extend"):
1510
- gr.Markdown("Extend tab placeholder — implemented in M3.")
1511
- with gr.Tab("✏️ Edit"):
1512
- gr.Markdown("Edit tab placeholder — implemented in M3.")
1513
- with gr.Tab("✍️ Lyrics"):
1514
- gr.Markdown("Lyrics tab placeholder — implemented in M4.")
1515
-
1516
- return demo
1517
  ```
1518
 
 
 
1519
  - [ ] **Step 2: Install ACE-Step on Mac**
1520
 
1521
  ```bash
 
1440
 
1441
  ### Task C5: Wire Generate tab into `app.py`
1442
 
1443
+ **⚠ Read the WIREFRAME COMPLIANCE section first.** Mode nav is `gr.Radio` + `gr.Group` panes — never `gr.Tabs`.
1444
+
1445
  **Files:**
1446
  - Modify: `app.py`
1447
 
1448
+ - [ ] **Step 1: Add the click handler and replace the Generate pane's Markdown placeholder with the real form**
1449
 
1450
+ Edit `app.py`. Add these helpers near the top (after imports):
1451
 
1452
  ```python
1453
  import random
 
1491
  except ValueError as e:
1492
  raise gr.Error(str(e)) from e
1493
  return out_path, meta
1494
+ ```
1495
 
1496
+ Inside `build_app()`, replace the existing `pane_generate` block's `gr.Markdown` placeholder with the real form. The rest of `build_app()` (HEADER / CTA / `ams-body` row / sidebar / `mode.change(_switch_pane, ...)`) stays exactly as-is. Pattern:
1497
 
1498
+ ```python
1499
+ with gr.Group(visible=True, elem_classes=["ams-tab-pane"]) as pane_generate:
1500
+ g = ui.build_generate_tab()
1501
+ g["generate_btn"].click(
1502
+ fn=on_generate_click,
1503
+ inputs=[g["prompt"], g["lyrics"], g["duration_s"], g["instrumental"]],
1504
+ outputs=[g["output_audio"], g["output_meta"]],
1505
+ )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1506
  ```
1507
 
1508
+ Cover / Extend / Edit / Lyrics panes still keep their `gr.Markdown` placeholders for now (filled in at M3 / M4). The sidebar / pane-swap wiring is unchanged.
1509
+
1510
  - [ ] **Step 2: Install ACE-Step on Mac**
1511
 
1512
  ```bash