What changed, and why it matters
This commit is a minor code cleanup in a scrolling text animation loop. It moves a brief sleep statement outside an if/else block and rewords comments. There is no security-relevant change.
No security action needed. Treat as routine maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff refactors the horizontal scrolling animation loop in TextArea. The time.sleep(0.02) call is hoisted out of the conditional branch so it always runs each loop iteration, and comments are updated to describe behavior more clearly. No logic affecting bounds, input handling, cryptography, or trust boundaries is changed.
Changed components
src/seedsigner/gui/components.pyInspect captured patch +6 / −5
diff --git a/src/seedsigner/gui/components.py b/src/seedsigner/gui/components.py
index 622db59..9cc5cff 100644
--- a/src/seedsigner/gui/components.py
+++ b/src/seedsigner/gui/components.py
@@ -713,8 +713,8 @@ class TextArea(BaseComponent):
# Only render an update if we're going to move at least 1px
if abs(scroll_position_increment) > 0:
- # max: Ensure we don't scroll past left edge (0)
- # min: Ensure we don't scroll past right edge (max_scroll)
+ # max: Don't over-scroll when returning to the left edge (0)
+ # min: Don't over-scroll when revealing the right edge (max_scroll)
self.horizontal_scroll_position = max(
0,
min(self.horizontal_scroll_position + scroll_position_increment, max_scroll)
@@ -733,13 +733,14 @@ class TextArea(BaseComponent):
last_render_time = next_render_time
- # No need to CPU limit when running in its own thread?
- time.sleep(0.02)
else:
- # Wait to accumulate more time before scrolling
+ # Wait to accumulate more time so we can scroll at least 1px
pass
+ # Free up the processor for a bit each loop
+ time.sleep(0.02)
+
def render(self):
"""
Even if we need to animate for scrolling, all instances should explicitly render
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.