Skip to content

bb-imager-ui: Add new UI - #710

Open
Ayush1325 wants to merge 4 commits into
beagleboard:mainfrom
Ayush1325:ui-simplify
Open

bb-imager-ui: Add new UI#710
Ayush1325 wants to merge 4 commits into
beagleboard:mainfrom
Ayush1325:ui-simplify

Conversation

@Ayush1325

Copy link
Copy Markdown
Member
  • A simplified UI to reduce number of actions required.
  • Only has Light theme, so that's a minus.

Copilot AI lite review requested due to automatic review settings August 5, 2026 10:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 introduces a new shared UI crate (bb-imager-ui) to provide a simplified, unified GUI flow and rewires bb-imager-gui to render these new pages instead of its legacy UI modules.

Changes:

  • Add the new bb-imager-ui crate (pages, shared helpers, assets, and preview examples) and include it in the workspace.
  • Replace bb-imager-gui’s in-crate UI implementations with calls into bb-imager-ui, refactoring GUI state to match the new page/state types.
  • Remove now-unused GUI UI modules and bb-iced-widgets canvas widgets, and update board icon URLs in config.json.

Reviewed changes

Copilot reviewed 52 out of 66 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
Makefile Adds preview-* targets to run bb-imager-ui example pages.
config.json Updates several board icon URLs to point at beagleboard.org-hosted images.
Cargo.toml Adds bb-imager-ui to the workspace members.
Cargo.lock Adds the bb-imager-ui package and links it where needed.
bb-imager-ui/Cargo.toml New crate manifest for the shared UI library.
bb-imager-ui/src/lib.rs Defines the shared UI message enum and centralizes app theming/window settings.
bb-imager-ui/src/constants.rs Adds UI theme colors, font bytes, and embedded icon handles.
bb-imager-ui/src/helpers.rs Shared UI layout helpers + ETA formatting/math (with tests).
bb-imager-ui/src/board_selection.rs Device/board selection page implementation.
bb-imager-ui/src/img_selection.rs OS/image selection page implementation.
bb-imager-ui/src/dest_selection.rs Destination selection page implementation.
bb-imager-ui/src/customization.rs Customization page implementation (sysconfig/cloud-init).
bb-imager-ui/src/review.rs Review page implementation.
bb-imager-ui/src/flashing.rs Flashing progress page implementation.
bb-imager-ui/src/flash_success.rs Flash-success page implementation.
bb-imager-ui/src/flash_fail.rs Flash-failure page implementation.
bb-imager-ui/src/flash_cancel.rs Flash-cancel page implementation.
bb-imager-ui/src/app_options.rs App options/info page implementation.
bb-imager-ui/examples/board_selection/main.rs Preview example for board selection.
bb-imager-ui/examples/img_selection/main.rs Preview example for image selection (with icon downloads).
bb-imager-ui/examples/dest_selection/main.rs Preview example for destination selection.
bb-imager-ui/examples/customization-sysconfig/main.rs Preview example for sysconfig customization.
bb-imager-ui/examples/customization-cloudinit/main.rs Preview example for cloud-init customization.
bb-imager-ui/examples/review/main.rs Preview example for review page.
bb-imager-ui/examples/flashing/main.rs Preview example for flashing/progress page.
bb-imager-ui/examples/flash-success/main.rs Preview example for success page.
bb-imager-ui/examples/flash-fail/main.rs Preview example for failure page.
bb-imager-ui/examples/flash-cancel/main.rs Preview example for cancel page.
bb-imager-ui/examples/app-options/main.rs Preview example for app-options page.
bb-imager-ui/assets/icons/board.svg New embedded icon asset for the shared UI.
bb-imager-ui/assets/icons/search.svg New embedded icon asset for the shared UI.
bb-imager-ui/assets/icons/format.svg New embedded icon asset for the shared UI.
bb-imager-ui/assets/icons/file-add.svg New embedded icon asset for the shared UI.
bb-imager-ui/assets/icons/file-save.svg New embedded icon asset for the shared UI.
bb-imager-ui/assets/icons/usb.svg New embedded icon asset for the shared UI.
bb-imager-ui/assets/icons/content-copy.svg New embedded icon asset for the shared UI.
bb-imager-ui/assets/icons/arrow-back.svg New embedded icon asset for the shared UI.
bb-imager-ui/assets/icons/beagleboard-logo.svg New embedded logo asset for the shared UI.
bb-imager-ui/assets/icons/icon.png New window icon (Git LFS) for the shared UI.
bb-imager-ui/assets/fonts/Nunito-Regular-subset.ttf New font asset (Git LFS) for the shared UI.
bb-imager-ui/assets/fonts/Nunito-Bold-subset.ttf New font asset (Git LFS) for the shared UI.
bb-imager-gui/Cargo.toml Adds dependency on bb-imager-ui.
bb-imager-gui/src/main.rs Switches GUI startup to wrap the app with bb_imager_ui::application.
bb-imager-gui/src/ui/mod.rs Replaces old per-page UI modules with bb-imager-ui page render calls.
bb-imager-gui/src/state.rs Refactors GUI state to store bb-imager-ui page state and introduces a flashing context to preserve selections.
bb-imager-gui/src/persistance.rs Adds conversions between persisted config and bb-imager-ui customization types; removes BCF/Zepto customization persistence.
bb-imager-gui/src/db/mod.rs Adjusts DB types/queries to return bb-imager-ui list item structs for boards/images.
bb-imager-gui/src/db/tests.rs Updates tests to match new string/container types and new image ID enums.
bb-imager-gui/src/constants.rs Removes legacy GUI UI/theme/font/icon constants that moved into bb-imager-ui.
bb-imager-gui/src/ui/review.rs Removes legacy review UI implementation (migrated to bb-imager-ui).
bb-imager-gui/src/ui/image_selection.rs Removes legacy image-selection UI implementation (migrated to bb-imager-ui).
bb-imager-gui/src/ui/helpers.rs Removes legacy UI helper layer (migrated to bb-imager-ui).
bb-imager-gui/src/ui/flash.rs Removes legacy flashing UI implementation (migrated to bb-imager-ui).
bb-imager-gui/src/ui/flash_finish.rs Removes legacy finish UI implementation (migrated to bb-imager-ui).
bb-imager-gui/src/ui/destination_selection.rs Removes legacy destination-selection UI implementation (migrated to bb-imager-ui).
bb-imager-gui/src/ui/configuration.rs Removes legacy configuration UI implementation (migrated to bb-imager-ui).
bb-imager-gui/src/ui/board_selection.rs Removes legacy board-selection UI implementation (migrated to bb-imager-ui).
bb-imager-gui/src/ui/app_info.rs Removes legacy app-info UI implementation (migrated to bb-imager-ui app-options).
bb-imager-gui/assets/icons/info.svg Removes legacy asset no longer used by GUI UI.
bb-imager-gui/assets/icons/arrow-forward-ios.svg Removes legacy asset no longer used by GUI UI.
bb-iced-widgets/src/lib.rs Removes exports for canvas-based progress widgets no longer used.
bb-iced-widgets/src/progress_circle.rs Removes unused canvas progress-circle widget implementation.
bb-iced-widgets/src/circle_bar.rs Removes unused canvas circle-bar widget implementation.
bb-bmap-parser/tests/builder.rs Test refactor: introduces Case type alias and reformats builders for readability.
Suppressed comments (1)

bb-imager-gui/src/persistance.rs:190

  • Keymap is dropped when converting SdSysconfCustomization into bb_imager_ui::customization::CloudInit (keymap: None). This means a user-selected keymap won’t be restored in the UI and can’t be persisted reliably.
            hostname: value.hostname.map(Into::into),
            timezone: value.timezone,
            // TODO: Fix
            keymap: None,
            user: value.user.map(|u| (u.username.into(), u.password.into())),

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread bb-imager-ui/src/helpers.rs Outdated
Comment on lines +244 to +246
crate::flashing::Progress::Verifying | crate::flashing::Progress::Customizing => {
Some(Duration::from_secs(1))
}
Comment thread Makefile
.PHONY: debug-gui
debug-gui:
$(_DIOXUS_CLI) serve -p bb-imager-gui ${_RUST_ARGS_GUI} --features debug

Comment thread bb-imager-gui/src/persistance.rs Outdated
Comment on lines +40 to +41
// TODO: Fix
keymap: None,
Comment thread bb-imager-ui/src/lib.rs
Comment on lines +75 to +77
let icon = iced::window::icon::from_file_data(constants::WINDOW_ICON_BYTES, None).ok();
assert!(icon.is_some());

Comment thread bb-imager-ui/src/review.rs Outdated
Comment on lines +10 to +16
pub struct State {
pub has_customization: bool,
pub device_name: Box<str>,
pub software_name: Box<str>,
pub storage: (Box<str>, Option<u64>),
pub modificiations: Box<[&'static str]>,
pub copy_text: std::sync::Arc<str>,
Comment thread bb-imager-ui/src/lib.rs
Comment on lines +33 to +37
DestinationFilter(bool),

UpdateCustomizaton(customization::Customization),
Next,

Comment on lines +52 to +55
widget::text("Device is ready to be used with your BeagleBoard hardware!")
.style(widget::text::primary)
.style(widget::text::primary)
.font(FONT_BOLD),
Comment on lines +43 to +46
Progress::Writing(f) => (
widget::text(format!("Writing... ({}%)", (f * 100.0) as u8)),
widget::progress_bar(0.0..=1.0, f),
),
Copilot AI review requested due to automatic review settings August 5, 2026 10:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 52 out of 66 changed files in this pull request and generated no new comments.

Suppressed comments (8)

bb-imager-ui/src/helpers.rs:330

  • time_remaining_from returns a fixed 1s ETA for Progress::Verifying, but this test currently asserts None, so the unit test will fail and make test/CI will break. Either the function or this expectation needs to change; updating the assertion to match the current behavior is the smallest fix.
    bb-imager-gui/src/persistance.rs:42
  • Keymap is currently dropped when building bb_imager_ui::customization::CloudInit from persisted config (keymap: None with a TODO). This will cause users’ saved keymap preference to be lost/never pre-populated in the new UI.
                .as_ref()
                .and_then(|x| x.sysconf.as_ref().and_then(|y| y.timezone)),
            // TODO: Fix
            keymap: None,
            user: value.sd_customization.as_ref().and_then(|x| {

bb-imager-gui/src/persistance.rs:190

  • Keymap is currently dropped when converting persisted SdSysconfCustomization into bb_imager_ui::customization::CloudInit (keymap: None with a TODO). This prevents round-tripping the keymap field through persistence and will surprise users who previously set it.
            hostname: value.hostname.map(Into::into),
            timezone: value.timezone,
            // TODO: Fix
            keymap: None,
            user: value.user.map(|u| (u.username.into(), u.password.into())),

bb-imager-ui/src/lib.rs:37

  • The message variant is misspelled as UpdateCustomizaton (missing an "i"). Since this is part of the public bb_imager_ui::Message API and is used across multiple modules/crates, the typo will spread and be painful to fix later. Consider renaming to UpdateCustomization (optionally leaving a deprecated alias for compatibility).
    bb-imager-ui/src/review.rs:16
  • Field name modificiations is misspelled; because review::State is part of the bb_imager_ui public API and the field is used throughout the UI, this typo will leak into more call sites. Renaming to modifications (and updating all uses) will avoid carrying the typo forward.
    bb-imager-ui/src/flash_success.rs:55
  • Redundant .style(widget::text::primary) is applied twice to the same widget::text call, which is confusing and makes future edits error-prone.
    bb-imager-ui/src/flash_success.rs:16
  • Field name modificiations is misspelled in flash_success::State. Since this struct is part of the bb_imager_ui public surface, the typo will propagate to callers; renaming to modifications (and updating all references) will prevent an API footgun.
    Makefile:532
  • The help comment documents the target as preview-image-selection, but the actual make target is named preview-img-selection. This mismatch makes make help output misleading and breaks copy/paste.
## preview: preview-image-selection: Preview Image selection page.
preview-img-selection:
	$(_DIOXUS_CLI) serve -p bb-imager-ui --example img_selection --features debug

Copilot AI review requested due to automatic review settings August 5, 2026 10:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 52 out of 66 changed files in this pull request and generated no new comments.

Suppressed comments (9)

bb-imager-ui/src/lib.rs:36

  • UpdateCustomizaton is misspelled (missing 'i'). Since this is a core message variant used by the GUI, the typo will be repeated across many match statements and makes the API look unpolished. Consider renaming to UpdateCustomization and updating all call sites.
    bb-imager-gui/src/persistance.rs:189
  • Keymap persistence is also dropped when converting SdSysconfCustomization -> bb_imager_ui::customization::CloudInit (keymap: None). This prevents restoring a saved keymap into the UI; resolve the stored string to a 'static entry via KEYMAP_LAYOUTS.
            // TODO: Fix
            keymap: None,

bb-imager-ui/src/review.rs:15

  • Field name modificiations is misspelled. Since this is part of the UI state type, it will propagate throughout the crate/API and make call sites harder to read/search. Consider renaming it to modifications and updating all references.
    bb-imager-ui/src/helpers.rs:252
  • time_remaining_from returns Some(1s) for Progress::Verifying, but the tests below expect verifying to have no ETA (and it’s also likely misleading to show a fixed 1s during verify). This currently makes the unit tests fail and produces inconsistent UI behavior.
    bb-imager-ui/src/lib.rs:76
  • assert!(icon.is_some()) will panic at startup if the window icon bytes cannot be decoded (e.g., missing/incorrect LFS assets). Since iced::window::Settings::icon is already optional, it’s safer to allow None here and continue running without an icon.
    bb-imager-ui/src/flash_success.rs:55
  • This text has .style(widget::text::primary) applied twice, which is redundant and makes the styling chain harder to read.
    Makefile:530
  • The help text says preview-image-selection, but the actual target is preview-img-selection. This mismatch makes make help output misleading.
## preview: preview-image-selection: Preview Image selection page.

bb-imager-gui/src/persistance.rs:41

  • Keymap persistence is currently dropped on load (keymap: None with a TODO), so a previously-saved keymap won’t be restored into the UI. Since bb-imager-ui expects Option<&'static str>, you can map the persisted String back onto one of the KEYMAP_LAYOUTS entries (which are already 'static).

This issue also appears on line 188 of the same file.

            // TODO: Fix
            keymap: None,

bb-imager-ui/src/flash_success.rs:15

  • Field name modificiations is misspelled. As a public-ish state struct field, this typo will spread through the codebase and makes usage/searching harder. Consider renaming it to modifications and updating all references.

Copilot AI review requested due to automatic review settings August 5, 2026 10:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 52 out of 66 changed files in this pull request and generated 1 comment.

Suppressed comments (13)

bb-imager-gui/src/db/mod.rs:56

  • rusqlite::Row::get cannot deserialize directly into Box<str> / Option<Arc<str>> (no FromSql impls), so OsImage::from_row is likely to fail to compile. Read String/Option<String> and convert.
            id: value.get("id")?,
            name: value.get("name")?,
            init_format: value.get("init_format")?,
            info_text: value.get("info_text")?,
            url: value.get("url")?,

bb-imager-gui/src/db/mod.rs:474

  • Same rusqlite::Row::get issue here: bb_imager_ui::board_selection::Board.name is a Box<str>, which rusqlite will not deserialize into directly. Convert from String instead.
                Ok(bb_imager_ui::board_selection::Board {
                    id: value.get("id")?,
                    icon: value.get("icon")?,
                    name: value.get("name")?,
                })

bb-imager-gui/src/db/mod.rs:540

  • ImageItem.label/description are Cow<'static, str>, which rusqlite cannot deserialize into directly. Deserialize as String and .into() the Cow to avoid a compile error.
                    id: bb_imager_ui::img_selection::ImageId::OsImage(value.get("id")?),
                    label: value.get("name")?,
                    icon: value.get("icon")?,
                    description: value.get("description")?,
                    size: Some(size as u64),

bb-imager-gui/src/db/mod.rs:579

  • Same rusqlite::Row::get issue here: ImageItem.label/description are Cow<'static, str>, so they need to be built from String rather than deserialized directly.
                    label: value.get("name")?,
                    icon: value.get("icon")?,
                    description: value.get("description")?,
                    size: None,
                    release_date: None,

bb-imager-gui/src/db/mod.rs:711

  • Same rusqlite::Row::get issue: ImageItem.label/description are Cow<'static, str> and should be created from String (then .into()), otherwise this closure likely won’t compile.
                        id: bb_imager_ui::img_selection::ImageId::OsImage(value.get("id")?),
                        label: value.get("name")?,
                        icon: value.get("icon")?,
                        description: value.get("description")?,
                        size: Some(size as u64),

bb-imager-ui/src/helpers.rs:253

  • time_remaining_from currently returns a fixed 1s ETA for Verifying, but the unit test below asserts Verifying should return None. This makes the test fail (and likely the UI inconsistent).
    bb-imager-ui/src/flashing.rs:46
  • The Writing(f32) progress value is used directly for both the percent label and progress_bar. If f is ever >1.0 (or <0.0), the percent can become nonsensical and the progress bar may misbehave. Clamp f to [0.0, 1.0] before rendering.
    bb-imager-ui/src/lib.rs:76
  • Asserting the window icon is present will panic the whole app if the icon bytes are missing/corrupt (e.g. bad LFS checkout). Since Settings.icon is optional, this should degrade gracefully instead of crashing.
    bb-imager-ui/src/flash_success.rs:55
  • This text has .style(widget::text::primary) applied twice; the second call is redundant and makes the chain harder to read.
    bb-imager-ui/src/review.rs:15
  • Field name modificiations is misspelled (should be modifications). Keeping the typo in a public-ish UI state struct makes it easy to propagate and harder to refactor later.
    bb-imager-ui/src/lib.rs:35
  • Message variant UpdateCustomizaton is misspelled (should be UpdateCustomization). This typo is now part of the UI message API and will make downstream code harder to read/search.
    bb-imager-gui/src/persistance.rs:41
  • Keymap persistence is currently dropped (keymap: None), so saved keymap preferences won’t round-trip through GuiConfiguration. Since the UI expects Option<&'static str>, you can recover it by matching the stored string against constants::KEYMAP_LAYOUTS.
            // TODO: Fix
            keymap: None,

bb-imager-ui/src/flash_success.rs:15

  • Field name modificiations is misspelled (should be modifications). This is part of the public UI state type and will likely spread to more call sites.

Comment on lines 29 to 33
id: value.get("id")?,
name: value.get("name")?,
icon: value.get("icon")?,
description: value.get("description")?,
documentation: value.get("documentation")?,
specification: serde_json::from_slice(&spec).unwrap(),
oshw: value.get("oshw")?,
flasher: value.get("flasher")?,
instructions: value.get("instructions")?,
})
Copilot AI review requested due to automatic review settings August 5, 2026 18:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 53 out of 67 changed files in this pull request and generated no new comments.

Suppressed comments (12)

bb-imager-ui/src/review.rs:15

  • Field name modificiations looks like a typo; it should likely be modifications. Since this is a public state struct used across the new UI and GUI integration, fixing it sooner will avoid locking in the misspelling.
    bb-imager-ui/src/lib.rs:35
  • Message variant UpdateCustomizaton appears to be misspelled (missing 'i'). This becomes part of the public UI message API, so correcting it now will prevent the typo from spreading further.
    bb-imager-gui/src/persistance.rs:190
  • Keymap is also dropped when converting stored SdSysconfCustomization into the UI CloudInit state (keymap: None). This prevents the UI from rehydrating the persisted selection.
            // TODO: Fix
            keymap: None,
            user: value.user.map(|u| (u.username.into(), u.password.into())),

bb-imager-ui/src/flashing.rs:46

  • Progress::Writing(f) passes f directly into progress_bar and the displayed percent. If the upstream progress ever drifts outside 0..=1, the label and bar can become nonsensical (and some widgets assume the value is in-range). Clamp f before use.
    bb-imager-ui/src/lib.rs:78
  • assert!(icon.is_some()) will panic without context if icon loading fails. Prefer an expect(...) with a clear message and pass Some(icon) into window settings.
    bb-imager-gui/src/persistance.rs:41
  • Keymap is currently dropped when converting persisted GUI config into the new UI CloudInit state (keymap: None). This loses a user setting on app restart, even though SdSysconfCustomization still stores a keymap string. Consider mapping the stored string back to one of the supported keymap literals.

This issue also appears on line 188 of the same file.

            // TODO: Fix
            keymap: None,

bb-imager-ui/src/flash_success.rs:55

  • The success subheading applies .style(widget::text::primary) twice, which is redundant and makes future edits noisier.
    bb-imager-ui/src/helpers.rs:253
  • time_remaining_from currently returns a 1s ETA for Progress::Verifying, but the unit test below expects no ETA in verifying. This also diverges from the previous GUI behavior (ETA only for writing/customizing).
    bb-imager-ui/src/app_options.rs:136
  • These text_input fields are rendered as editable, but their on_input handler always emits Message::Null, so user edits are ignored and the SAVE button cannot meaningfully apply changes. Either wire the inputs to state updates or render them as non-editable text to avoid a confusing UX.
    bb-imager-ui/src/flash_fail.rs:37
  • UI heading text "Write Fail" is ungrammatical; consider "Write Failed" to match the other status headings (e.g., "Write Complete").
    bb-imager-ui/src/customization.rs:46
  • This doc comment is now outdated: SelectableSd is already present in Customization. Leaving a TODO here is misleading for future readers.
    Makefile:528
  • These new preview-* targets are not marked .PHONY. If a file with the same name exists, make may treat the target as up-to-date and skip running the preview command. Mark the preview targets as phony (as is done for other utility targets like debug-gui).
## preview: preview-board-selection: Preview Board selection page.
preview-board-selection:
	$(_DIOXUS_CLI) serve -p bb-imager-ui --example board_selection --features debug

Copilot AI review requested due to automatic review settings August 6, 2026 07:37
@codecov-commenter

codecov-commenter commented Aug 6, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 16.97417% with 675 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.95%. Comparing base (6e04d53) to head (1509cab).
⚠️ Report is 169 commits behind head on main.

Files with missing lines Patch % Lines
bb-imager-gui/src/message.rs 0.00% 305 Missing ⚠️
bb-imager-gui/src/state.rs 0.00% 217 Missing ⚠️
bb-imager-gui/src/helpers.rs 36.84% 60 Missing ⚠️
bb-imager-gui/src/persistance.rs 73.27% 27 Missing and 4 partials ⚠️
bb-imager-gui/src/db/mod.rs 39.13% 11 Missing and 17 partials ⚠️
bb-imager-gui/src/ui/mod.rs 0.00% 22 Missing ⚠️
bb-imager-gui/src/main.rs 0.00% 12 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #710      +/-   ##
==========================================
+ Coverage   35.53%   36.95%   +1.41%     
==========================================
  Files          34       26       -8     
  Lines        5363     4108    -1255     
  Branches     5363     4108    -1255     
==========================================
- Hits         1906     1518     -388     
+ Misses       3349     2471     -878     
- Partials      108      119      +11     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 53 out of 67 changed files in this pull request and generated no new comments.

Suppressed comments (9)

bb-imager-ui/src/review.rs:16

  • Field name modificiations is misspelled. Because this struct is part of the UI crate’s public surface and the name is used across multiple modules/crates, this typo will leak into downstream code and makes the API harder to use/search.
    bb-imager-ui/src/lib.rs:36
  • UpdateCustomizaton is misspelled (missing an 'i'). Because this is a public enum variant and it’s already used throughout the UI and GUI integration, keeping the typo will permanently bake it into the API.
    bb-imager-gui/src/persistance.rs:186
  • Keymap is also dropped when converting SdSysconfCustomization into the UI CloudInit state (keymap: None). This will silently lose the user’s configured keymap when revisiting customization.
            // TODO: Fix
            keymap: None,
            user: value.user.map(|u| (u.username.into(), u.password.into())),

Makefile:531

  • The help/description header doesn’t match the target name: the comment says preview-image-selection but the actual target is preview-img-selection, which can confuse make help output and users copying the command. Rename one side so they match.
## preview: preview-image-selection: Preview Image selection page.
preview-img-selection:

bb-imager-ui/src/flash_success.rs:16

  • Field name modificiations is misspelled here as well. Keeping the typo in exported structs will spread it across the codebase and makes the API inconsistent with the UI text (“Modifications Applied”).
    bb-imager-ui/src/flash_success.rs:55
  • This text widget chains .style(widget::text::primary) twice. The second call is redundant and makes the intent unclear.
    bb-imager-ui/src/lib.rs:78
  • assert!(icon.is_some()) will panic at runtime if the window icon bytes can’t be decoded (e.g., missing/invalid asset or a partial git-lfs checkout). The app should still be able to run without a window icon.
    bb-imager-ui/Cargo.toml:22
  • bb-config is listed both as a normal dependency and a dev-dependency. The duplicate entry adds noise and can confuse version/feature resolution when adjusting dependencies later.
[dev-dependencies]
tempfile = "3.27"
bb-config = { path = "../bb-config" }
serde_json = { version = "1.0.150" }
tokio = { version = "1.52" }
bb-downloader = { path = "../bb-downloader" }

bb-imager-gui/src/persistance.rs:41

  • Keymap persistence is currently dropped on load (keymap: None), so users who previously saved a keymap won’t see it reflected in the new UI. This is a functional regression (and the TODO suggests it’s unfinished).

This issue also appears on line 184 of the same file.

            // TODO: Fix
            keymap: None,

Copilot AI review requested due to automatic review settings August 6, 2026 12:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 54 out of 68 changed files in this pull request and generated no new comments.

Suppressed comments (12)

bb-imager-gui/src/db/mod.rs:33

  • rusqlite::Row::get cannot deserialize directly into Box<str> / Option<Box<str>> because those types do not implement FromSql. This currently makes Board::from_row fail to compile. Read into String/Option<String> first and then convert.
    fn from_row(value: &rusqlite::Row<'_>) -> rusqlite::Result<Self> {
        Ok(Self {
            id: value.get("id")?,
            name: value.get("name")?,
            flasher: value.get("flasher")?,
            instructions: value.get("instructions")?,
        })

bb-imager-gui/src/db/mod.rs:60

  • OsImage::from_row has the same issue as Board::from_row: Row::get can’t return Box<str> or Option<Arc<str>> directly because they don’t implement FromSql. Deserialize as String/Option<String> and convert.
impl OsImage {
    fn from_row(value: &rusqlite::Row<'_>) -> rusqlite::Result<Self> {
        Ok(Self {
            id: value.get("id")?,
            name: value.get("name")?,
            init_format: value.get("init_format")?,
            info_text: value.get("info_text")?,
            url: value.get("url")?,
            image_download_sha256: value.get("image_download_sha256")?,
            extract_size: value.get("extract_size")?,
            bmap: value.get("bmap")?,
        })

bb-imager-gui/src/db/mod.rs:475

  • board_list constructs bb_imager_ui::board_selection::Board with name: value.get("name")?, but name is Box<str> and cannot be fetched directly from rusqlite. This will not compile; fetch a String and convert to Box<str>.
            .query_map([format!("%{}%", search)], |value| {
                Ok(bb_imager_ui::board_selection::Board {
                    id: value.get("id")?,
                    icon: value.get("icon")?,
                    name: value.get("name")?,
                })
            })?

bb-imager-gui/src/db/mod.rs:542

  • os_images_by_board_id builds bb_imager_ui::img_selection::ImageItem, but label/description are Cow<'static, str>, which rusqlite cannot deserialize into directly via Row::get. Read them as String and convert with .into() to Cow::Owned.
            .query_map(rusqlite::params![board_id, parent_id], |value| {
                let size: i64 = value.get("extract_size")?;
                Ok(bb_imager_ui::img_selection::ImageItem {
                    id: bb_imager_ui::img_selection::ImageId::OsImage(value.get("id")?),
                    label: value.get("name")?,
                    icon: value.get("icon")?,
                    description: value.get("description")?,
                    size: Some(size as u64),
                    release_date: value.get("release_date")?,
                })

bb-imager-gui/src/db/mod.rs:581

  • os_sublists has the same rusqlite deserialization issue as os_images_by_board_id: label/description are Cow<'static, str> and need to be read as String then converted.
        let res = stmt
            .query_map(rusqlite::params![board_id, parent_id], |value| {
                Ok(bb_imager_ui::img_selection::ImageItem {
                    id: bb_imager_ui::img_selection::ImageId::OsSublist((
                        value.get("id")?,
                        value.get("flasher")?,
                    )),
                    label: value.get("name")?,
                    icon: value.get("icon")?,
                    description: value.get("description")?,
                    size: None,
                    release_date: None,
                })
            })?

bb-imager-gui/src/db/mod.rs:714

  • os_images_by_name repeats the same issue: label/description are Cow<'static, str> in ImageItem, so value.get("name")? / value.get("description")? won’t compile. Fetch String and convert.
        let res = stmt
            .query_map(
                rusqlite::params![board_id, format!("%{search}%")],
                |value| {
                    let size: i64 = value.get("extract_size")?;
                    Ok(bb_imager_ui::img_selection::ImageItem {
                        id: bb_imager_ui::img_selection::ImageId::OsImage(value.get("id")?),
                        label: value.get("name")?,
                        icon: value.get("icon")?,
                        description: value.get("description")?,
                        size: Some(size as u64),
                        release_date: value.get("release_date")?,
                    })
                },

bb-imager-ui/src/review.rs:16

  • Field name modificiations is misspelled (should be modifications). Since this is part of the UI state type and is used across multiple modules/crates (examples + bb-imager-gui state), the typo will propagate into more call sites and makes the API harder to use.
    bb-imager-ui/src/lib.rs:37
  • UpdateCustomizaton is misspelled (should be UpdateCustomization). Because this enum is a cross-crate message type (used by bb-imager-gui), keeping the typo makes downstream code noisier and harder to read.
    bb-imager-gui/src/persistance.rs:43
  • Keymap is currently dropped when loading GUI config into the new UI (keymap: None with a TODO). This means a user’s saved keymap selection will never be restored, and it will also be lost when converting SdSysconfCustomization into bb_imager_ui::customization::CloudInit. This should be implemented before merging (either by changing the UI keymap type away from Option<&'static str> or by mapping stored strings back to one of the known keymap options).
impl From<&GuiConfiguration> for bb_imager_ui::customization::CloudInit {
    fn from(value: &GuiConfiguration) -> Self {
        Self {
            hostname: value.sd_customization.as_ref().and_then(|x| {
                x.sysconf
                    .as_ref()
                    .and_then(|y| y.hostname.clone().map(Into::into))
            }),
            timezone: value
                .sd_customization
                .as_ref()
                .and_then(|x| x.sysconf.as_ref().and_then(|y| y.timezone)),
            // TODO: Fix
            keymap: None,
            user: value.sd_customization.as_ref().and_then(|x| {
                x.sysconf.as_ref().and_then(|y| {

bb-imager-ui/src/app_options.rs:136

  • The App Options values are rendered as a text_input but the on_input handler ignores changes (Message::Null), so the widget looks editable but is effectively broken/unresponsive. If these fields are meant to be read-only, render them as text (or a non-editable text editor for copy/select) instead of a text input.
    bb-imager-ui/src/flash_success.rs:55
  • There is a redundant .style(widget::text::primary) call on the same widget::text(...) chain, which is dead code and makes the intent harder to read.
    Makefile:532
  • The help comment and the target name are inconsistent: the ## preview: ... line advertises preview-image-selection, but the actual target is preview-img-selection. Since make help appears to parse these ## category: target: lines, it will list a non-existent target.
## preview: preview-image-selection: Preview Image selection page.
preview-img-selection:
	$(_DIOXUS_CLI) serve -p bb-imager-ui --example img_selection --features debug

Copilot AI review requested due to automatic review settings August 6, 2026 12:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 53 out of 67 changed files in this pull request and generated no new comments.

Suppressed comments (10)

bb-imager-ui/src/flash_success.rs:58

  • Duplicate .style(widget::text::primary) call is redundant and makes the widget styling harder to read.
    bb-imager-ui/src/lib.rs:77
  • assert!(icon.is_some()) will panic without context if the icon fails to load (e.g. missing git-lfs assets). Prefer failing with an actionable message and avoid the separate assert!.
    bb-imager-ui/src/flashing.rs:46
  • Progress values are used directly for the percent label and progress bar. If the backend ever reports values slightly outside [0, 1], the UI can show nonsensical percentages and may violate widget expectations. Clamp before rendering.
    bb-imager-gui/src/persistance.rs:41
  • Keymap is currently dropped when converting persisted GUI configuration into the UI state (keymap: None), so a user's saved keymap selection can never be restored.
            // TODO: Fix
            keymap: None,

bb-imager-ui/src/lib.rs:36

  • The message variant is spelled UpdateCustomizaton (missing an "i"). Since this is part of the public bb-imager-ui API and is re-exported/used by bb-imager-gui, the typo will propagate and be difficult to change later.
    bb-imager-ui/src/review.rs:16
  • Field name modificiations is misspelled. Because review::State is public API and is also constructed by bb-imager-gui, this typo will be user-facing in downstream code and harder to correct later.
    bb-imager-ui/src/customization.rs:28
  • CloudInit::is_invalid does not treat an empty username as invalid, so the UI can enable "NEXT" with a blank username (as long as the password is non-empty). This will later fail or produce unusable images.
    bb-imager-ui/src/app_options.rs:119
  • The text input uses the current value as both placeholder and value, which is confusing and makes empty values render with no hint. The placeholder should be the label (or another static prompt).
    bb-imager-gui/src/persistance.rs:185
  • Keymap is dropped when converting SdSysconfCustomization into the UI CloudInit state (keymap: None). This prevents keymap from round-tripping through persistence even when it was saved.
            // TODO: Fix
            keymap: None,

bb-imager-ui/src/flash_success.rs:16

  • Field name modificiations is misspelled. Since flash_success::State is public API and constructed by bb-imager-gui, the typo will propagate and make future refactors harder.

Copilot AI review requested due to automatic review settings August 7, 2026 15:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 7, 2026 20:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 8, 2026 11:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 20, 2026 12:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 20, 2026 12:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 21, 2026 16:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 22, 2026 15:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 23, 2026 02:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

- UI now lives in a separate crate.
- Allows much faster development/experimentation per page.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
No longer used.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Basic cargo udpate. Removes unused deps.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
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.

3 participants