feat(eckhart): add proper subtitle support.
What changed, and why it matters
This commit is a user-interface feature update for the Trezor hardware wallet's newer 'Eckhart' layout. It adds support for a third line of subtitle text and wires the subtitle field through Solana transaction confirmation screens. There is no security fix or vulnerability present in the diff; it is purely a layout/UX improvement.
No security action required; treat as normal UI feature commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change extends subtitle rendering in core/embed/rust/src/ui/layout_eckhart/firmware/text_screen.rs by adding SUBTITLE_TRIPLE_HEIGHT and a two-step fit check, then uses the previously ignored subtitle parameter in UIEckhart::confirm_properties. Python layouts in core/src/trezor/ui/layouts/eckhart/init.py and core/src/apps/solana/layout.py are updated to pass subtitle separately instead of concatenating it into the title. The commit message is a feature note with [no changelog].
Changed components
Trezor firmware Eckhart UI text screen subtitle layoutTrezor firmware Eckhart confirm_properties flowSolana app instruction confirmation screensInspect captured patch +38 / −32
### core/embed/rust/src/ui/layout_eckhart/firmware/text_screen.rs
@@ -15,6 +15,7 @@ use crate::ui::util::Pager;
const SUBTITLE_HEIGHT: i16 = 44;
const SUBTITLE_DOUBLE_HEIGHT: i16 = 76;
+const SUBTITLE_TRIPLE_HEIGHT: i16 = 108;
/// Full-screen component for rendering text.
///
@@ -293,16 +294,24 @@ fn place_textscreen(
// 2) Subtitle
let mut content_footer_area = subtitle.map_or(rest, |s| {
- let subtitle_height = if let LayoutFit::OutOfBounds { .. } = s.text().map(|text| {
- TextLayout::new(theme::TEXT_MEDIUM_EXTRA_LIGHT)
- .with_bounds(
- Rect::from_size(Offset::new(rest.width(), SUBTITLE_HEIGHT)).inset(SIDE_INSETS),
- )
- .fit_text(text)
- }) {
+ let fits = |height: i16| {
+ !matches!(
+ s.text().map(|text| {
+ TextLayout::new(theme::TEXT_MEDIUM_EXTRA_LIGHT)
+ .with_bounds(
+ Rect::from_size(Offset::new(rest.width(), height)).inset(SIDE_INSETS),
+ )
+ .fit_text(text)
+ }),
+ LayoutFit::OutOfBounds { .. }
+ )
+ };
+ let subtitle_height = if fits(SUBTITLE_HEIGHT) {
+ SUBTITLE_HEIGHT
+ } else if fits(SUBTITLE_DOUBLE_HEIGHT) {
SUBTITLE_DOUBLE_HEIGHT
} else {
- SUBTITLE_HEIGHT
+ SUBTITLE_TRIPLE_HEIGHT
};
let (subtitle_area, rest) = rest.split_top(subtitle_height);
s.place(subtitle_area.inset(SIDE_INSETS));
### core/embed/rust/src/ui/layout_eckhart/ui_firmware.rs
@@ -385,7 +385,7 @@ impl FirmwareUI for UIEckhart {
fn confirm_properties(
title: TString<'static>,
- _subtitle: Option<TString<'static>>,
+ subtitle: Option<TString<'static>>,
items: Obj,
hold: bool,
verb: Option<TString<'static>>,
@@ -404,7 +404,7 @@ impl FirmwareUI for UIEckhart {
let flow = flow::new_confirm_with_menu(
title,
- None,
+ subtitle,
paragraphs,
None,
verb,
### core/src/apps/solana/layout.py
@@ -66,14 +66,13 @@ async def confirm_instruction(
signer_public_key: bytes,
definitions: Definitions,
) -> None:
- instruction_title = (
- f"{instruction_index}/{instructions_count}: {instruction.ui_name}"
- )
+ instruction_title_index = f"{instruction_index}/{instructions_count}"
+ instruction_full_title = f"{instruction_title_index}: {instruction.ui_name}"
if instruction.is_deprecated_warning is not None:
await confirm_metadata(
"confirm_deprecated_warning",
- instruction_title,
+ instruction_full_title,
instruction.is_deprecated_warning,
br_code=ButtonRequestType.Other,
)
@@ -116,16 +115,16 @@ async def confirm_instruction(
raise ValueError # Invalid property template
await confirm_properties(
- "confirm_instruction",
- f"{instruction_index}/{instructions_count}",
- (
+ br_name="confirm_instruction",
+ title=instruction_title_index,
+ subtitle=instruction.ui_name,
+ props=(
(
ui_property.display_name,
property_template.format(value, *args),
True,
),
),
- instruction.ui_name,
)
elif ui_property.account is not None:
# optional account, skip if not present
@@ -160,9 +159,9 @@ async def confirm_instruction(
await confirm_properties(
"confirm_instruction",
- f"{instruction_index}/{instructions_count}",
- account_data,
- instruction.ui_name,
+ title=instruction_title_index,
+ props=account_data,
+ subtitle=instruction.ui_name,
)
else:
raise ValueError # Invalid ui property
@@ -188,10 +187,10 @@ async def confirm_instruction(
)
await confirm_properties(
- "confirm_instruction",
- f"{instruction_index}/{instructions_count}",
- signers,
- instruction.ui_name,
+ br_name="confirm_instruction",
+ title=instruction_title_index,
+ subtitle=instruction.ui_name,
+ props=signers,
)
### core/src/trezor/ui/layouts/eckhart/__init__.py
@@ -894,21 +894,19 @@ async def confirm_properties(
br_code: ButtonRequestType = ButtonRequestType.ConfirmOutput,
verb: str | None = None,
) -> None:
+ from trezor.ui.layouts.menu import Menu, confirm_with_menu
- if subtitle:
- title += ": " + subtitle
+ menu = Menu.root(cancel=TR.buttons__cancel)
with trezorui_api.confirm_properties(
title=title,
+ subtitle=subtitle,
items=list(props),
hold=hold,
verb=verb,
+ external_menu=True,
) as layout:
- return await raise_if_not_confirmed(
- layout,
- br_name,
- br_code,
- )
+ await confirm_with_menu(layout, menu, br_name, br_code)
async def confirm_total(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.