chore(core): hide empty "info" button on Caesar `confirm_with_info()`
What changed, and why it matters
This is a minor user-interface polish change for the Trezor hardware wallet's 'Caesar' screen layout. It simply hides an empty or placeholder 'info' button so users don't see a blank or confusing button during confirmations. There is no security-relevant behavior change.
No security action needed; treat as normal UI polish.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies two files in the Caesar UI layout. In button.rs, ButtonLayout::new_armed() and ButtonLayout::new_armed_icons() now pass None instead of an empty ButtonDetails when the right button text is empty. In caesar/init.py, should_show_more() treats both the down-arrow and empty string as indicators that no info button should be shown, instead of converting an empty string into an info icon. This is purely cosmetic UI cleanup.
Changed components
core/embed/rust/src/ui/layout_caesar/component/button.rscore/src/trezor/ui/layouts/caesar/__init__.pyInspect captured patch +11 / −3
diff --git a/core/embed/rust/src/ui/layout_caesar/component/button.rs b/core/embed/rust/src/ui/layout_caesar/component/button.rs
index 6924c6c4..750b78e9 100644
--- a/core/embed/rust/src/ui/layout_caesar/component/button.rs
+++ b/core/embed/rust/src/ui/layout_caesar/component/button.rs
@@ -586,7 +586,11 @@ impl ButtonLayout {
Self::new(
Some(ButtonDetails::from_text_possible_icon(left)),
Some(ButtonDetails::armed_text(middle)),
- Some(ButtonDetails::from_text_possible_icon(right)),
+ if right.is_empty() {
+ None
+ } else {
+ Some(ButtonDetails::from_text_possible_icon(right))
+ },
)
}
@@ -604,7 +608,11 @@ impl ButtonLayout {
Self::new(
Some(ButtonDetails::cancel_icon()),
Some(ButtonDetails::armed_text(middle)),
- Some(ButtonDetails::from_text_possible_icon(right)),
+ if right.is_empty() {
+ None
+ } else {
+ Some(ButtonDetails::from_text_possible_icon(right))
+ },
)
}
diff --git a/core/src/trezor/ui/layouts/caesar/__init__.py b/core/src/trezor/ui/layouts/caesar/__init__.py
index 6a6b0a47..783b8d12 100644
--- a/core/src/trezor/ui/layouts/caesar/__init__.py
+++ b/core/src/trezor/ui/layouts/caesar/__init__.py
@@ -722,7 +722,7 @@ async def should_show_more(
Raises ActionCancelled if the user cancels.
"""
- if button_text != DOWN_ARROW:
+ if button_text not in (DOWN_ARROW, ""):
button_text = INFO_ICON
result = await interact(
trezorui_api.confirm_with_info(
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.