Skip to content

Commit 826a7eb

Browse files
doublegateclaude
andcommitted
feat(release): v0.5.0 - Dioxus 0.7.3 GUI Framework Migration
BREAKING CHANGE: Complete GUI framework migration from iced 0.14.0 to Dioxus 0.7.3. ## GUI Framework Migration - Replaced iced 0.14.0 with Dioxus 0.7.3 (Blitz native renderer for desktop) - Signal-based reactivity replaces iced Message/Update pattern - 18 RSX components replace iced widget implementations - CSS custom properties + Tailwind replace iced ColorPalette structs - EventBus bridge via ChannelEventHandler + use_coroutine() - Feature flags: desktop (default), server (Axum SSR), web (WASM) ## Core Bug Fixes - Fixed drop() on async future in connection.rs silently discarding Event::Connected - Fixed premature ConnectionState::Registered before server 001 RPL_WELCOME - Fixed PONG handler not sending PONG through writer channel - Moved 001 RPL_WELCOME handling into reader task for proper async emission ## Runtime Fixes - Explicit tokio Runtime::new() + rt.enter() for Dioxus desktop compatibility - rustls::crypto::ring::default_provider().install_default() for rustls 0.23+ - spawn_forever() for network operations surviving component unmount - OnceLock<Arc<IrcClient>> global pattern for Copy-compatible IrcActions ## New Architecture - 18 RSX components in crates/rustirc-gui/src/components/ - bridge.rs: EventBus to Dioxus channel bridge - providers.rs: Context providers for signals - hooks/: use_irc.rs, use_irc_actions.rs, use_theme.rs - state.rs: Dioxus-compatible AppState with Signal wrapping - assets/main.css, assets/themes/base.css, assets/tailwind.css - Dioxus.toml project configuration ## Removed - All iced widget implementations (crates/rustirc-gui/src/widgets/) - iced ColorPalette theme system - vendor/iced_glyphon/ security patch - --material-demo flag and Material Design 3 iced components ## Other - All crate versions bumped to 0.5.0 - MSRV updated from 1.75.0 to 1.80.0 - 254 tests passing (zero regressions), zero clippy warnings - 22 CSS themes via [data-theme="..."] selectors - Updated .gitignore for Dioxus build artifacts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1b51d7d commit 826a7eb

29 files changed

Lines changed: 816 additions & 740 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ jobs:
526526
527527
- uses: dtolnay/rust-toolchain@master
528528
with:
529-
toolchain: 1.75.0
529+
toolchain: 1.80.0
530530
- uses: Swatinem/rust-cache@v2
531531
- name: Check MSRV with sccache fallback
532532
shell: bash

.github/workflows/master-pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ jobs:
371371
372372
<div class="crate">
373373
<h2><a href="rustirc_gui/index.html">rustirc-gui</a></h2>
374-
<div class="description">Modern graphical user interface using Iced</div>
374+
<div class="description">Modern graphical user interface using Dioxus</div>
375375
</div>
376376
377377
<div class="crate">

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ target/
1919
/dist/
2020
/release/
2121

22+
# Dioxus build/cache artifacts
23+
.dioxus/
24+
target/dx/
25+
node_modules/
26+
2227
# Python
2328
# Byte-compiled / optimized / DLL files
2429
__pycache__/

CHANGELOG.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,70 @@ All notable changes to RustIRC will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.5.0] - 2026-03-07 (Dioxus 0.7.3 + Axum GUI Migration)
9+
10+
### Summary
11+
Major release replacing the iced 0.14.0 GUI framework with Dioxus 0.7.3 + Axum. The GUI is now built with reactive RSX components, Signal-based state management, Tailwind CSS styling, and CSS custom property themes. Adds web target support via Axum fullstack. All non-GUI functionality (core, protocol, TUI, scripting, plugins) unchanged.
12+
13+
### Added
14+
15+
#### Dioxus GUI Framework
16+
- **Dioxus 0.7.3**: Reactive RSX component architecture replacing iced 0.14.0
17+
- **Axum 0.8**: Fullstack web target support via `#[server]` functions
18+
- **Signal<AppState>**: Reactive state management with automatic re-rendering
19+
- **EventBus Bridge**: `use_coroutine()` bridges core EventBus to Dioxus signals
20+
- **IrcActions**: Copy-type action dispatcher for connect, send, join, leave operations
21+
- **18 RSX Components**: Layout, TabBar, ServerTree, UserList, MessageView, InputArea, StatusBar, MenuBar, SearchBar, ContextMenu, UrlPreview, DccTransfer, DccChat, ScriptConsole, PluginManager, and 3 dialog components
22+
- **CSS Theme System**: 22 themes as CSS custom properties with `[data-theme="..."]` selectors
23+
- **Tailwind CSS**: Zero-config utility-first CSS in RSX class attributes
24+
- **IRC Color CSS**: mIRC color codes 0-15 as `.irc-color-N` CSS classes
25+
- **Feature Flags**: `desktop`, `server`, `web` features for target selection
26+
- **Dioxus.toml**: Configuration for dx CLI (hot-patching, asset directory)
27+
28+
#### New Tests
29+
- 14 state management unit tests (CRUD operations, message limits, user management)
30+
- 5 formatting tests (IRC color parsing, CSS style generation)
31+
- 6 theme tests (roundtrip, case-insensitive parsing, display names)
32+
33+
### Changed
34+
- **GUI Framework**: iced 0.14.0 -> Dioxus 0.7.3 (complete rewrite)
35+
- **Styling**: Rust `ColorPalette` structs -> CSS custom properties + Tailwind
36+
- **IRC Colors**: `iced::Color` values -> CSS hex strings
37+
- **Theme System**: Rust enum -> CSS `[data-theme]` attribute selectors
38+
- **MSRV**: 1.75.0 -> 1.80.0 (Dioxus requirement)
39+
- **Version**: 0.4.2 -> 0.5.0
40+
- **CI MSRV Job**: Updated toolchain from 1.75.0 to 1.80.0
41+
- **Formatting Module**: Output changed from iced elements to CSS-styled HTML spans
42+
43+
### Removed
44+
- **iced 0.14.0**: Entire iced dependency and all widget implementations
45+
- **vendor/iced_glyphon/**: Security patch directory no longer needed
46+
- **Material Design 3 Widgets**: iced-specific MD3 components (typography, buttons, cards, etc.)
47+
- **--material-demo flag**: iced component showcase removed
48+
- **SerializableColor**: Wrapper type replaced by CSS hex strings
49+
- **iced Widget Files**: `widgets/`, `themes/`, `theme.rs`, `event_handler.rs`, `menus.rs`, `dialogs.rs`, `material_demo.rs`, `accessibility.rs`, `notifications.rs`, `performance.rs`, `platform.rs`, `search.rs`, `testing.rs`, `simple_app.rs`
50+
- **iced Patch**: `[patch.crates-io]` section for iced_glyphon
51+
52+
### Fixed
53+
54+
#### Core IRC Engine (`crates/rustirc-core/src/connection.rs`)
55+
- **`drop()` on async future**: Fixed `drop()` call that silently discarded `Event::Connected` emission, preventing connection state from propagating
56+
- **Premature `ConnectionState::Registered`**: Fixed state being set to `Registered` before server's 001 RPL_WELCOME response; moved to reader task for proper async event emission
57+
- **PONG handler**: Fixed handler that only emitted events about PONG but never actually sent PONG through the writer channel
58+
59+
#### Runtime Compatibility
60+
- **Tokio runtime**: Added explicit `Runtime::new()` + `rt.enter()` for Dioxus desktop compatibility
61+
- **rustls 0.23+ TLS**: Added explicit `rustls::crypto::ring::default_provider().install_default()` call
62+
- **`spawn_forever()`**: Used instead of `spawn()` for network operations to survive component unmount
63+
- **`OnceLock<Arc<IrcClient>>`**: Global pattern keeps `IrcActions` as `Copy` (required for RSX closures in `for` loops)
64+
- **CSS loading**: `include_str!()` + `document::Style` instead of `asset!()` macro (only works with dx CLI)
65+
66+
### Technical Details
67+
- ~24K lines of iced GUI code replaced by ~6K lines of Dioxus RSX
68+
- All 254 workspace tests passing (zero regressions)
69+
- Zero clippy warnings
70+
- Auto-join channels via `pending_auto_joins` HashMap, executed on `Event::Connected`
71+
872
## [0.4.2] - 2026-03-07 (Dependency Maintenance & GitHub Cleanup)
973

1074
### Summary

CLAUDE.md

Lines changed: 31 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The project prioritizes full compatibility with IRC standards including IRCv3 ex
1414

1515
## Development Status
1616

17-
**v0.4.2 Dependency Maintenance & GitHub Cleanup** (2026-03-07)
17+
**v0.5.0 Dioxus 0.7.3 + Axum GUI Migration** (2026-03-07)
1818

1919
- **Phase 1**: Research & Setup ✅ (Complete 2025-08-14)
2020
- **Phase 2**: Core IRC Engine ✅ (Complete 2025-08-17)
@@ -26,12 +26,11 @@ The project prioritizes full compatibility with IRC standards including IRCv3 ex
2626
- **v0.4.0 Major Feature Release**: Lua scripting engine, plugin system, DCC protocol, IRCv3 extensions, flood protection, proxy support, 266 tests ✅
2727
- **v0.4.1 Patch Release**: CI workflow fixes, security advisory updates, Windows DCC test fix, dependency updates ✅
2828
- **v0.4.2 Patch Release**: Actions artifact v7/v8, closed 11 Dependabot PRs, 3 issues, 1 alert; zero open items ✅
29-
- **GUI Framework**: Material Design 3 with iced 0.14.0 - reactive rendering, time-travel debugging
30-
- **Working Features**: typography, input, chip, plus major fixes in 7+ other components (0 errors)
31-
- **Implementation Complete**: SerializableColor wrapper, iced 0.14.0 API migration, lifetime management, ALL components fully functional
32-
- **Current Status**: 266 tests passing, ZERO errors, ZERO clippy warnings
33-
- **Interface Status**: Main branch stable with iced 0.14.0 and Material Design 3 integration
34-
- **Test Status**: 266 tests (233 unit + 33 integration) across all workspace crates
29+
- **v0.5.0 GUI Migration**: iced 0.14.0 replaced with Dioxus 0.7.3 + Axum, 18 RSX components, CSS themes
30+
- **GUI Framework**: Dioxus 0.7.3 with Signal-based reactivity, Tailwind CSS, 22 CSS themes
31+
- **Current Status**: 254 tests passing, ZERO errors, ZERO clippy warnings
32+
- **Interface Status**: Dioxus branch with reactive GUI and Axum web target
33+
- **Test Status**: 254 tests across all workspace crates
3534

3635
The repository now contains:
3736

@@ -56,7 +55,7 @@ The repository now contains:
5655

5756
- **Language**: Rust
5857
- **Async Runtime**: Tokio for network I/O
59-
- **GUI Framework**: Iced 0.14.0 (functional API implementation)
58+
- **GUI Framework**: Dioxus 0.7.3 (reactive RSX components, Axum fullstack)
6059
- **TUI Framework**: ratatui
6160
- **TLS**: rustls
6261
- **Scripting**: mlua for Lua integration
@@ -77,7 +76,7 @@ cargo test
7776
cargo test -- --nocapture # Show println! output
7877

7978
# Run the client (multiple modes available)
80-
cargo run # GUI mode (Iced 0.14.0 interface)
79+
cargo run # GUI mode (Dioxus desktop)
8180
cargo run -- --cli # CLI prototype mode for testing
8281
cargo run -- --tui # TUI mode with ratatui
8382
cargo run -- --config path/to/config.toml # With custom config
@@ -225,18 +224,18 @@ RustIRC/
225224

226225
1. **Systematic Approach**: Implement everything, never remove/disable functionality to fix errors
227226
2. **Platform Integration**: Use conditional compilation (#[cfg]) with complete implementations
228-
3. **Message Routing**: Ensure proper Task<MessageType> conversions and Into<> implementations
229-
4. **Size Constraints**: Use Iced Size parameters for min/max dialog dimensions
227+
3. **Signal Reactivity**: Use `Signal<AppState>` with automatic re-rendering in Dioxus components
228+
4. **CSS Theming**: Use CSS custom properties with `[data-theme="..."]` selectors for themes
230229
5. **App State Sync**: Preferences dialogs must reflect current application state values
231230

232231
### GUI Debugging & Issue Resolution
233232

234233
When addressing GUI issues in RustIRC:
235234

236235
1. **IRC Protocol Verification**: Always check field names against protocol definitions (e.g., WHOIS uses `targets` not `target/nickmasks`)
237-
2. **Iced 0.14.0 Styling**: Use proper border syntax with `0.0.into()` for radius, container styling for pane dividers
236+
2. **Dioxus RSX Styling**: Use Tailwind CSS classes in RSX `class` attributes; CSS custom properties for themes
238237
3. **Case-Sensitive Filtering**: Handle both "System" and "system" message senders in filtering logic
239-
4. **State Synchronization**: Use getter methods like `get_filter_state()` to sync UI checkmarks with actual filter states
238+
4. **State Synchronization**: Use Signal-based reactive state with `use_irc_event_handler` coroutine bridge
240239

241240
### Build and Testing Workflow
242241

@@ -295,28 +294,31 @@ Ensuring CLI has full GUI feature equivalency:
295294
- **Complete Functionality**: Implement missing fields and state management
296295
- **Rust Compliance**: Ensure borrow checker satisfaction through proper dereferencing
297296

298-
### GUI Warning Integration Patterns (August 21, 2025)
297+
### Dioxus GUI Patterns (March 2026)
299298

300-
**Current GUI Warnings Requiring Implementation**:
299+
**Dioxus 0.7.3 Architecture Patterns**:
301300

302-
1. **Dialog System Integration**:
301+
1. **Signal-Based State Management**:
303302

304-
- Connect `current_font_size`, `current_notifications`, `current_compact` to actual settings UI
305-
- Implement settings dialog state synchronization
303+
- Use `Signal<AppState>` for reactive state with automatic re-rendering
304+
- EventBus bridge via `use_coroutine()` connects core events to Dioxus signals
305+
- `IrcActions` as Copy-type dispatcher for connect, send, join, leave operations
306306

307-
2. **Message Processing Integration**:
307+
2. **Component Architecture**:
308308

309-
- Connect `irc_message_receiver` to actual IRC message handling pipeline
310-
- Implement `toggle_user_list` and `update_user_list` functionality
309+
- 18 RSX components in `crates/rustirc-gui/src/components/`
310+
- `spawn_forever()` for network operations (survives component unmount)
311+
- `OnceLock<Arc<IrcClient>>` global pattern for Copy-compatible `IrcActions`
311312

312-
3. **Menu System Integration**:
313+
3. **CSS Theme System**:
313314

314-
- Connect `active_menu` field to menu rendering and state management
315-
- Implement all menu rendering methods (file, edit, view, server, channel, tools, help)
315+
- 22 themes as CSS custom properties with `[data-theme="..."]` selectors
316+
- Tailwind CSS utility classes in RSX `class` attributes
317+
- IRC color codes as `.irc-color-N` CSS classes
316318

317-
4. **Testing Framework Integration**:
318-
- Implement `execute_task` method for test harness functionality
319-
- Connect test execution to actual GUI testing pipeline
319+
4. **Asset Loading**:
320+
- Use `include_str!()` + `document::Style` for CSS (not `asset!()` macro)
321+
- `Dioxus.toml` configures dx CLI for hot-patching and asset directory
320322

321323
### Advanced Interface Features Complete Pattern (August 21, 2025 9:18 PM EDT)
322324

@@ -509,57 +511,6 @@ Ensuring CLI has full GUI feature equivalency:
509511
- **Benefit**: Future reference for what doesn't work and why
510512
- **Repository state**: Stable v0.3.5 at commit 4e0fcf6
511513

512-
### Material Design 3 Implementation Patterns (August 26, 2025)
514+
### Historical Note
513515

514-
**SerializableColor Architecture for Config Persistence**:
515-
516-
1. **Wrapper Type Implementation**:
517-
518-
- Create `SerializableColor` struct wrapping `[f32; 4]` for RGBA values
519-
- Implement `serde::Serialize` and `serde::Deserialize` traits
520-
- Add bidirectional conversions with `From<iced::Color>` and `Into<iced::Color>`
521-
- Include `Copy` trait for performance optimization
522-
523-
2. **API Compatibility Methods**:
524-
525-
- Implement `scale_alpha()` method for transparency adjustments
526-
- Provide color manipulation methods matching iced::Color API
527-
- Enable `.into()` conversions throughout codebase
528-
529-
3. **Proven Error Resolution Patterns**:
530-
531-
- **Clone-before-move**: Resolve lifetime issues with `.clone()` before moving
532-
- **Into conversions**: Use `.into()` for automatic color type conversions
533-
- **Module-by-module**: Fix typography/input/chip first (0 errors), then apply patterns
534-
535-
4. **Achievement Metrics**:
536-
- Error reduction: 424 → 0 (100% reduction achieved)
537-
- All modules: ZERO errors across all components
538-
- Final status: 100% functional Material Design 3 implementation
539-
540-
### Material Design 3 100% Completion Patterns (August 26, 2025 09:42 PM EDT)
541-
542-
**Complete Error Elimination Strategy**:
543-
544-
1. **Multi-Stage Sub-Agent Approach**:
545-
- Sub-agent 1: Reduced errors from 424 → 40 (91% reduction)
546-
- Sub-agent 2: Eliminated remaining 40 → 0 (100% complete)
547-
- Key: Systematic application of proven patterns
548-
549-
2. **Lifetime Management Resolution**:
550-
- E0373: Extract values before move closures
551-
- E0515: Clone instead of borrowing for return values
552-
- E0382: Clone-before-move pattern for ownership
553-
- E0310: Proper 'static lifetime annotations
554-
555-
3. **Production Code Quality**:
556-
- ZERO compilation errors achieved
557-
- ZERO clippy warnings (73 warnings eliminated)
558-
- 6 comprehensive doctests added and passing
559-
- All public APIs documented with examples
560-
561-
4. **Component Completeness**:
562-
- All Material Design 3 components 100% functional
563-
- SerializableColor with full config persistence
564-
- MaterialText/MaterialButton .build() APIs complete
565-
- Responsive layouts with proper enum traits
516+
The Material Design 3 / iced implementation patterns from v0.3.x-v0.4.x have been superseded by the Dioxus 0.7.3 migration in v0.5.0. The iced widget system, SerializableColor wrapper, and iced-specific lifetime patterns are no longer applicable. See the "Dioxus GUI Patterns" section above for current architecture guidance.

Cargo.lock

Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ clap = { version = "4.5.53", features = ["derive"] }
6969

7070
[package]
7171
name = "rustirc"
72-
version = "0.4.2"
72+
version = "0.5.0"
7373
edition = "2021"
7474
rust-version = "1.80.0"
7575
authors = ["RustIRC Contributors"]

0 commit comments

Comments
 (0)