docs(core): improve BR usage in layout-lifecycle
What changed, and why it matters
This commit only updates internal documentation for the Trezor firmware project. It clarifies how user-interface 'ButtonRequest' events are generated from Python versus Rust code. No source code, build scripts, or security behavior was changed.
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
A single Markdown documentation file (docs/core/misc/layout-lifecycle.md) was edited. The change removes an outdated TODO and a vague paragraph, replacing them with a numbered list describing two supported mechanisms for emitting ButtonRequests: via Python’s interact() and via Rust’s SendButtonRequest wrapper. There are no code, configuration, or cryptographic changes.
Changed components
docs/core/misc/layout-lifecycle.mdInspect captured patch +10 / −5
diff --git a/docs/core/misc/layout-lifecycle.md b/docs/core/misc/layout-lifecycle.md
index 53cb7d079..b12df902f 100644
--- a/docs/core/misc/layout-lifecycle.md
+++ b/docs/core/misc/layout-lifecycle.md
@@ -173,12 +173,17 @@ layout.
The best choice is to always use the `interact()` function to take care of
`ButtonRequest`s. Explicitly sending `ButtonRequest`s is not supported.
-`ButtonRequest`s sent from Rust get sent as part of the `Attached` state transition,
-which can only happen when the layout is already running.
+There are two mechanisms for sending `ButtonRequest`s:
-TODO: instead of relying on `interact()`, it may be better to pass the `ButtonRequest`
-inside the layout object and enqueue it so that when the respective Rust layout is
-`Attached`, the outside-provided `ButtonRequest` is used.
+1. **From Python**: The `interact()` function passes the `ButtonRequest` inside the
+ layout. This enqueues the request so that when the respective Rust layout
+ transitions to `Attached` state, the provided `ButtonRequest` is sent.
+
+2. **From Rust**: A `Component` can be wrapped in `SendButtonRequest`, which sends the
+ `ButtonRequest` when the component receives an `Event::Attach`.
+
+Both mechanisms ensure that `ButtonRequest`s are only sent when the layout is already
+in **RUNNING** state and the Rust layout is `Attached`.
## Debuglink
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.