From fb1398007d6b70354f519c6c90b150b9fef07967 Mon Sep 17 00:00:00 2001 From: Charles-Edouard de la Vergne Date: Tue, 19 May 2026 17:13:58 +0200 Subject: [PATCH 1/5] Fix ADDRESS_BOOK_ALIAS address page on Nano (cherry picked from commit 796ebddc6eb4ab53b00f781e89d3c628e74547c6) --- lib_nbgl/src/nbgl_use_case_nanos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib_nbgl/src/nbgl_use_case_nanos.c b/lib_nbgl/src/nbgl_use_case_nanos.c index d009af946..75b2eed72 100644 --- a/lib_nbgl/src/nbgl_use_case_nanos.c +++ b/lib_nbgl/src/nbgl_use_case_nanos.c @@ -996,7 +996,8 @@ static void displayExtensionStep(nbgl_stepPosition_t pos) : context.review.extension->fullValue; } else if (has_scope && page == 1) { - text = context.review.extension->fullValue; + text = context.review.extension->title; + subText = context.review.extension->fullValue; } else if (has_tn) { text = context.review.extension->explanation; From 67ee6d5c0770875fb02cc7cbf04b75165e922840 Mon Sep 17 00:00:00 2001 From: Charles-Edouard de la Vergne Date: Wed, 20 May 2026 10:53:53 +0200 Subject: [PATCH 2/5] Fix Last page strings for Address Book (cherry picked from commit 11bfc6f2f3fb482c945ed5fcc24d26fbf7fef76d) --- lib_nbgl/src/nbgl_use_case_nanos.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib_nbgl/src/nbgl_use_case_nanos.c b/lib_nbgl/src/nbgl_use_case_nanos.c index 75b2eed72..ede453ad8 100644 --- a/lib_nbgl/src/nbgl_use_case_nanos.c +++ b/lib_nbgl/src/nbgl_use_case_nanos.c @@ -1087,8 +1087,15 @@ static void getLastPageInfo(bool approve, const nbgl_icon_details_t **icon, cons if (approve) { // Approve page *icon = &C_icon_validate_14; - if ((context.type == ADDRESS_REVIEW_USE_CASE) - || (context.operationType & ADDRESS_BOOK_OPERATION)) { + if (context.operationType & ADDRESS_BOOK_OPERATION) { + if ((context.type == REVIEW_USE_CASE) && (context.review.finishTitle != NULL)) { + *text = context.review.finishTitle; + } + else { + *text = "Confirm contact details"; + } + } + else if (context.type == ADDRESS_REVIEW_USE_CASE) { *text = "Confirm"; } else { From 4ace7ea15f5c31230ea0035c87909ef1b5c7e6e7 Mon Sep 17 00:00:00 2001 From: Charles-Edouard de la Vergne Date: Wed, 20 May 2026 11:44:20 +0200 Subject: [PATCH 3/5] Adjust UI wordings for nano (cherry picked from commit f7dbf8607a8e4316d067af0548d449eecea85d0b) --- app_features/address_book/src/address_book_common.c | 2 +- .../address_book/src/identity_edit_contact_name.c | 4 ++++ app_features/address_book/src/identity_edit_identifier.c | 4 ++++ app_features/address_book/src/identity_edit_scope.c | 4 ++++ app_features/address_book/src/identity_register.c | 4 ++++ app_features/address_book/src/ledger_account_edit.c | 9 ++++++++- 6 files changed, 25 insertions(+), 2 deletions(-) diff --git a/app_features/address_book/src/address_book_common.c b/app_features/address_book/src/address_book_common.c index c78621f93..099549b39 100644 --- a/app_features/address_book/src/address_book_common.c +++ b/app_features/address_book/src/address_book_common.c @@ -172,7 +172,7 @@ void address_book_display_review(const nbgl_icon_details_t *icon, void address_book_handle_review_rejected(nbgl_callback_t finalize) { io_send_sw(SWO_INCORRECT_DATA); - nbgl_useCaseReviewStatus(STATUS_TYPE_OPERATION_REJECTED, finalize); + nbgl_useCaseStatus("Canceled", false, finalize); } /** diff --git a/app_features/address_book/src/identity_edit_contact_name.c b/app_features/address_book/src/identity_edit_contact_name.c index f28a2fcc6..388656fb2 100644 --- a/app_features/address_book/src/identity_edit_contact_name.c +++ b/app_features/address_book/src/identity_edit_contact_name.c @@ -299,7 +299,11 @@ static void ui_display(void) g_ab_ui.list.nbPairs = nbPairs; address_book_display_review(&LARGE_ADDRESS_BOOK_ICON, "Review change to contact details", +#ifdef SCREEN_SIZE_WALLET "Confirm change?", +#else + "Confirm change", +#endif review_choice); } diff --git a/app_features/address_book/src/identity_edit_identifier.c b/app_features/address_book/src/identity_edit_identifier.c index a22c4ab51..f1a33ad41 100644 --- a/app_features/address_book/src/identity_edit_identifier.c +++ b/app_features/address_book/src/identity_edit_identifier.c @@ -409,7 +409,11 @@ static void ui_display(void) g_ab_ui.list.callback = get_edit_identifier_tagValue; address_book_display_review(&LARGE_ADDRESS_BOOK_ICON, "Review change to contact details", +#ifdef SCREEN_SIZE_WALLET "Confirm change?", +#else + "Confirm change", +#endif review_choice); } diff --git a/app_features/address_book/src/identity_edit_scope.c b/app_features/address_book/src/identity_edit_scope.c index 282ebdb9f..55e13ba6d 100644 --- a/app_features/address_book/src/identity_edit_scope.c +++ b/app_features/address_book/src/identity_edit_scope.c @@ -419,7 +419,11 @@ static void ui_display(void) g_ab_ui.list.nbPairs = nbPairs; address_book_display_review(&LARGE_ADDRESS_BOOK_ICON, "Review change to contact details", +#ifdef SCREEN_SIZE_WALLET "Confirm change?", +#else + "Confirm change", +#endif review_choice); } diff --git a/app_features/address_book/src/identity_register.c b/app_features/address_book/src/identity_register.c index 87da853d5..84767aed3 100644 --- a/app_features/address_book/src/identity_register.c +++ b/app_features/address_book/src/identity_register.c @@ -417,7 +417,11 @@ static void ui_display(void) g_ab_ui.list.callback = get_register_identity_tagValue; address_book_display_review(&LARGE_ADDRESS_BOOK_ICON, "Review contact details", +#ifdef SCREEN_SIZE_WALLET "Confirm contact details?", +#else + "Confirm contact details", +#endif review_choice); } diff --git a/app_features/address_book/src/ledger_account_edit.c b/app_features/address_book/src/ledger_account_edit.c index 704b51843..20888c004 100644 --- a/app_features/address_book/src/ledger_account_edit.c +++ b/app_features/address_book/src/ledger_account_edit.c @@ -331,7 +331,14 @@ static void ui_display(void) nbPairs++; g_ab_ui.list.pairs = g_ab_ui.pairs; g_ab_ui.list.nbPairs = nbPairs; - address_book_display_review(NULL, "Edit account name", "Confirm edit?", review_choice); + address_book_display_review(NULL, + "Edit account name", +#ifdef SCREEN_SIZE_WALLET + "Confirm edit?", +#else + "Confirm edit", +#endif + review_choice); } /* Exported functions --------------------------------------------------------*/ From 9f2377d6e25fbf9600d1bec9e418a7a5fd1bcde7 Mon Sep 17 00:00:00 2001 From: Charles-Edouard de la Vergne Date: Wed, 20 May 2026 12:07:34 +0200 Subject: [PATCH 4/5] Ensure correct truncation with '...' (cherry picked from commit e91e4db2fee2d5fe4405464005f5594648d38fb7) --- lib_nbgl/src/nbgl_layout_nanos.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/lib_nbgl/src/nbgl_layout_nanos.c b/lib_nbgl/src/nbgl_layout_nanos.c index 3e30a69f5..aeae7ba71 100644 --- a/lib_nbgl/src/nbgl_layout_nanos.c +++ b/lib_nbgl/src/nbgl_layout_nanos.c @@ -35,6 +35,9 @@ // this is the maximum number of chars fitting in a line #define NB_MAX_CHAR_IN_LINE 20 +#define ELLIPSIS "..." +#define ELLIPSIS_SIZE sizeof(ELLIPSIS) // includes '\0' + /********************** * MACROS **********************/ @@ -356,20 +359,20 @@ int nbgl_layoutAddText(nbgl_layout_t *layout, button->obj.alignmentMarginY = 8 + 7; textWidth = nbgl_getTextWidth(button->fontId, button->text); if ((textWidth + BUTTON_MARGIN_Y) >= AVAILABLE_WIDTH) { - static char tmpString2[NB_MAX_CHAR_IN_LINE]; + static char tmpString2[NB_MAX_CHAR_IN_LINE]; + const uint16_t ellipsisWidth = nbgl_getTextWidth(button->fontId, ELLIPSIS); nbgl_getTextMaxLenAndWidth(button->fontId, button->text, - AVAILABLE_WIDTH - BUTTON_MARGIN_Y, + AVAILABLE_WIDTH - BUTTON_MARGIN_Y - ellipsisWidth, &len, &width, true); - button->obj.area.width = width + BUTTON_MARGIN_Y; - // copy the first 'len' chars in the tmp string buffer (max is - // NB_MAX_CHAR_IN_LINE-1) - memcpy(tmpString2, button->text, MIN(len, (NB_MAX_CHAR_IN_LINE - 1))); - // NULL termination - tmpString2[MIN(len, (NB_MAX_CHAR_IN_LINE - 1))] = '\0'; - button->text = PIC(tmpString2); + button->obj.area.width = width + ellipsisWidth + BUTTON_MARGIN_Y; + // copy the first 'len' chars then append ELLIPSIS (ELLIPSIS_SIZE includes '\0') + uint16_t copyLen = MIN(len, (NB_MAX_CHAR_IN_LINE - ELLIPSIS_SIZE)); + memcpy(tmpString2, button->text, copyLen); + memcpy(tmpString2 + copyLen, ELLIPSIS, ELLIPSIS_SIZE); + button->text = PIC(tmpString2); } else { button->obj.area.width = textWidth + BUTTON_MARGIN_Y; From 111770c2a5d96b9658ee4b33794b27a0bfa88eb0 Mon Sep 17 00:00:00 2001 From: Charles-Edouard de la Vergne Date: Wed, 20 May 2026 12:35:25 +0200 Subject: [PATCH 5/5] Add 'Look At Me' notification in nbgl_useCaseChoiceWithDetails (cherry picked from commit fb31b199990d275a13c1d526968622592ba5b564) --- lib_nbgl/src/nbgl_use_case.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib_nbgl/src/nbgl_use_case.c b/lib_nbgl/src/nbgl_use_case.c index 04a9800c8..633df33e3 100644 --- a/lib_nbgl/src/nbgl_use_case.c +++ b/lib_nbgl/src/nbgl_use_case.c @@ -3844,6 +3844,10 @@ void nbgl_useCaseAdvancedChoiceWithDetails(const nbgl_icon_details_t *centerIcon reset_callbacks_and_context(); +#ifdef HAVE_PIEZO_SOUND + os_io_seph_cmd_piezo_play_tune(TUNE_LOOK_AT_ME); +#endif // HAVE_PIEZO_SOUND + onChoice = callback; layoutDescription.modal = false; layoutDescription.withLeftBorder = true;