{{ message }}
streamcontroller cleanup pass#588
Draft
Core447 wants to merge 20 commits into
Draft
Conversation
Co-authored-by: d <d@mulmann.de>
Co-authored-by: d <d@mulmann.de>
Co-authored-by: d <d@mulmann.de>
Co-authored-by: d <d@mulmann.de>
Co-authored-by: d <d@mulmann.de>
Co-authored-by: d <d@mulmann.de>
Co-authored-by: d <d@mulmann.de>
Co-authored-by: d <d@mulmann.de>
Co-authored-by: d <d@mulmann.de>
Co-authored-by: d <d@mulmann.de>
Co-authored-by: d <d@mulmann.de>
Co-authored-by: d <d@mulmann.de>
Co-authored-by: d <d@mulmann.de>
Co-authored-by: d <d@mulmann.de>
Co-authored-by: d <d@mulmann.de>
Co-authored-by: d <d@mulmann.de>
Co-authored-by: d <d@mulmann.de>
Co-authored-by: d <d@mulmann.de>
…ed files Co-authored-by: d <d@mulmann.de>
Co-authored-by: d <d@mulmann.de>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Splits 14 oversized files into focused per-class/per-feature modules under sibling subpackages, with re-export shims so existing public import paths keep working. Plugin-facing modules (
DeckController.py,GtkHelper.py) are kept as shims with__all__enumerating their public surface so external plugins continue to import the same class objects.What changed
File splits
src/backend/DeckManagement/DeckController.py→ split intoSubclasses/MediaPlayer.py,Background.py,KeyGIF.py,InputStateManagers.py,ControllerInput.py,ControllerKey.py,ControllerDial.py,ControllerTouchScreen.py. The original file keeps theDeckControllerclass plus a top-level re-export block (with__all__listing all 20 class names) sofrom src.backend.DeckManagement.DeckController import BackgroundImage, DeckController, ...keeps resolving for plugins.src/backend/trayicon.py→src/backend/trayicon/package withDBusService.py,DBusTrayIcon.py,DBusMenu.pyand an__init__.pyshim.src/windows/Settings/Settings.py→Pages/subfolder (UIPage.py,DevPage.py,GeneralPage.py,StorePage.py,PerformancePage.py,SystemPage.py).src/windows/mainWindow/elements/Sidebar/Sidebar.py→Parts/subfolder (KeyEditor.py,PageEditor.py,Pages.py).src/windows/mainWindow/elements/Sidebar/elements/ActionManager.py→ActionManagerParts/.src/windows/mainWindow/elements/Sidebar/elements/ActionChooser.py→ActionChooserParts/.src/windows/mainWindow/elements/Sidebar/elements/ActionConfigurator.py→ActionConfiguratorParts/.src/windows/mainWindow/elements/Sidebar/elements/LabelEditor.py→LabelEditorParts/.src/windows/mainWindow/elements/KeyGrid.py→ extractedKeyButton.pyandKeyButtonContextMenu.py.src/windows/mainWindow/DeckPlus/DialBox.py→ extractedDial.pyandDialContextMenu.py.src/windows/Onboarding/OnboardingWindow.py→Screens/subfolder; the file keepsOnboardingWindowand re-exportsSupportAppOnboardingScreen(used byDonateWindow.py).src/windows/mainWindow/elements/DeckSettings/DeckGroup.py→DeckGroupParts/(Rotation, Brightness, Screensaver).src/windows/mainWindow/elements/PageSettings/DeckGroup.py→DeckGroupParts/(Brightness, Screensaver).src/windows/PageManager/elements/PageEditor.py→PageEditorParts/;PageEditorGroupbase class kept inPageEditorBase.py.GtkHelper/GtkHelper.py→ widget classes moved toGtkHelper/widgets/. The original keeps all free functions plus the localComboRow/ScaleRow(which collide with the siblingGtkHelper/ComboRow.py/GtkHelper/ScaleRow.pyfiles), and re-exports every other widget class sofrom GtkHelper.GtkHelper import BetterExpander, ...keeps resolving to the same class objects.main.py→ CLI helpers extracted tosrc/cli/list_devices.py,src/cli/list_pages.py,src/cli/dispatcher.py. Runtime init extracted tosrc/runtime/init.py.main.pykeeps the patcher init, top-level imports, theMainclass,load(),main().Cleanup pass (touched files only)
# gl.tray_icon.run_detached(),# self.show_donate(),# return image.copy().rotate(self.deck.get_rotation())).except:withexcept Exception:across the project soKeyboardInterrupt/SystemExitpropagate (the plan estimated 18, the actual count is higher).Bug fix
src/app.py App.on_change_page: moved theif page_path is None: continueguard so it runs immediately aftergl.page_manager.find_matching_page_path(...), instead of afteros.path.abspath(page_path)andgl.page_manager.get_page(page_path, controller)(where it was previously a no-op for the failing path).Stretch: plugin import hang resilience
src/backend/PluginManager/PluginManager.py load_pluginsnow imports each plugin'smainmodule on a daemon worker thread with ajoin(timeout=...)(15s by default, configurable viaSTREAMCONTROLLER_PLUGIN_IMPORT_TIMEOUT). If a plugin hangs at import time, it is logged and skipped so app startup continues. Exceptions raised inside the worker thread are captured and re-logged on the main thread, preserving the existing behaviour for normal failures.Plugin compatibility
DeckController.py,GtkHelper.py,Page.py,InputIdentifier.py,ImageHelpers.py,PluginBase.py,ActionBase.py,ActionCore.py,ActionHolder.py,ActionInputSupport.py,EventAssigner.py,EventHolder.py,InputBases.py,PluginSettings/Asset.py,Signals.py,GtkHelper/ComboRow.py,GtkHelper/ItemListComboRow.py,GtkHelper/GenerativeUI/*) keep working unchanged.DeckController.py,GtkHelper.py), the public surface is enumerated with explicit__all__and re-exported as the same class objects (verified by anis-identity check).Verification
from GtkHelper.../from src...line scanned across the bundled plugins, including theis-identity check for the two split shim modules): PASS.python main.py --devel --data datareachesFinished loading appand the process stays alive (StreamControllerPID confirmed). The onlyTracebackin the log is a pre-existing libadwaita 1.5 vs 1.6 incompatibility (Adw.ButtonRow) that exists onmainand is unrelated to this PR.Out of scope