|
| 1 | +# Plan: Leptos 0.7 → 0.8 + leptos_icons/icondata 0.5 → 0.7 |
| 2 | + |
| 3 | +## Status: IN PROGRESS — Cargo.toml already bumped, code not yet fixed |
| 4 | + |
| 5 | +## Context |
| 6 | + |
| 7 | +Upgrading the three coupled frontend deps: |
| 8 | +- `leptos` 0.7.8 → 0.8.19 |
| 9 | +- `leptos_icons` 0.5 → 0.7.1 (requires leptos 0.8) |
| 10 | +- `icondata` 0.5 → 0.7 (paired with leptos_icons) |
| 11 | + |
| 12 | +Research confirmed **most leptos API is unchanged** between 0.7 and 0.8. The only true breaking change is in **leptos_icons**: the `icon` prop changed from a bare `icondata_core::Icon` value to `Signal<icondata_core::Icon>`. |
| 13 | + |
| 14 | +--- |
| 15 | + |
| 16 | +## Breaking Changes |
| 17 | + |
| 18 | +| Change | Scope | Fix | |
| 19 | +|---|---|---| |
| 20 | +| `leptos_icons::Icon` prop `icon:` changed from `icondata_core::Icon` to `Signal<icondata_core::Icon>` | 20 files | Wrap every `icon={icondata::LuX}` → `icon=Signal::derive(\|\| icondata::LuX)` | |
| 21 | +| leptos prelude now also exports `write::*` (additive) | Possible name shadowing | Fix any name conflicts from compile errors | |
| 22 | +| reactive_graph 0.1 → 0.2, tachys 0.1 → 0.2 | Internal | No code changes expected | |
| 23 | + |
| 24 | +--- |
| 25 | + |
| 26 | +## Fix Pattern |
| 27 | + |
| 28 | +```rust |
| 29 | +// Before (leptos_icons 0.5): |
| 30 | +<LxIcon icon={icondata::LuTerminal} width="16" height="16" /> |
| 31 | + |
| 32 | +// After (leptos_icons 0.7): |
| 33 | +<LxIcon icon=Signal::derive(|| icondata::LuTerminal) width="16" height="16" /> |
| 34 | +``` |
| 35 | + |
| 36 | +`Signal` is already in scope via `leptos::prelude::*` — no extra import needed. |
| 37 | + |
| 38 | +--- |
| 39 | + |
| 40 | +## Files to Update (20 files — all `<LxIcon icon={...}>` call sites) |
| 41 | + |
| 42 | +All in `src/workbench/`: |
| 43 | +1. `agent_context_handoff.rs` |
| 44 | +2. `agent_panel/context_list.rs` |
| 45 | +3. `agent_panel/mod.rs` |
| 46 | +4. `agent_panel/timeline.rs` ← also has `fn -> icondata::Icon` return type — leave that alone |
| 47 | +5. `agent_panel/voice_orb/mod.rs` |
| 48 | +6. `create_workspace_wizard.rs` |
| 49 | +7. `git_graph/mod.rs` |
| 50 | +8. `harness_image_pane/mod.rs` |
| 51 | +9. `harness_ui.rs` |
| 52 | +10. `harness_voice_pane/mod.rs` |
| 53 | +11. `memory_graph/mod.rs` |
| 54 | +12. `memory_panel.rs` |
| 55 | +13. `model_picker/mod.rs` |
| 56 | +14. `plans_panel/mod.rs` |
| 57 | +15. `project_explorer/mod.rs` |
| 58 | +16. `right_panel.rs` |
| 59 | +17. `skills_rules_panel/rules_tab.rs` |
| 60 | +18. `skills_rules_panel/skills_tab.rs` |
| 61 | +19. `terminal_cell.rs` |
| 62 | +20. `workspace_panel.rs` |
| 63 | + |
| 64 | +--- |
| 65 | + |
| 66 | +## Execution Steps |
| 67 | + |
| 68 | +1. ~~Bump `leptos = "0.8"`, `leptos_icons = "0.7"`, `icondata = "0.7"` in `Cargo.toml`~~ ✅ Done |
| 69 | +2. Run `cargo check -p blxcode-ui --target wasm32-unknown-unknown` — collect all errors |
| 70 | +3. For each error: wrap `icondata::Lu*` in `Signal::derive(|| ...)` |
| 71 | +4. Re-run `cargo check` — fix any residual errors |
| 72 | +5. Final: `cargo check -p blxcode` + `cargo check -p blxcode-ui --target wasm32-unknown-unknown` |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +## APIs Confirmed Unchanged (no edits needed) |
| 77 | + |
| 78 | +- `window_event_listener_untyped` — same (11 files safe) |
| 79 | +- `mount_to_body()` — same |
| 80 | +- `Effect::new()` — same (19 files safe) |
| 81 | +- `spawn_local` at `leptos::task::spawn_local` — same (27 files safe) |
| 82 | +- `on_cleanup` — same (14 files safe) |
| 83 | +- `Callback<In, Out>` / `Callable` — same (8 files safe) |
| 84 | +- `signal()`, `RwSignal::new()`, `.get()`, `.set()` — same |
| 85 | +- `Signal::derive()`, `Memo::new()` — same |
| 86 | +- `provide_context` / `expect_context` — same |
| 87 | +- `NodeRef::<html::Div>`, `NodeRef::<html::Audio>` — same |
| 88 | +- `Show`, `For` in `view!` macro — same |
0 commit comments