Skip to content

chore(deps): bump egui family to 0.37 - #1184

Open
Claudius-Maginificent wants to merge 4 commits into
v1.0-devfrom
chore/egui-0.37
Open

Claudius-Maginificent wants to merge 4 commits into
v1.0-devfrom
chore/egui-0.37

Conversation

@Claudius-Maginificent

@Claudius-Maginificent Claudius-Maginificent commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

TL;DR

Moves the app's user-interface toolkit to its latest release. The app looks and works the same. On the welcome screen, the role cards now keep keyboard focus when you Tab to them. After the upgrade, the app forgets the widths of its side panels and whether the identity settings "Advanced" section was open, once.

Detailed discussion

egui, egui_extras, eframe, egui_kittest 0.36.2 → 0.37.0, and egui_commonmark 0.25.0 → 0.26.0. Dashpay git pins are untouched. This PR is separate from the compatible-dependency bump in #1183.

Mechanical API migration

  • Id::new → Id::unique at every root-id site (~88). Id::unique is the old Id::new with the same ahash seeds, so every persisted Id value is byte-identical. No #[allow(deprecated)] was added.
  • Two sites passed an Id where a salt is meant. They now pass the salt: CollapsingHeader::id_salt("identity_hub_settings_advanced") and Panel::left(panel_id). egui 0.37 itself combines Panel ids with the parent scope id, so persisted panel widths and that header's open state reset once.
  • Ui::id → Ui::scope_id, WidgetType → Role, and MouseWheel events get source: MouseWheelSource::Unknown.

Non-mechanical changes

  1. Startup panic avoided. egui 0.37 no longer ships emoji-icon-font / NotoEmoji-Regular by default, and src/bundled.rs names them in its font fallback chain. The monochrome_emoji_fonts feature restores the same fonts. A unit test checks that every font named in a family has bundled data.
  2. Welcome role cards keep focus. frame.allocate_space(ui).interact(click) first registered a hover widget, and 0.37's ignore_focus dropped the card's focus every frame. The card is now allocated once with Sense::click, keeping the same auto id (src/ui/welcome_screen.rs).
  3. egui_kittest 0.37 strict defaults:
    • Missing-glyph panic. Harnesses without AppState install the bundled fonts before the first frame (tests/kittest/support.rs, src/test_support.rs).
    • Unnamed-widget accessibility check.
      • The 31 harnesses whose screens have real unnamed product widgets opt out through one shared helper (allowing_unnamed_widgets in tests/kittest/support.rs and src/test_support.rs), whose TODO lists every gap. All other harnesses keep the check. mount_app checks the mounted root screen explicitly after boot, so the result no longer depends on how fast boot finishes. Root screens with unnamed product widgets (Document Query, Network Chooser, Transition Visualizer) are listed in ROOTS_WITH_UNNAMED_WIDGETS.
      • Test-owned fields get names.
    • Invisible widgets hidden from AccessKit. A freshly opened Area/Modal can't be found on its sizing-pass frame. The helpers step one more frame (click_in_one_frame, step_into_view). That frame was already invisible in 0.36.
  4. eframe 0.37 default features now include system_fonts, an OS-font fallback for glyphs missing from the bundled fonts. It is left on.
  5. AGENTS.md now names egui 0.37.
  6. Secrets stay out of the PRIMARY selection. egui 0.37 sends OutputCommand::TextSelectionSettled whenever a selection in a label or a non-password TextEdit settles, and egui-winit writes it to the X11/Wayland PRIMARY selection. On-screen WIFs, private keys and recovery phrases would then be readable by other apps without Ctrl+C. PrimarySelectionGuard (src/ui/primary_selection_guard.rs) is an egui plugin whose output_hook drops that command app-wide. It is installed in BootApp::new and AppState::new_inner, which restores 0.36 behaviour. Ctrl+C copy and middle-click paste are unchanged.

Follow-up

Product widgets without an accessible name, listed in the TODO on allowing_unnamed_widgets. Naming them needs a per-screen UX decision: a name equal to the visible label makes get_by_label match two nodes.

  • entropy grid, language and word-count combos, recovery-phrase word fields;
  • WalletSelector without a label;
  • withdrawal destination field;
  • identity selector, fund-platform dialog combo, Key Info sign-message field;
  • DPNS username field and outcome button;
  • Document Query fields;
  • top-up wallet selector and amount, amount input;
  • add-key source combo, funding wallet picker;
  • identity-send radio buttons;
  • transition-visualizer input.

Testing

  • cargo clippy --all-features --all-targets -- -D warnings: clean.
  • cargo test --test kittest --all-features: 557/557.
  • cargo test --lib --all-features: 4080/4080.
  • cargo fmt --all -- --check: clean.
  • To check manually in the GUI:
    • welcome card focus ring with Tab;
    • emoji and symbol glyphs;
    • left panel and subscreen panel widths;
    • identity hub settings "Advanced" expander.

🤖 Co-authored by Claudius the Magnificent AI Agent

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Improved text-selection privacy while preserving explicit copy actions.
  • Bug Fixes

    • Reduced UI state and popup conflicts, improving reliability across screens.
    • Improved accessibility metadata and interaction handling.
  • Chores

    • Updated the UI framework and related libraries; refreshed bundled emoji font support.

PR Hygiene · ce11754

  • Bots — coderabbitai not yet · thepastaclaw not yet — /skip-bots proceeds without the ones not yet reported
  • Self-review — not asked of a bot author
  • Build running
  • Approvals
    • files with no dedicated owner (AGENTS.md, Cargo.lock, Cargo.toml and 78 more) — lklimek

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

Bump egui, egui_extras, eframe and egui_kittest 0.36.2 -> 0.37.0 and
egui_commonmark 0.25.0 -> 0.26.0 (lockfile: only what these pull).

Id policy:
- `Id::new` -> `Id::unique` everywhere it builds a root id (memory data
  keys, Area/Modal/LayerId/popup/state ids). `Id::unique` hashes with the
  same seeds as the old `Id::new`, so every id value is unchanged.
- The two call sites that passed an `Id` as a salt now pass the salt
  itself, as 0.37 intends: `CollapsingHeader::id_salt` in identity
  settings and `Panel::left` in the subscreen chooser (0.37 panels take a
  salt combined with the parent scope id, upstream).
- `Ui::id` -> `Ui::scope_id` (rename, same value); `WidgetType` -> `Role`.

Behaviour fixes required by 0.37:
- Enable egui's `monochrome_emoji_fonts`: 0.37 no longer bundles
  `emoji-icon-font`/`NotoEmoji-Regular` by default, and the bundled font
  families name them, so the app panicked on start. A unit test asserts
  every family font has bundled data.
- Welcome cards are allocated once with `Sense::click`. Allocating for
  hover and then sensing clicks makes 0.37's `ignore_focus` drop the
  card's keyboard focus every frame.

Test adaptations for kittest 0.37's stricter defaults:
- Harnesses rendering screens without `AppState` install the bundled
  fonts before the first frame (missing glyphs now panic).
- New Areas/Modals are invisible on their sizing-pass frame and 0.37 keeps
  invisible widgets out of the accessibility tree; tests step once more
  before querying a freshly opened dialog or overlay.
- `MouseWheel` events carry `source: MouseWheelSource::Unknown`.
- Harnesses whose screens have unnamed input widgets opt out of the new
  accessibility-name check, each with a TODO naming the widget;
  test-owned fields are named instead.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

The PR updates egui-related dependencies and UI code for egui 0.37. It adds a plugin that filters settled text-selection commands, changes UI identifiers and accessibility metadata, and updates UI test harness setup and frame handling.

Changes: egui upgrade and UI updates

Layer / File(s) Summary
Dependency upgrade and primary-selection guard
Cargo.toml, AGENTS.md, src/app.rs, src/boot.rs, src/ui/primary_selection_guard.rs, src/ui/mod.rs, src/bundled.rs, tests/kittest/startup.rs
Dependencies move to egui 0.37.0 and egui_commonmark 0.26.0. The egui feature monochrome_emoji_fonts is enabled. PrimarySelectionGuard removes TextSelectionSettled commands from platform output. The app and boot context install the guard. Tests check the guard behavior, plugin installation, and bundled font definitions.
UI identifiers and accessibility metadata
src/ui/components/*, src/ui/dashpay/*, src/ui/dpns/*, src/ui/identity/*, src/ui/masternodes/*, src/ui/tokens/*, src/ui/wallets/*, src/ui/welcome_screen.rs
UI code changes egui IDs, derives some IDs from UI scopes, and uses egui::Role for accessibility metadata.
UI test harness and frame updates
src/test_support.rs, src/ui/components/*, src/ui/contracts_documents/*, src/ui/identity/*, src/ui/tools/*, src/ui/wallets/*, tests/kittest/*
Shared test helpers configure bundled fonts and unnamed-widget checks. Tests adopt the helpers, use unique IDs, and step additional frames before querying newly shown overlays or prompts.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other

Suggested reviewers: lklimek, thepastaclaw

Merge Risk: Minimal · up to 913c1

This is an egui version upgrade with a text-selection guard. It should behave the same as before, apart from the one-time reset of side-panel widths and the identity settings "Advanced" state. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the dependency bump of the egui family to 0.37. The changeset bumps egui, egui_extras, eframe, and egui_kittest to 0.37.0 in Cargo.toml, and it migrates code to the new APIs. The title…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title names the dependency bump of the egui family to 0.37. The changeset bumps egui, egui_extras, eframe, and egui_kittest to 0.37.0 in Cargo.toml, and it migrates code to the new APIs. The title covers the main change. It does not mention the PrimarySelectionGuard or the egui_commonmark bump, which are secondary details.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@thepastaclaw

thepastaclaw commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

🔍 Review in progress (commit ce11754) · live progress

lklimek and others added 2 commits November 16, 2026 15:59
Harnesses whose screens still have unnamed input widgets opt out of
kittest 0.37's accessible-name check through `allowing_unnamed_widgets`
(`tests/kittest/support.rs` for integration tests, `src/test_support.rs`
for unit tests) instead of per-site calls, so the remaining gaps are
listed in one TODO per crate side.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
egui 0.37 reports every settled text selection (selectable labels and
non-password text fields) as `OutputCommand::TextSelectionSettled`, and
egui-winit writes it to the X11/Wayland PRIMARY selection. Selecting a
displayed recovery phrase, private key or WIF would hand it to every
other application and clipboard manager without an explicit copy; 0.36
had no such path.

`PrimarySelectionGuard` is an egui plugin whose `output_hook` drops
that command. egui runs output hooks in `Context::end_pass`, after the
app's ui and after every plugin's end-of-pass hook (label selections are
reported from one), for every pass and viewport, so registration order
does not matter. It is installed app-wide in `BootApp::new` and
`AppState::new_inner`. Explicit copies (`CopyText`) are unaffected.
Middle-click paste into DET fields (reading PRIMARY) is unchanged.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Claudius-Maginificent
Claudius-Maginificent marked this pull request as ready for review November 16, 2026 16:19

@coderabbitai coderabbitai Bot 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.

Additional comments: 1

src/ui/components/address_input.rs-1022-1022: 1

1022-1022: Minor · Functional Correctness · Quick win

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Give each address input its own popup IDs.

When two AddressInput instances share a parent UI, their child UIs share a scope ID. Both instances then use the same filter and autocomplete IDs, so their popups can interfere. Derive both IDs from an instance-specific scope or ID. (docs.rs)

Also applies to: 1105-1105

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 32f8ede and 913c1e9.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 81

  • AGENTS.md
  • Cargo.toml
  • src/app.rs
  • src/boot.rs
  • src/bundled.rs
  • src/test_support.rs
  • src/ui/components/address_input.rs
  • src/ui/components/amount_input.rs
  • src/ui/components/breadcrumb_pill.rs
  • src/ui/components/confirmation_dialog.rs
  • src/ui/components/icons.rs
  • src/ui/components/info_popup.rs
  • src/ui/components/left_panel.rs
  • src/ui/components/message_banner.rs
  • src/ui/components/passphrase_modal.rs
  • src/ui/components/progress_overlay.rs
  • src/ui/components/secret_prompt_host.rs
  • src/ui/components/selection_dialog.rs
  • src/ui/components/subscreen_chooser_panel.rs
  • src/ui/components/top_panel.rs
  • src/ui/components/wallet_unlock_popup.rs
  • src/ui/contracts_documents/document_action_screen.rs
  • src/ui/dashpay/add_contact_screen.rs
  • src/ui/dashpay/contact_details.rs
  • src/ui/dashpay/contact_profile_viewer.rs
  • src/ui/dashpay/profile_screen.rs
  • src/ui/dashpay/profile_search.rs
  • src/ui/dashpay/qr_code_generator.rs
  • src/ui/dashpay/send_payment.rs
  • src/ui/dpns/dpns_contested_names_screen/scheduled_vote_editor.rs
  • src/ui/dpns/progress_drawer.rs
  • src/ui/helpers.rs
  • src/ui/identity/add_existing_identity_screen.rs
  • src/ui/identity/add_new_identity_screen/mod.rs
  • src/ui/identity/contacts.rs
  • src/ui/identity/home.rs
  • src/ui/identity/hub_screen.rs
  • src/ui/identity/identity_hero_card.rs
  • src/ui/identity/identity_picker_add_card.rs
  • src/ui/identity/identity_picker_card.rs
  • src/ui/identity/keys/add_key_screen.rs
  • src/ui/identity/keys/key_info_screen.rs
  • src/ui/identity/picker.rs
  • src/ui/identity/register_dpns_name_screen.rs
  • src/ui/identity/settings.rs
  • src/ui/identity/top_up_identity_screen/mod.rs
  • src/ui/identity/username_notices.rs
  • src/ui/masternodes/card.rs
  • src/ui/mod.rs
  • src/ui/primary_selection_guard.rs
  • src/ui/tokens/tokens_screen/data_contract_json_pop_up.rs
  • src/ui/tokens/tokens_screen/mod.rs
  • src/ui/tokens/tokens_screen/my_tokens.rs
  • src/ui/tools/transition_visualizer_screen.rs
  • src/ui/wallets/add_new_wallet_screen.rs
  • src/ui/wallets/send_screen.rs
  • src/ui/wallets/wallets_screen/dialogs.rs
  • src/ui/welcome_screen.rs
  • tests/kittest/add_new_wallet_screen.rs
  • tests/kittest/global_nav_switcher.rs
  • tests/kittest/identity_home.rs
  • tests/kittest/identity_hub.rs
  • tests/kittest/identity_hub_contact_detail.rs
  • tests/kittest/identity_hub_layout.rs
  • tests/kittest/identity_hub_switcher.rs
  • tests/kittest/identity_selector.rs
  • tests/kittest/identity_usernames.rs
  • tests/kittest/import_mnemonic_screen.rs
  • tests/kittest/info_popup.rs
  • tests/kittest/keys_screen.rs
  • tests/kittest/masternode_tab.rs
  • tests/kittest/progress_overlay.rs
  • tests/kittest/register_dpns_name_screen.rs
  • tests/kittest/result_reactions.rs
  • tests/kittest/secret_prompt.rs
  • tests/kittest/startup.rs
  • tests/kittest/support.rs
  • tests/kittest/username_key_hint.rs
  • tests/kittest/wallet_selector.rs
  • tests/kittest/wallets_screen.rs
  • tests/kittest/withdraw_screen.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai ✓ · thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Nov 16, 2026
kittest checks accessible names only when a run settles. `mount_app`'s
construction-time `run_ok` reached the mounted root screen only when
storage preparation finished within its 100 un-slept frames, which
happened on CI's slower runners but not locally, so root screens with
unnamed widgets failed 14 tests in CI only.

`mount_app` now checks the root screen explicitly after boot. Roots that
still have unnamed product widgets (Document Query, Network Chooser,
Transition Visualizer) are listed once in `ROOTS_WITH_UNNAMED_WIDGETS`
and mount without the check, also during construction; the shared TODO
names their widgets.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai not yet · thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-bots Waiting for the review bots to report on this head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants