You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ask: Move the Focus Mode CheckButton and Zoom slider/label from runtime construction in main.gd _ready() into main.tscn (or a settings_panel_builder.gd) so the settings UI is visible in the scene file and restylable without code changes.
Expected files: scripts/main.gd, scenes/main.tscn
Problem: scripts/main.gd _ready() constructs the Focus Mode toggle and Zoom controls at scripts/main.gd:268-296 by calling CheckButton.new(), Label.new(), and HSlider.new(), wiring signal handlers that capture settings/tick_timer via closures, and parenting them to settings_panel.get_node("SettingsMargin/SettingsBox"). Three concerns are mixed: scene composition, persisted-settings round-trip, and tick-timer reconfiguration. Because the widgets are created in code, scenes/main.tscn does not describe them; opening the .tscn cannot reveal what the settings panel looks like, and a refactor of settings_panel.get_node("SettingsMargin/SettingsBox") silently breaks _ready with a null deref. The 2026-07-08 audit (#269 finding 9) flagged this and it has not been addressed.
scripts/main.gd:281 — var zoom_label := Label.new()
scripts/main.gd:285 — var zoom_slider := HSlider.new() wired to Constants.ZOOM_MIN / ZOOM_MAX / ZOOM_STEP with a value_changed handler that mutates settings['zoom_factor'] and rebuilds the zoom label text
scripts/main.gd:279, 284, 295 — add_child() calls into settings_panel.get_node(...) — path-coupled: changing the scene path silently breaks runtime
scenes/main.tscn — does not contain the Focus Mode CheckButton, the Zoom label, or the Zoom HSlider; grepping the scene file for "zoom" or "focus" returns nothing
tests/test_dock_layout.gd — exercises only apply_anchor_layout(); no test exists for the dynamic settings widgets
Acceptance:
Focus Mode CheckButton, Zoom label, and Zoom HSlider are placed in scenes/main.tscn inside the SettingsBox, each with a unique-name (%FocusModeButton, %ZoomLabel, %ZoomSlider)
main.gd _ready() references the scene-placed nodes via % unique-name access, retaining the same toggle/value_changed handlers and the same settings persistence semantics
The runtime construction block is removed from main.gd
Verify scenes/main.tscn renders the settings panel identically (open the scene in Godot, check Focus Mode + Zoom appear under Settings)
Ask: Move the Focus Mode CheckButton and Zoom slider/label from runtime construction in main.gd _ready() into main.tscn (or a settings_panel_builder.gd) so the settings UI is visible in the scene file and restylable without code changes.
Expected files: scripts/main.gd, scenes/main.tscn
Problem: scripts/main.gd _ready() constructs the Focus Mode toggle and Zoom controls at
scripts/main.gd:268-296by calling CheckButton.new(), Label.new(), and HSlider.new(), wiring signal handlers that capturesettings/tick_timervia closures, and parenting them tosettings_panel.get_node("SettingsMargin/SettingsBox"). Three concerns are mixed: scene composition, persisted-settings round-trip, and tick-timer reconfiguration. Because the widgets are created in code, scenes/main.tscn does not describe them; opening the .tscn cannot reveal what the settings panel looks like, and a refactor ofsettings_panel.get_node("SettingsMargin/SettingsBox")silently breaks _ready with a null deref. The 2026-07-08 audit (#269 finding 9) flagged this and it has not been addressed.Evidence:
scripts/main.gd:268— comment "Focus Mode and Zoom Controls (Issue Add true focus mode and zoom controls #19)" introduces the runtime construction blockscripts/main.gd:270—var focus_mode_btn := CheckButton.new()scripts/main.gd:272—focus_mode_btn.text = "Focus Mode";focus_mode_btn.toggled.connect(func(val): ... settings['focus_mode'] = val; save_settings(); if tick_timer: tick_timer.wait_time = tick_seconds_for_setting())scripts/main.gd:281—var zoom_label := Label.new()scripts/main.gd:285—var zoom_slider := HSlider.new()wired toConstants.ZOOM_MIN/ZOOM_MAX/ZOOM_STEPwith avalue_changedhandler that mutatessettings['zoom_factor']and rebuilds the zoom label textscripts/main.gd:279, 284, 295—add_child()calls intosettings_panel.get_node(...)— path-coupled: changing the scene path silently breaks runtimescenes/main.tscn— does not contain the Focus Mode CheckButton, the Zoom label, or the Zoom HSlider; grepping the scene file for "zoom" or "focus" returns nothingtests/test_dock_layout.gd— exercises only apply_anchor_layout(); no test exists for the dynamic settings widgetsAcceptance:
%FocusModeButton,%ZoomLabel,%ZoomSlider)%unique-name access, retaining the same toggle/value_changed handlers and the same settings persistence semantics