Create a 2nd screenshot for the bottom part of the main Settings menu
What changed, and why it matters
This commit only changes how a settings menu screenshot is generated for documentation. It adds a way to pre-select a specific menu button so the screenshot can show the bottom of the settings list. There is no security-relevant change to user-facing behavior, cryptography, or private data handling.
No security action needed. This is a test/documentation screenshot change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies SettingsMenuView to accept an optional selected_button_option parameter and uses it to set the initially highlighted button by index. If not provided, the existing selected_attr lookup remains unchanged. The screenshot generator uses this to render a second screenshot scrolled to the VERSION option. No logic affecting seed storage, signing, entropy, network, or permissions is touched.
Changed components
src/seedsigner/views/settings_views.pytests/screenshot_generator/generator.pyInspect captured patch +14 / −8
diff --git a/src/seedsigner/views/settings_views.py b/src/seedsigner/views/settings_views.py
index 9bc2ff6..a35631d 100644
--- a/src/seedsigner/views/settings_views.py
+++ b/src/seedsigner/views/settings_views.py
@@ -19,10 +19,11 @@ class SettingsMenuView(View):
DONATE = ButtonOption("Donate")
VERSION = ButtonOption("Version")
- def __init__(self, visibility: str = SettingsConstants.VISIBILITY__GENERAL, selected_attr: str = None, initial_scroll: int = 0):
+ def __init__(self, visibility: str = SettingsConstants.VISIBILITY__GENERAL, selected_attr: str = None, selected_button_option: ButtonOption = None, initial_scroll: int = 0):
super().__init__()
self.visibility = visibility
self.selected_attr = selected_attr
+ self.selected_button_option = selected_button_option
# Used to preserve the rendering position in the list
self.initial_scroll = initial_scroll
@@ -34,13 +35,6 @@ class SettingsMenuView(View):
)
button_data: list[ButtonOption] = [ButtonOption(e.display_name) for e in settings_entries]
- selected_button = 0
- if self.selected_attr:
- for i, entry in enumerate(settings_entries):
- if entry.attr_name == self.selected_attr:
- selected_button = i
- break
-
if self.visibility == SettingsConstants.VISIBILITY__GENERAL:
title = _("Settings")
@@ -67,6 +61,15 @@ class SettingsMenuView(View):
title = _("Dev Options")
next_destination = None
+ selected_button = 0
+ if self.selected_button_option:
+ selected_button = button_data.index(self.selected_button_option)
+ elif self.selected_attr:
+ for i, entry in enumerate(settings_entries):
+ if entry.attr_name == self.selected_attr:
+ selected_button = i
+ break
+
selected_menu_num = self.run_screen(
ButtonListScreen,
title=title,
diff --git a/tests/screenshot_generator/generator.py b/tests/screenshot_generator/generator.py
index 3d32678..8ac7f53 100644
--- a/tests/screenshot_generator/generator.py
+++ b/tests/screenshot_generator/generator.py
@@ -211,6 +211,9 @@ def generate_screenshots(locale):
# Add the top level "General" settings menu and entries
settings_views_list.append(ScreenshotConfig(settings_views.SettingsMenuView))
+
+ # Scroll the general settings to the bottom
+ settings_views_list.append(ScreenshotConfig(settings_views.SettingsMenuView, dict(selected_button_option=settings_views.SettingsMenuView.VERSION), screenshot_name="SettingsMenuView_2"))
add_settings_entries(SettingsConstants.VISIBILITY__GENERAL)
# Add the "Advanced" menu...
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.