Skip to content

small CI improvements#37

Merged
FaserF merged 1 commit intomainfrom
small-improvements
Jan 15, 2026
Merged

small CI improvements#37
FaserF merged 1 commit intomainfrom
small-improvements

Conversation

@FaserF
Copy link
Owner

@FaserF FaserF commented Jan 15, 2026

Summary by CodeRabbit

  • UI Improvements

    • Enhanced Winget manifest creation dialog with a warning note about SHA256 placeholder that requires manual update before submission.
  • Bug Fixes

    • Improved error handling and exception catching in dialog operations for increased reliability.
    • Streamlined folder-opening functionality across the application for consistency and better cross-platform support.
  • Chores

    • Updated workflow configurations and improved import handling in backend scripts.

✏️ Tip: You can customize this high-level summary in your review settings.

@FaserF FaserF self-assigned this Jan 15, 2026
@FaserF FaserF merged commit 5506220 into main Jan 15, 2026
5 of 6 checks passed
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 15, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This pull request refactors dialog and path-opening logic across the GUI components by consolidating platform-specific folder-opening code into a centralized utility method, converting local dialog variables to persistent class attributes, improving sys.path handling in CI/CD scripts, and integrating ViewMixin into LibraryView.

Changes

Cohort / File(s) Summary
GitHub CI/CD Script Maintenance
.github/scripts/check_relevance.py, .github/scripts/generate_changelog.py
Added sys.path guards to ensure script directory is in Python's import path before importing local modules. Minor refactoring: replaced tuple(["..."]) with direct tuple literal in generate_changelog.py.
GitHub Workflow Enhancements
.github/workflows/weekly.yml
Simplified relevance extraction to single-line Python call, added workflow permissions, introduced checkout step with GITHUB_TOKEN environment variable.
GUI Path Opening Centralization
src/switchcraft/gui_modern/utils/view_utils.py
Replaced file URL string construction with Path.as_uri() method in _open_path. Broadened exception handling from bare except to except Exception.
Dialog Management Refactoring
src/switchcraft/gui_modern/views/addon_manager_view.py, src/switchcraft/gui_modern/views/group_manager_view.py
Converted local dialog variables (dlg, add_dlg) to persistent class attributes (self.import_dlg, self.dlg_add_member). Updated dialog open/close methods to use page's open/close_dialog APIs.
View Integration & Platform Logic Removal
src/switchcraft/gui_modern/views/analyzer_view.py, src/switchcraft/gui_modern/views/library_view.py, src/switchcraft/gui_modern/views/wingetcreate_view.py
Removed OS-specific folder opening logic (Windows/macOS/Linux branching) across three views, replacing with unified self._open_path() calls. Added ViewMixin inheritance to LibraryView. Enhanced dialog content with warning note in analyzer_view.
Import Location Cleanup
src/switchcraft/services/ai_service.py
Moved re module import from local function scope to top-level.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

ci-cd

Poem

🐰 With paths consolidated and dialogs made keen,
Platform checks vanish—logic so clean!
Mixins now blend what once stood apart,
This refactored GUI's a work of art!

✨ Finishing touches
  • 📝 Generate docstrings


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bcbe6d1 and 235abed.

📒 Files selected for processing (10)
  • .github/scripts/check_relevance.py
  • .github/scripts/generate_changelog.py
  • .github/workflows/weekly.yml
  • src/switchcraft/gui_modern/utils/view_utils.py
  • src/switchcraft/gui_modern/views/addon_manager_view.py
  • src/switchcraft/gui_modern/views/analyzer_view.py
  • src/switchcraft/gui_modern/views/group_manager_view.py
  • src/switchcraft/gui_modern/views/library_view.py
  • src/switchcraft/gui_modern/views/wingetcreate_view.py
  • src/switchcraft/services/ai_service.py

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@FaserF FaserF deleted the small-improvements branch January 15, 2026 11:29
@coderabbitai coderabbitai bot mentioned this pull request Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant