chore(core/eckhart): adapt loader for click tests
What changed, and why it matters
This commit makes a small UI change to the Trezor hardware wallet's loading animation. When animations are disabled (likely during automated testing), the loader is forced to show 0% progress instead of its real value. This is a test/development convenience change, not a security fix.
No security action needed. Treat as a normal UI/test-support commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In the Eckhart layout’s loader rendering code, two functions (render_loader and render_loader_indeterminate) now check animation_disabled(). If animations are disabled, the progress parameter is overridden to 0 before computing the progress ratio. This ensures deterministic rendering for click/UI tests when animations are turned off. No cryptographic, memory-safety, or access-control changes are present.
Changed components
core/embed/rust/src/ui/layout_eckhart/cshape/loader.rsInspect captured patch +3 / −0
diff --git a/core/embed/rust/src/ui/layout_eckhart/cshape/loader.rs b/core/embed/rust/src/ui/layout_eckhart/cshape/loader.rs
index f7ce2c0d0..514066035 100644
--- a/core/embed/rust/src/ui/layout_eckhart/cshape/loader.rs
+++ b/core/embed/rust/src/ui/layout_eckhart/cshape/loader.rs
@@ -2,6 +2,7 @@ use crate::ui::{
geometry::{Alignment2D, Offset, Point, Rect},
lerp::Lerp,
shape::{self, Renderer},
+ util::animation_disabled,
};
use super::{
@@ -15,6 +16,7 @@ const SCREEN: Rect = ScreenBorder::SCREEN_SHRUNK;
/// clock-wise direction. Used in ProgressScreen and Bootloader. `progress` goes
/// from 0 to 1000.
pub fn render_loader<'s>(progress: u16, border: &'s ScreenBorder, target: &mut impl Renderer<'s>) {
+ let progress = if animation_disabled() { 0 } else { progress };
let progress_ratio = progress_to_ratio(progress);
// Draw the border first
border.render(u8::MAX, target);
@@ -34,6 +36,7 @@ pub fn render_loader_indeterminate<'s>(
border: &'s ScreenBorder,
target: &mut impl Renderer<'s>,
) {
+ let progress = if animation_disabled() { 0 } else { progress };
let progress_ratio = progress_to_ratio(progress);
let clip = get_clip_indeterminate(progress_ratio);
// Draw the border in clip
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.