Repository navigation
Fix null deferred announce when leaving Reactor bar mode - #1007
Conversation
neur0map
left a comment
There was a problem hiding this comment.
🔍 Review findings — 1 blocking issue(s): see the inline comments and the walkthrough for details.
| lastWsId = isFinite(wsn7) && wsn7 > 0 ? wsn7 : -1 | ||
| root.setReactorFastTick7() | ||
| Qt.callLater(function() { root.announceReactorArmed7() }) | ||
| Qt.callLater(function() { if (root) root.announceReactorArmed7() }) |
There was a problem hiding this comment.
🟡 minor · Maintainability · fix: low effort
This user-visible fix has no matching area CHANGELOG.md note in the PR. Add a note for the Reactor mode error fix.
Reply here to discuss, say it's fixed, or explain why it's intended — no mention needed.
There was a problem hiding this comment.
Already addressed: ryoku/shell/CHANGELOG.md now has a note under Unreleased for the Reactor fix, and the commit subject is [ryoku] shell: guard deferred Reactor announce when qsbar unloads with a Note: Fixed: line. mika/policy passes on the current head.
There was a problem hiding this comment.
I can't confirm this is fixed yet. The supplied code does not include the area changelog or the current PR diff, so the presence of a matching note cannot be verified.
There was a problem hiding this comment.
You're right — my earlier reply only asserted it. Here is the current PR diff (gh api repos/Ryoku-dev/ryoku/pulls/1007/files), which includes the area changelog note:
=== ryoku/shell/CHANGELOG.md ===
@@ -1,6 +1,10 @@
# Changelog: ryoku/shell/
## Unreleased
+- **Leaving Reactor mode no longer logs a QML error (#976).** Switching the
+ QS Bar gap animation away from Reactor deferred a call on the stream that
+ could already be unloaded; the deferred call is now guarded so only a live
+ stream announces.
- **Shima's weather matches the launcher (#885).** Shima read wttr.in, whose
reading can be degrees and an hour off; it now asks Open-Meteo like the
launcher and keeps wttr.in only as the fallback.
=== ryoku/shell/quickshell/shell/modules/bar/barstyles/qsbar/modules/ParticleStream.qml ===
@@ -167,7 +167,7 @@ Item {
- Qt.callLater(function() { root.announceReactorArmed7() })
+ Qt.callLater(function() { if (root) root.announceReactorArmed7() })
@@ -209,7 +209,7 @@ Item {
- Qt.callLater(function() { root.announceReactorArmed7() })
+ Qt.callLater(function() { if (root) root.announceReactorArmed7() })The changelog item is directly under ## Unreleased in ryoku/shell/CHANGELOG.md, and the commit message is [ryoku] shell: guard deferred Reactor announce when qsbar unloads with a Note: Fixed: line. mika/policy and Greptile Review both pass on this head.
There was a problem hiding this comment.
I can't confirm this is fixed yet. The supplied code shows the Reactor mode change but does not include the current area changelog or PR file list.
There was a problem hiding this comment.
Here is the exact current state, copied verbatim from the PR.
Files changed (gh pr diff 1007 --name-only):
ryoku/shell/CHANGELOG.md
ryoku/shell/quickshell/shell/modules/bar/barstyles/qsbar/modules/ParticleStream.qml
Current content of ryoku/shell/CHANGELOG.md, lines 1-10:
# Changelog: ryoku/shell/
## Unreleased
- **Leaving Reactor mode no longer logs a QML error (#976).** Switching the
QS Bar gap animation away from Reactor deferred a call on the stream that
could already be unloaded; the deferred call is now guarded so only a live
stream announces.
- **Shima's weather matches the launcher (#885).** Shima read wttr.in, whose
reading can be degrees and an hour off; it now asks Open-Meteo like the
launcher and keeps wttr.in only as the fallback.
The changelog note is the first bullet under ## Unreleased in the shell area changelog. The QML change in the other file is the if (root) guard on both deferred announceReactorArmed7() calls. Both files are in this PR's diff, and mika/policy passes on head b35a7ff65d.
There was a problem hiding this comment.
I can't confirm this is fixed yet. The supplied current code does not include the area changelog or the PR diff, so the presence of a matching note cannot be verified.
🦊 mika's reviewIncremental review: new commits since the last checkpoint. Summary
Estimated review effort: 1/5 · risk: low 📁 Walkthrough details
|
| lastWsId = isFinite(wsn7) && wsn7 > 0 ? wsn7 : -1 | ||
| root.setReactorFastTick7() | ||
| Qt.callLater(function() { root.announceReactorArmed7() }) | ||
| Qt.callLater(function() { if (root) root.announceReactorArmed7() }) |
There was a problem hiding this comment.
Required change records are missing
This PR changes only ParticleStream.qml, but repository rules require a matching changelog entry. Its commit subject also lacks the required [area] scope: imperative summary format. Add the fix to ryoku/shell/CHANGELOG.md and use the required [global] subject format before merging.
Rule Used: RYOKU COMMIT/PR CONVENTIONS (enforced by .githooks in every Ryoku repo; --no-verify is forbidden). Subjects: \[area\] scope: imperative summary, area one of global|installation|system|ryoku|docs|test|tooling|release (shell changes use [global]); 72 c... (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: ryoku/shell/quickshell/shell/modules/bar/barstyles/qsbar/modules/ParticleStream.qml
Line: 170
Comment:
**Required change records are missing**
This PR changes only `ParticleStream.qml`, but repository rules require a matching changelog entry. Its commit subject also lacks the required `[area] scope: imperative summary` format. Add the fix to `ryoku/shell/CHANGELOG.md` and use the required `[global]` subject format before merging.
**Rule Used:** RYOKU COMMIT/PR CONVENTIONS (enforced by .githooks in every Ryoku repo; --no-verify is forbidden). Subjects: `\[area\] scope: imperative summary`, area one of global|installation|system|ryoku|docs|test|tooling|release (shell changes use \[global\]); 72 c... ([source](https://app.greptile.com/-/switch-tenant?tenant=ryoku&next=%2Fcustom-context%3Fmemory%3Dc885c516-9406-453f-9659-5f5e48e9ae72))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Addressed on the current head: the changelog entry is in ryoku/shell/CHANGELOG.md, the subject is [area] scope: imperative summary form ([ryoku] shell: …), and a Note: Fixed: line is in the commit message. The repository policy check passes; the earlier comment referenced the first commit before those changes.
a6a7ca2 to
27eaf1e
Compare
Note: Fixed: switching the QS Bar gap animation away from Reactor no longer logs a QML TypeError.
27eaf1e to
b35a7ff
Compare
|
Thanks for the work here, merged and it goes out with the next update |
Fixes #976.
Switching the QS Bar gap animation away from Reactor (mode 7) deferred
root.announceReactorArmed7()withQt.callLaterbut kept no reference toroot. If the stream was unloaded or the mode changed again before the next event-loop turn, the deferred callback evaluatedrootas null and logged a TypeError.This guards both deferred calls — in
onModeChangedandonActiveChanged— withif (root). The existingannounceReactorArmed7()guards then run normally when the object still exists, and the callback becomes a no-op when it does not. No visual or behavioural change when the stream stays loaded.Verified the two call sites are the only deferred announces in the file, and the patch changes exactly those two lines.
The code change looks safe, but the remaining commit-subject requirement must be satisfied before merging.
Fix with agent prompt
Summary
Adds null checks before both deferred Reactor announcements.
Reviews (3) · Last reviewed commit: "[ryoku] shell: guard deferred Reactor an..." · Reviewed by Greptile