Add update notification and fix Windows build#97
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
WalkthroughIntroduces a GitHub Releases–based update-check system. A new ChangesGitHub Releases Update-Check Feature
Sequence Diagram(s)sequenceDiagram
participant User
participant SettingsDialog as SettingsDialog.qml
participant HelpMenu as Help Menu / Main.qml
participant UIState as UIState (provider.py)
participant AppController as AppController (app.py)
participant Executor as _update_executor
participant GitHub as GitHub Releases API
User->>SettingsDialog: Enable "Check for Updates"
SettingsDialog->>UIState: set_update_check_enabled(true)
UIState->>AppController: set_update_check_enabled(true)
User->>HelpMenu: Click "Check for Updates"
HelpMenu->>AppController: check_for_updates(manual=true)
AppController->>Executor: submit check_for_update()
Executor->>GitHub: HTTPS GET /releases/latest
GitHub-->>Executor: release JSON
Executor->>AppController: _updateCheckFinished.emit(UpdateInfo)
AppController->>HelpMenu: openUpdateDialog(info)
HelpMenu->>User: Show update dialog (Skip / Open Release)
User->>AppController: open_update_release(url)
AppController->>GitHub: QDesktopServices.openUrl(releaseUrl)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64fdcd896a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| flat: true | ||
| onClicked: { | ||
| if (settingsDialog.controllerRef) { | ||
| settingsDialog.controllerRef.check_for_updates(true) |
There was a problem hiding this comment.
Close settings before showing update results
When a newer release is found from the Settings dialog's "Check Now" button, this call leaves SettingsDialog open with modality: Qt.ApplicationModal while _on_update_check_finished opens the update Dialog on the main ApplicationWindow. In that path the update dialog is attached to a window that remains blocked/covered by the application-modal settings window, so users may see no actionable result until they dismiss Settings; close or hide Settings before starting/showing the update result, or show the result in the settings window itself.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@faststack/app.py`:
- Around line 6267-6314: In the check_for_updates() method, add an early guard
check for _shutting_down (similar to existing pattern in codebase) to return
before setting _update_check_inflight to True. Wrap the
_update_executor.submit() call in a try-except block to catch RuntimeError,
reset _update_check_inflight to False on failure, log a warning, and return
early. Additionally, guard the signal emission (_updateCheckFinished.emit)
inside the _done callback function with a _shutting_down check to prevent
emitting signals after shutdown has begun.
In `@faststack/qml/SettingsDialog.qml`:
- Around line 803-808: The autoUpdateBox CheckBox component has a hard-coded
checked property set to false on line 807, which causes the dialog to display an
incorrect state when loaded, mismatching the persisted autoUpdateEnabled value
that gets saved. Replace the hard-coded checked: false binding with a dynamic
binding to the actual persisted autoUpdateEnabled property value, so the
checkbox reflects the correct saved state when the SettingsDialog loads.
In `@faststack/updater.py`:
- Around line 169-185: The code assumes payload returned from
fetch_latest_release is a dict and calls .get() on it without validation, but if
fetch_latest_release returns valid JSON with a non-dict top-level type, it will
raise AttributeError instead of UpdateCheckError. Add an explicit type check
immediately after calling fetch_latest_release to verify that payload is a dict,
and if not, raise UpdateCheckError with a message indicating the unexpected
payload shape. This ensures all error conditions raise UpdateCheckError as per
the module's contract rather than allowing AttributeError to propagate.
In `@README.md`:
- Around line 92-95: The update command in lines 92-95 references the virtualenv
directory as `.venv/Scripts/python.exe`, but the installation instructions at
line 73 create the virtualenv as `venv` (without the dot prefix). Change `.venv`
to `venv` in the pip install command to match the directory name created during
installation, ensuring users following the instructions exactly will not
encounter path errors when running the update command.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 374da756-025e-441f-afd7-f840c66b2a82
📒 Files selected for processing (10)
README.mdfaststack/__main__.pyfaststack/app.pyfaststack/config.pyfaststack/qml/Main.qmlfaststack/qml/SettingsDialog.qmlfaststack/ui/provider.pyfaststack/updater.pypyproject.tomlrequirements.txt
Summary by CodeRabbit
Release Notes
New Features
Documentation