chore(core/eckhart): remove BLE connect action
What changed, and why it matters
This commit removes an unfinished 'Connect' button from the Bluetooth device menu on Trezor's upcoming Eckhart hardware model. The feature was only a placeholder (its handler contained a TODO comment and did nothing), so deleting it does not fix any active security bug. It is a routine cleanup change with no security relevance.
No security action required. Treat as normal feature cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch deletes the DeviceConnect enum variant and all associated UI wiring from the Eckhart layout’s device menu. Previously, tapping a paired-but-disconnected Bluetooth device showed a ‘Connect’ button that produced a DeviceMenuMsg::DeviceConnect, which was converted to a DeviceMenuResult::DeviceConnect tuple and passed to Python. The Python handler only showed a confirmation dialog with a TODO comment and performed no actual connection logic. The commit removes the button, the message variant, the result type, and the dead handler branch, leaving only Disconnect and Forget/Unpair actions.
Changed components
core/embed/rust/src/ui/layout_eckhart/firmware/device_menu_screen.rscore/embed/rust/src/ui/layout_eckhart/component_msg_obj.rscore/embed/rust/src/ui/layout/device_menu_result.rscore/embed/rust/src/ui/api/firmware_micropython.rscore/src/apps/homescreen/device_menu.pyInspect captured patch +10 / −34
diff --git a/core/embed/rust/librust_qstr.h b/core/embed/rust/librust_qstr.h
index 5ed67e3b..82afd138 100644
--- a/core/embed/rust/librust_qstr.h
+++ b/core/embed/rust/librust_qstr.h
@@ -29,7 +29,6 @@ static void _librust_qstrs(void) {
MP_QSTR_CheckBackup;
MP_QSTR_DIM;
MP_QSTR_DONE;
- MP_QSTR_DeviceConnect;
MP_QSTR_DeviceDisconnect;
MP_QSTR_DeviceMenuResult;
MP_QSTR_DeviceName;
diff --git a/core/embed/rust/src/ui/api/firmware_micropython.rs b/core/embed/rust/src/ui/api/firmware_micropython.rs
index 6bcf4764..f9d05774 100644
--- a/core/embed/rust/src/ui/api/firmware_micropython.rs
+++ b/core/embed/rust/src/ui/api/firmware_micropython.rs
@@ -2109,7 +2109,6 @@ pub static mp_module_trezorui_api: Module = obj_module! {
/// class DeviceMenuResult:
/// """Result of a device menu operation."""
/// BackupFailed: ClassVar[DeviceMenuResult]
- /// DeviceConnect: ClassVar[DeviceMenuResult]
/// DeviceDisconnect: ClassVar[DeviceMenuResult]
/// DevicePair: ClassVar[DeviceMenuResult]
/// DeviceUnpair: ClassVar[DeviceMenuResult]
diff --git a/core/embed/rust/src/ui/layout/device_menu_result.rs b/core/embed/rust/src/ui/layout/device_menu_result.rs
index bdce0957..79c94444 100644
--- a/core/embed/rust/src/ui/layout/device_menu_result.rs
+++ b/core/embed/rust/src/ui/layout/device_menu_result.rs
@@ -14,7 +14,6 @@ pub static BLUETOOTH: SimpleTypeObj = SimpleTypeObj::new(&DEVICE_MENU_RESULT_BAS
// "Pair & Connect"
pub static DEVICE_PAIR: SimpleTypeObj = SimpleTypeObj::new(&DEVICE_MENU_RESULT_BASE_TYPE);
pub static DEVICE_DISCONNECT: SimpleTypeObj = SimpleTypeObj::new(&DEVICE_MENU_RESULT_BASE_TYPE);
-pub static DEVICE_CONNECT: SimpleTypeObj = SimpleTypeObj::new(&DEVICE_MENU_RESULT_BASE_TYPE);
pub static DEVICE_UNPAIR: SimpleTypeObj = SimpleTypeObj::new(&DEVICE_MENU_RESULT_BASE_TYPE);
pub static DEVICE_UNPAIR_ALL: SimpleTypeObj = SimpleTypeObj::new(&DEVICE_MENU_RESULT_BASE_TYPE);
// Security menu
@@ -43,7 +42,6 @@ static DEVICE_MENU_RESULT_TYPE: Type = obj_type! {
Qstr::MP_QSTR_Bluetooth => BLUETOOTH.as_obj(),
Qstr::MP_QSTR_DevicePair => DEVICE_PAIR.as_obj(),
Qstr::MP_QSTR_DeviceDisconnect => DEVICE_DISCONNECT.as_obj(),
- Qstr::MP_QSTR_DeviceConnect => DEVICE_CONNECT.as_obj(),
Qstr::MP_QSTR_DeviceUnpair => DEVICE_UNPAIR.as_obj(),
Qstr::MP_QSTR_DeviceUnpairAll => DEVICE_UNPAIR_ALL.as_obj(),
Qstr::MP_QSTR_PinCode => PIN_CODE.as_obj(),
diff --git a/core/embed/rust/src/ui/layout_eckhart/component_msg_obj.rs b/core/embed/rust/src/ui/layout_eckhart/component_msg_obj.rs
index 545842a6..3290c8b5 100644
--- a/core/embed/rust/src/ui/layout_eckhart/component_msg_obj.rs
+++ b/core/embed/rust/src/ui/layout_eckhart/component_msg_obj.rs
@@ -164,9 +164,6 @@ impl ComponentMsgObj for DeviceMenuScreen {
// "Pair & Connect"
DeviceMenuMsg::DevicePair => Ok(DEVICE_PAIR.as_obj()),
DeviceMenuMsg::DeviceDisconnect => Ok(DEVICE_DISCONNECT.as_obj()),
- DeviceMenuMsg::DeviceConnect(index) => {
- Ok(new_tuple(&[DEVICE_CONNECT.as_obj(), index.try_into()?])?)
- }
DeviceMenuMsg::DeviceUnpair(index) => {
Ok(new_tuple(&[DEVICE_UNPAIR.as_obj(), index.try_into()?])?)
}
diff --git a/core/embed/rust/src/ui/layout_eckhart/firmware/device_menu_screen.rs b/core/embed/rust/src/ui/layout_eckhart/firmware/device_menu_screen.rs
index 5d3e8e4c..a3542d39 100644
--- a/core/embed/rust/src/ui/layout_eckhart/firmware/device_menu_screen.rs
+++ b/core/embed/rust/src/ui/layout_eckhart/firmware/device_menu_screen.rs
@@ -46,8 +46,7 @@ const MAX_DEPTH: usize = 3;
// submenus, device screens, regulatory and about screens
const MAX_SUBSCREENS: usize = MAX_SUBMENUS + MAX_PAIRED_DEVICES + 2;
-const DIS_CONNECT_DEVICE_MENU_INDEX: usize = 0;
-const FORGET_DEVICE_MENU_INDEX: usize = 1;
+const DISCONNECT_DEVICE_MENU_INDEX: usize = 0;
#[derive(Clone)]
enum Action {
@@ -68,9 +67,6 @@ pub enum DeviceMenuMsg {
// "Pair & Connect"
DevicePair, // pair a new device
DeviceDisconnect, // disconnect a device
- DeviceConnect(
- usize, /* which device to connect, index in the list of devices */
- ),
DeviceUnpair(
usize, /* which device to unpair, index in the list of devices */
),
@@ -675,12 +671,12 @@ impl DeviceMenuScreen {
}
Subscreen::DeviceScreen(device, connected, _) => {
let mut menu = VerticalMenu::empty();
- let text = if connected {
- TR::words__disconnect
- } else {
- TR::words__connect
- };
- menu.item(Button::new_menu_item(text.into(), theme::menu_item_title()));
+ if connected {
+ menu.item(Button::new_menu_item(
+ TR::words__disconnect.into(),
+ theme::menu_item_title(),
+ ));
+ }
menu.item(Button::new_menu_item(
TR::words__forget.into(),
theme::menu_item_title_orange(),
@@ -809,16 +805,12 @@ impl Component for DeviceMenuScreen {
(Subscreen::DeviceScreen(_, connected, device_idx), ActiveScreen::Device(menu)) => {
match menu.event(ctx, event) {
Some(VerticalMenuScreenMsg::Selected(button_idx)) => match button_idx {
- DIS_CONNECT_DEVICE_MENU_INDEX if *connected => {
+ DISCONNECT_DEVICE_MENU_INDEX if *connected => {
return Some(DeviceMenuMsg::DeviceDisconnect);
}
- DIS_CONNECT_DEVICE_MENU_INDEX if !*connected => {
- return Some(DeviceMenuMsg::DeviceConnect(*device_idx));
- }
- FORGET_DEVICE_MENU_INDEX => {
+ _ => {
return Some(DeviceMenuMsg::DeviceUnpair(*device_idx));
}
- _ => {}
},
Some(VerticalMenuScreenMsg::Back) => {
return self.go_back(ctx);
diff --git a/core/mocks/generated/trezorui_api.pyi b/core/mocks/generated/trezorui_api.pyi
index 44deb182..4e1f3d00 100644
--- a/core/mocks/generated/trezorui_api.pyi
+++ b/core/mocks/generated/trezorui_api.pyi
@@ -852,7 +852,6 @@ class LayoutState:
class DeviceMenuResult:
"""Result of a device menu operation."""
BackupFailed: ClassVar[DeviceMenuResult]
- DeviceConnect: ClassVar[DeviceMenuResult]
DeviceDisconnect: ClassVar[DeviceMenuResult]
DevicePair: ClassVar[DeviceMenuResult]
DeviceUnpair: ClassVar[DeviceMenuResult]
diff --git a/core/src/apps/homescreen/device_menu.py b/core/src/apps/homescreen/device_menu.py
index f6dee09a..30176015 100644
--- a/core/src/apps/homescreen/device_menu.py
+++ b/core/src/apps/homescreen/device_menu.py
@@ -133,15 +133,7 @@ async def handle_device_menu() -> None:
# It's a tuple with (result_type, index)
result_type, index = menu_result
- if result_type is DeviceMenuResult.DeviceConnect:
- await confirm_action(
- "device_connect",
- "device_connect",
- f"connect {index} device?",
- "The currently connected device will be disconnected.",
- )
- # TODO implement device connect handling
- elif result_type is DeviceMenuResult.DeviceUnpair:
+ if result_type is DeviceMenuResult.DeviceUnpair:
await confirm_action(
"device_unpair",
"device_unpair",
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.