Skip to content

Conversation

@doublegate
Copy link
Owner

@doublegate doublegate commented Jan 10, 2026

Summary

Complete migration of the rustirc-gui crate from iced 0.13.1 to iced 0.14.0, resolving 82+ breaking API changes across 18 files. This is a major framework upgrade that brings reactive rendering improvements, time-travel debugging capabilities, and enhanced API design to the RustIRC GUI.

Breaking API Changes Resolved

Category Old API New API
Space Widget Space::with_width/with_height Space::new().width/height()
Application iced::application(title, update, view) iced::application(boot_fn, update, view).title()
Space Helpers horizontal_space(), vertical_space() Space::new().width/height(Length::Fill)
Rule Widget horizontal_rule(height) rule::horizontal(height)
Checkbox checkbox(label, value) checkbox(value).label(label)
Scrollable ID scrollable::Id iced::widget::Id
Scrollable Ops scrollable::snap_to operation::snap_to
Input Status text_input::Status::Focused (unit) text_input::Status::Focused { is_hovered } (struct)
Style Structs N/A Added snap: bool field to button/container::Style
Pixels Type u16 f32 for Pixels trait bounds

Files Modified (18 total)

Core Application:

  • Cargo.toml - Version bump to iced 0.14.0
  • crates/rustirc-gui/src/app.rs - Application API and rule widget
  • crates/rustirc-gui/src/dialogs.rs - Space, checkbox, and max_width APIs
  • crates/rustirc-gui/src/material_demo.rs - Application boot function

Widgets:

  • crates/rustirc-gui/src/widgets/message_view.rs - Scrollable ID and operations
  • crates/rustirc-gui/src/widgets/user_list.rs - Space widget
  • crates/rustirc-gui/src/widgets/tab_bar.rs - Space widget
  • crates/rustirc-gui/src/widgets/status_bar.rs - Space widget
  • crates/rustirc-gui/src/widgets/server_tree.rs - Space widget
  • crates/rustirc-gui/src/widgets/input_area.rs - Space widget

Material Design 3 Components:

  • crates/rustirc-gui/src/components/atoms/button.rs - button::Style snap field
  • crates/rustirc-gui/src/components/atoms/input.rs - text_input::Status pattern
  • crates/rustirc-gui/src/components/molecules/message_bubble.rs - container::Style snap field
  • crates/rustirc-gui/src/components/molecules/search_bar.rs - text_input::Status pattern
  • crates/rustirc-gui/src/components/organisms/responsive_layout.rs - Space widget and Pixels type
  • crates/rustirc-gui/src/components/organisms/rich_text_editor.rs - text_input::Status patterns

Test plan

  • Build succeeds with zero compilation errors
  • Clippy passes with zero warnings (cargo clippy -- -D warnings)
  • All 131 tests pass (unit + doctests across all workspace crates)
  • Manual testing: cargo run - GUI launches and functions correctly
  • Manual testing: cargo run -- --material-demo - Material Design 3 demo works
  • Manual testing: Basic IRC operations (connect, join channel, send messages)

Quality Assurance

Check Status
Compilation Zero errors
Clippy Zero warnings
Tests 131/131 passing
Formatting cargo fmt clean

Migration Notes

This migration was performed systematically by:

  1. Updating the iced version in workspace Cargo.toml
  2. Running initial build to capture all 82+ compilation errors
  3. Applying fixes in batches based on error categories
  4. Verifying each fix with incremental builds
  5. Running full quality assurance suite

The snap: bool field added to Style structs controls whether the widget snaps to pixel boundaries for crisp rendering.


Generated with Claude Code


Note

Major GUI framework upgrade with targeted refactors for Iced 0.14.0.

  • Upgrade iced to 0.14.0; switch to iced::application(boot_fn, update, view).title(...) in app.rs and material_demo.rs
  • Replace deprecated APIs across widgets/components:
    • Space::with_*/horizontal_space/vertical_spaceSpace::new().width/height(...)
    • horizontal_rulerule::horizontal
    • checkbox(label, value)checkbox(value).label(label)
    • scrollable::Idiced::widget::Id; scrollable::snap_tooperation::snap_to
    • text_input::Status::Focused (unit) → Focused { .. } pattern matching
  • Add required snap: bool to button::Style and container::Style; adjust Pixels trait usages from u16 to f32
  • Touches core app, dialogs, material demo, and multiple widgets (message_view, user_list, tab_bar, status_bar, server_tree, input_area) to align with new APIs
  • QA: build clean, clippy clean, and all 131 tests passing

Written by Cursor Bugbot for commit c7c4dac. This will update automatically on new commits. Configure here.

Complete migration of rustirc-gui crate to iced 0.14.0, resolving 82+
breaking API changes across 18 files.

Breaking API changes fixed:
- Space widget: with_width/with_height -> Space::new().width/height()
- Application API: Now uses boot function pattern with .title() method
- Horizontal/vertical space helpers removed, use Space::new()
- Rule widget: horizontal_rule -> rule::horizontal
- Checkbox API: checkbox(label, value) -> checkbox(value).label(label)
- Scrollable IDs: scrollable::Id -> iced::widget::Id
- Scrollable operations: scrollable::snap_to -> operation::snap_to
- text_input::Status::Focused is now a struct variant with is_hovered
- Style structs require new snap: bool field (button, container)
- Pixels type bounds changed from u16 to f32

Quality assurance:
- Zero compilation errors
- Zero clippy warnings
- All 131 tests passing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 10, 2026 21:46
@github-actions
Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

@gemini-code-assist
Copy link

Summary of Changes

Hello @doublegate, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request performs a significant upgrade of the rustirc-gui crate, migrating its underlying GUI framework from iced version 0.13.1 to 0.14.0. This update modernizes the GUI, incorporating new features like reactive rendering improvements and time-travel debugging, while also refining the API design. The migration involved resolving over 82 breaking API changes across numerous files, ensuring the application benefits from the latest framework advancements.

Highlights

  • Major Framework Upgrade: The rustirc-gui crate has been fully migrated from iced version 0.13.1 to 0.14.0, resolving over 82 breaking API changes across 18 files.
  • Enhanced GUI Capabilities: This upgrade introduces reactive rendering improvements, time-travel debugging capabilities, and an enhanced API design to the RustIRC GUI.
  • API Modernization: Key API changes include migrating Space widget constructors (e.g., Space::with_width to Space::new().width()), updating the application boot function, standardizing rule widgets, and refining checkbox and text input status handling.
  • Pixel Alignment Control: A new snap: bool field has been added to button::Style and container::Style structs, allowing for precise pixel boundary snapping for crisp rendering.
  • Dependency Updates: Numerous dependencies in Cargo.lock have been updated or removed to align with the new iced version and its transitive requirements.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR successfully migrates the RustIRC GUI from iced framework version 0.13.1 to 0.14.0, addressing 82+ breaking API changes. The migration is comprehensive and mechanical, updating widget APIs, application bootstrapping, style structures, and type signatures to align with the new framework version.

Changes:

  • Updated iced dependency from 0.13.1 to 0.14.0 in Cargo.toml with corresponding dependency tree changes
  • Migrated all Space widget usages from deprecated Space::with_width/with_height to builder pattern Space::new().width/height()
  • Updated application initialization from iced::application(title, update, view) to iced::application(boot_fn, update, view).title()
  • Converted checkbox API from checkbox(label, value) to checkbox(value).label(label) builder pattern
  • Migrated scrollable IDs and operations to new module structure (scrollable::Idiced::widget::Id, scrollable::snap_tooperation::snap_to)
  • Updated text_input::Status::Focused from unit variant to struct variant with is_hovered field
  • Added required snap: bool field to Style structs and changed Pixels type bounds from u16 to f32
  • Replaced horizontal_rule(height) with rule::horizontal(height)

Reviewed changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Cargo.toml Bumped iced version to 0.14.0 with updated comment
Cargo.lock Extensive dependency tree updates for iced 0.14.0 ecosystem
CHANGELOG.md Comprehensive documentation of migration changes and file modifications
crates/rustirc-gui/src/app.rs Application API migration, rule widget updates, snap field addition, version comments
crates/rustirc-gui/src/dialogs.rs Space widget API, checkbox builder pattern, max_width type change (u16→f32)
crates/rustirc-gui/src/material_demo.rs Application boot function with default state initializer
crates/rustirc-gui/src/widgets/message_view.rs Scrollable ID/operations migration, Space widget updates
crates/rustirc-gui/src/widgets/user_list.rs Space widget API migrations (4 instances)
crates/rustirc-gui/src/widgets/tab_bar.rs Space widget API migrations (7 instances)
crates/rustirc-gui/src/widgets/status_bar.rs Space widget API migrations (8 instances)
crates/rustirc-gui/src/widgets/server_tree.rs Space widget API migrations with multi-line conversions
crates/rustirc-gui/src/widgets/input_area.rs Space widget API migrations (3 instances)
crates/rustirc-gui/src/components/atoms/button.rs Added snap field to button::Style structs
crates/rustirc-gui/src/components/atoms/input.rs Updated text_input::Status::Focused pattern matching
crates/rustirc-gui/src/components/molecules/message_bubble.rs Added snap field to container::Style
crates/rustirc-gui/src/components/molecules/search_bar.rs Updated text_input::Status::Focused pattern matching
crates/rustirc-gui/src/components/organisms/responsive_layout.rs Space widget API and Pixels type changes (u16→f32)
crates/rustirc-gui/src/components/organisms/rich_text_editor.rs Updated text_input::Status::Focused patterns (3 instances)

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a significant and well-executed migration of the iced GUI framework from version 0.13.1 to 0.14.0. The changes are extensive, touching many files to adapt to the new APIs, and you have done a thorough job. My review includes a few suggestions to improve code maintainability by replacing magic numbers with named constants, which will make the layout logic clearer. I also noted a minor discrepancy in the changelog's file count. Overall, this is an excellent update that brings the project's GUI framework up to date.

- **Style Structs**: Added required `snap: bool` field to `button::Style` and `container::Style`
- **Pixels Type**: Updated return types from `u16` to `f32` for Pixels trait bounds

#### Files Modified (19 total)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The number of modified files is stated as 19, but there appear to be 18 files modified in this pull request. Please update the count for accuracy.

Suggested change
#### Files Modified (19 total)
#### Files Modified (18 total)

Comment on lines +606 to 616
fn adaptive_spacing(&self) -> f32 {
if self.adaptive_spacing {
match self.current_breakpoint {
Breakpoint::Compact => 8,
Breakpoint::Medium => 12,
_ => 16,
Breakpoint::Compact => 8.0,
Breakpoint::Medium => 12.0,
_ => 16.0,
}
} else {
16
16.0
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve readability and maintainability, consider extracting the magic numbers for spacing into named constants. This makes the code easier to understand and modify. For broader use, these constants could be defined at the module or impl level.

The same principle applies to the adaptive_padding function.

    fn adaptive_spacing(&self) -> f32 {
        const COMPACT_SPACING: f32 = 8.0;
        const MEDIUM_SPACING: f32 = 12.0;
        const DEFAULT_SPACING: f32 = 16.0;

        if self.adaptive_spacing {
            match self.current_breakpoint {
                Breakpoint::Compact => COMPACT_SPACING,
                Breakpoint::Medium => MEDIUM_SPACING,
                _ => DEFAULT_SPACING,
            }
        } else {
            DEFAULT_SPACING
        }
    }

Comment on lines +106 to +109
Space::new()
.width(Length::Fixed(16.0))
.height(Length::Fixed(16.0))
.into()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The magic number 16.0 is used for spacing. To improve readability and maintainability, consider defining it as a constant, for example const ICON_SPACER_SIZE: f32 = 16.0;. This constant could then be used here and in other places where this spacing is required, like for channel indentation on lines 167 and 212.

@doublegate doublegate self-assigned this Jan 10, 2026
@doublegate doublegate merged commit 8853208 into main Jan 10, 2026
29 checks passed
@doublegate doublegate deleted the feature/iced-0.14.0-migration branch January 10, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants