Skip to content

Frontend decoupling and such for the eSim tool-manager#608

Open
caveman210 wants to merge 7 commits into
FOSSEE:feature/tool-manager-integrationfrom
caveman210:frontend-integration
Open

Frontend decoupling and such for the eSim tool-manager#608
caveman210 wants to merge 7 commits into
FOSSEE:feature/tool-manager-integrationfrom
caveman210:frontend-integration

Conversation

@caveman210

Copy link
Copy Markdown

Related Issues

Purpose

Frontend decoupling for toolManager — extract Qt UI components into a dedicated qt/ subpackage, refactor platform detection and tool lists to use centralized constants and registry, and add try/except-guarded adapter files for cross-branch compatibility.

Approach

  • Phase 1 — Adapter package (qt/): Create init.py, worker.py, gui_fixed.py, main.py, updater_gui.py that re-export the canonical classes and constants from the existing modules. All imports use try/except fallbacks to remain compatible regardless of which module layout is active.
  • Phase 2 — Refactoring:
  • gui_fixed.py: Replace inline platform.system() / IS_WINDOWS / IS_LINUX with imports from toolManager.constants (with fallback).
  • main.py: Fix ToolManagerGUI import order (try package path first); replace sys.platform == "win32" with IS_WINDOWS from constants; remove dead FULL_GUI variable; derive ANALOG_TOOLS/DIGITAL_TOOLS lists from registry.CATEGORIES instead of hardcoded values.
  • Cleanup: Remove stale section headers and inline comments from main.py.
  • 7 atomic commits — each leaves the codebase in a working, importable state.

Copilot AI review requested due to automatic review settings July 15, 2026 15:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a toolManager/qt/ subpackage intended to decouple/organize Qt UI entrypoints and provide “adapter” modules for alternate module layouts, while also refactoring platform detection and tool category lists to rely on centralized toolManager.constants and toolManager.registry.

Changes:

  • Added src/toolManager/qt/ adapter modules (main.py, gui_fixed.py, worker.py, updater_gui.py, plus package init) to re-export existing UI classes/utilities.
  • Refactored src/toolManager/main.py to import IS_WINDOWS and derive ANALOG_TOOLS / DIGITAL_TOOLS from registry.CATEGORIES.
  • Refactored src/toolManager/gui_fixed.py to use toolManager.constants for IS_WINDOWS / IS_LINUX instead of platform.system().

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/toolManager/qt/worker.py Adds a Qt worker adapter with fallback implementations for missing modules.
src/toolManager/qt/updater_gui.py Adds an adapter that re-exports the updater window entrypoints.
src/toolManager/qt/main.py Adds an adapter entrypoint and derives tool groupings/labels from the registry.
src/toolManager/qt/gui_fixed.py Adds an adapter re-exporting the canonical GUI classes and platform constants.
src/toolManager/qt/init.py Introduces the qt subpackage.
src/toolManager/main.py Switches platform checks and tool lists to centralized constants/registry categories; minor cleanup.
src/toolManager/gui_fixed.py Switches platform detection to toolManager.constants (fallback supported).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +4
from toolManager.main import ToolManagerWindow, main
from toolManager.registry import TOOLS, CATEGORIES
from toolManager.constants import IS_WINDOWS
from toolManager.qt.gui_fixed import ToolManagerGUI
Comment on lines +1 to +4
from toolManager.gui_fixed import ToolManagerGUI, UninstallWindow, CommandWorker
from toolManager.registry import TOOLS
from toolManager.constants import IS_WINDOWS, IS_LINUX
from toolManager.paths import get_toolmanager_root
Comment on lines +1 to +2
from toolManager.updater_gui import PackageUpdaterWindow, main
from toolManager.registry import TOOLS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants