fix(IOTestScreen): stop blanking out "Clear" button for the screenshot renderer
What changed, and why it matters
This is a tiny user-interface fix for a hardware wallet project. It changes when a button label is hidden so that screenshot/translation tools can see the word "Clear", while real devices still start with an empty button. There is no security issue here.
No security action needed. Treat as a normal UI/translation tooling fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies IOTestScreen in settings_screens.py. Previously the second button’s text was always set to a space after creation, hiding the default “Clear” label. Now that blanking only happens when the renderer is not the screenshot generator. This lets the screenshot generator render the translatable “Clear” text for review, while normal runtime behavior remains unchanged.
Changed components
src/seedsigner/gui/screens/settings_screens.pyInspect captured patch +5 / −1
diff --git a/src/seedsigner/gui/screens/settings_screens.py b/src/seedsigner/gui/screens/settings_screens.py
index 48cdc7d..70a8d5e 100644
--- a/src/seedsigner/gui/screens/settings_screens.py
+++ b/src/seedsigner/gui/screens/settings_screens.py
@@ -144,7 +144,11 @@ class IOTestScreen(BaseTopNavScreen):
outline_color=GUIConstants.ACCENT_COLOR,
is_scrollable_text=False, # Text has to dynamically update, can't use scrollable Button
)
- self.key2_button.text = " " # but default state is empty
+ if not self.renderer.is_screenshot_generator:
+ # The button text should be empty for its initial state ("Clear" doesn't make
+ # any sense until a test image is captured). But the screenshot generator
+ # should show the text so its translation can be reviewed.
+ self.key2_button.text = " "
self.components.append(self.key2_button)
self.key1_button = IconButton(
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.