chore(tests,delizia): confirm_output main menu
What changed, and why it matters
This commit is a test-infrastructure change for the Trezor hardware wallet's Delizia user interface. It adds a new flag so automated tests can navigate an older style on-screen menu during transaction confirmation flows. There is no user-facing behavior change, no fix for a bug, and no security relevance visible in the code or commit message.
No security action required. Treat as routine test/UX refactoring.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch introduces has_flow_menu/with_flow_menu plumbing in the Delizia Rust UI layer. Frame gains a has_flow_menu boolean, ConfirmValue gains a flow_menu field and builder method, and confirm_output sets it to true. The flag is serialized in debuglink/test traces so test automation can reach old-style swipe-flow menus. It is gated behind test/debug infrastructure and does not alter production confirmation logic.
Changed components
core/embed/rust/src/ui/layout_delizia/component/frame.rscore/embed/rust/src/ui/layout_delizia/flow/confirm_output.rscore/embed/rust/src/ui/layout_delizia/flow/util.rsInspect captured patch +26 / −2
diff --git a/core/embed/rust/src/ui/layout_delizia/component/frame.rs b/core/embed/rust/src/ui/layout_delizia/component/frame.rs
index 15e05de2c..3a2716558 100644
--- a/core/embed/rust/src/ui/layout_delizia/component/frame.rs
+++ b/core/embed/rust/src/ui/layout_delizia/component/frame.rs
@@ -94,6 +94,7 @@ pub struct Frame<T> {
horizontal_swipe: HorizontalSwipe,
margin: usize,
has_menu: bool,
+ has_flow_menu: bool,
}
pub enum FrameMsg<T> {
@@ -117,6 +118,7 @@ where
horizontal_swipe: HorizontalSwipe::new(),
margin: 0,
has_menu: false,
+ has_flow_menu: false,
}
}
@@ -170,14 +172,24 @@ where
.button_styled(theme::button_danger())
}
- // TODO: currently used to gradually introduce multi-item menus (#5189).
- // After the migration, this flag should be set in `with_button()`.
+ // `has_menu` is used to gradually introduce multi-item menus (#5189).
+ // TODO: After the migration, this flag should be set in `with_button()`.
pub fn with_external_menu(mut self) -> Self {
// Allow visiting this menu automatically by tests
self.has_menu = true;
self
}
+ // `has_flow_menu` is used to traverse old style (aka non-"external" menus)
+ // which are implemented as part of swipe flows.
+ // TODO: Once we have eventually replaced all these with new style "external
+ // menu" we should get rid of this flag and the related debuglink code.
+ pub fn with_flow_menu(mut self) -> Self {
+ // Allow visiting this menu automatically by tests
+ self.has_flow_menu = true;
+ self
+ }
+
pub fn title_styled(mut self, style: TextStyle) -> Self {
self.header = self.header.styled(style);
self
@@ -463,5 +475,6 @@ where
}
t.bool("has_menu", self.has_menu);
+ t.bool("has_flow_menu", self.has_flow_menu);
}
}
diff --git a/core/embed/rust/src/ui/layout_delizia/flow/confirm_output.rs b/core/embed/rust/src/ui/layout_delizia/flow/confirm_output.rs
index e2a08d0b3..a2cb1a372 100644
--- a/core/embed/rust/src/ui/layout_delizia/flow/confirm_output.rs
+++ b/core/embed/rust/src/ui/layout_delizia/flow/confirm_output.rs
@@ -213,6 +213,7 @@ pub fn new_confirm_output(
) -> Result<SwipeFlow, error::Error> {
// Main
let main_content = confirm_main
+ .with_flow_menu(true)
.into_layout()?
.one_button_request(ButtonRequest::from_num(br_code, br_name));
diff --git a/core/embed/rust/src/ui/layout_delizia/flow/util.rs b/core/embed/rust/src/ui/layout_delizia/flow/util.rs
index 56102d782..d8695d950 100644
--- a/core/embed/rust/src/ui/layout_delizia/flow/util.rs
+++ b/core/embed/rust/src/ui/layout_delizia/flow/util.rs
@@ -58,6 +58,7 @@ pub struct ConfirmValue {
frame_margin: usize,
cancel: bool,
external_menu: bool,
+ flow_menu: bool,
}
impl ConfirmValue {
@@ -94,6 +95,7 @@ impl ConfirmValue {
frame_margin: 0,
cancel: false,
external_menu: false,
+ flow_menu: false,
}
}
@@ -180,6 +182,11 @@ impl ConfirmValue {
self.with_menu_button()
}
+ pub const fn with_flow_menu(mut self, flow_menu: bool) -> Self {
+ self.flow_menu = flow_menu;
+ self
+ }
+
pub const fn with_footer(
mut self,
instruction: TString<'static>,
@@ -265,6 +272,9 @@ impl ConfirmValue {
if let Some(instruction) = self.footer_instruction {
frame = frame.with_footer(instruction, self.footer_description);
}
+ if self.flow_menu {
+ frame = frame.with_flow_menu();
+ }
if self.swipe_up {
frame = frame.with_swipe(Direction::Up, SwipeSettings::Default);
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.