What changed, and why it matters
This commit only adds explanatory comments to two generated/mocked source files describing the history and future plans for two internal type aliases (`PropertyType` and `StrPropertyType`). No code behavior changes, no bug fixes, and no security-related modifications are present.
No action required; this is a documentation-only change with no security relevance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff inserts a block of documentation comments in core/embed/rust/src/ui/api/firmware_micropython.rs and the generated stub core/mocks/generated/trezorui_api.pyi. The comments explain that PropertyType/StrPropertyType are works-in-progress, describe their evolution from raw tuple types, and link to issue #5411. The actual type definitions remain unchanged.
Changed components
core/embed/rust/src/ui/api/firmware_micropython.rscore/mocks/generated/trezorui_api.pyiInspect captured patch +24 / −0
diff --git a/core/embed/rust/src/ui/api/firmware_micropython.rs b/core/embed/rust/src/ui/api/firmware_micropython.rs
index 88dbff72..f62af4f9 100644
--- a/core/embed/rust/src/ui/api/firmware_micropython.rs
+++ b/core/embed/rust/src/ui/api/firmware_micropython.rs
@@ -1386,8 +1386,21 @@ pub static mp_module_trezorui_api: Module = obj_module! {
/// from trezor import utils
/// from trezor.enums import ButtonRequestType, RecoveryType
///
+ /// # Note: `PropertyType` / `StrPropertyType` are very much WIP.
+ /// # Historical context: Initially all we had was
+ /// # `tuple[str, str]`, `tuple[str | None, str | bytes | None, bool | None]`, etc.
+ /// # which we unified under `PropertyType`.
+ /// # We then later introduced `StrPropertyType` for cases where the value
+ /// # cannot be `bytes` and started getting rid of `PropertyType` uses.
+ /// # There are still a few instances where properties use `bytes`,
+ /// # but we should probably get rid of all and drop `PropertyType` completely.
+ /// # The next goal would be to replace the `bool` with something
+ /// # that can encode actual types / rendering strategies.
+ /// # See more details here: https://github.com/trezor/trezor-firmware/issues/5411
/// PropertyType = tuple[str | None, StrOrBytes | None, bool | None]
/// StrPropertyType = tuple[str | None, str | None, bool | None]
+ ///
+ ///
/// T = TypeVar("T")
///
/// class LayoutObj(Generic[T]):
diff --git a/core/mocks/generated/trezorui_api.pyi b/core/mocks/generated/trezorui_api.pyi
index 17690b1e..ba21f5e2 100644
--- a/core/mocks/generated/trezorui_api.pyi
+++ b/core/mocks/generated/trezorui_api.pyi
@@ -2,6 +2,17 @@ from typing import *
from buffer_types import *
from trezor import utils
from trezor.enums import ButtonRequestType, RecoveryType
+# Note: `PropertyType` / `StrPropertyType` are very much WIP.
+# Historical context: Initially all we had was
+# `tuple[str, str]`, `tuple[str | None, str | bytes | None, bool | None]`, etc.
+# which we unified under `PropertyType`.
+# We then later introduced `StrPropertyType` for cases where the value
+# cannot be `bytes` and started getting rid of `PropertyType` uses.
+# There are still a few instances where properties use `bytes`,
+# but we should probably get rid of all and drop `PropertyType` completely.
+# The next goal would be to replace the `bool` with something
+# that can encode actual types / rendering strategies.
+# See more details here: https://github.com/trezor/trezor-firmware/issues/5411
PropertyType = tuple[str | None, StrOrBytes | None, bool | None]
StrPropertyType = tuple[str | None, str | None, bool | None]
T = TypeVar("T")
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.