-
-
Notifications
You must be signed in to change notification settings - Fork 18
Refactor task runner bindings and apply timelined progress #392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis change refactors the task progress UI binding architecture from direct component field access to property-based binding. TaskRunner removes a public Changes
Sequence DiagramsequenceDiagram
participant Task as Task/Component
participant Controller as TaskBarController
participant Timeline as Timeline
participant UI as ProgressBar UI
Task->>Controller: updateProgress(newValue)
Controller->>Controller: clamp negative to 0
Controller->>Timeline: stop if running
Controller->>Timeline: create animation KeyFrame
Timeline->>Controller: animate delta over computed duration
Controller->>UI: progressProperty.setValue(interpolated)
UI->>UI: update progress visually
Task->>Controller: setErrorLog(details)
Controller->>UI: add "progress-bar-error" style
Controller->>UI: show logsButton
Task->>Controller: resetErrorLog()
Controller->>UI: remove error style
Controller->>UI: hide logsButton
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (1 passed)
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 |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
owlplug-client/src/main/java/com/owlplug/core/components/TaskRunner.java(2 hunks)owlplug-client/src/main/java/com/owlplug/core/controllers/TaskBarController.java(5 hunks)owlplug-client/src/main/java/com/owlplug/plugin/tasks/PluginScanTask.java(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-03T18:35:06.941Z
Learnt from: DropSnorz
Repo: DropSnorz/OwlPlug PR: 359
File: owlplug-client/src/main/java/com/owlplug/plugin/tasks/PluginScanTask.java:104-113
Timestamp: 2025-11-03T18:35:06.941Z
Learning: In OwlPlug's PluginScanTask (owlplug-client/src/main/java/com/owlplug/plugin/tasks/PluginScanTask.java), all plugin paths are absolute paths, never relative, as they are normalized via FileUtils.convertPath before being stored or used as directory scopes.
Applied to files:
owlplug-client/src/main/java/com/owlplug/plugin/tasks/PluginScanTask.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (11)
owlplug-client/src/main/java/com/owlplug/plugin/tasks/PluginScanTask.java (1)
101-101: LGTM!Doubling the initial progress increment provides better user feedback during the collection phase and aligns with the animated progress updates introduced in TaskBarController.
owlplug-client/src/main/java/com/owlplug/core/controllers/TaskBarController.java (6)
25-46: LGTM!The new JavaFX animation and property imports support the property-based binding and animated progress updates.
57-69: LGTM!Good encapsulation by making UI fields private and introducing property-based state management. The new
progressPropertyandtaskNamePropertyprovide controlled access for bindings.
75-84: LGTM!The property bindings correctly wire the internal state to UI components. The
progressPropertylistener enables animated updates whiletaskLabeldirectly binds totaskNameProperty.
137-156: LGTM!The error handling methods properly manage UI state, telemetry, and user feedback. The
setErrorLogmethod applies error styling and wires the logs button, whileresetErrorLogcleans up the error state.
159-165: LGTM!The property accessors follow standard JavaFX patterns and enable external components to bind to task state.
167-211: LGTM!The animated progress update logic is well-implemented with proper edge case handling. The duration formula inversely scales with delta size, providing smooth animations for incremental updates. Timeline lifecycle management (stopping previous animations, cleanup on finish) is correct.
owlplug-client/src/main/java/com/owlplug/core/components/TaskRunner.java (4)
114-118: LGTM!The defensive error handling properly addresses the edge case where a task fails without an exception, ensuring error state is logged and displayed to the user.
141-142: LGTM!The binding changes correctly use the new property accessors from TaskBarController, aligning with the refactored property-based architecture.
147-148: LGTM!The unbinding logic correctly cleans up the property bindings established in
setCurrentTask.
156-156: No issues found—code is compatible with configured Java version.The project is configured for Java 21 (as shown in pom.xml:
<java.version>21</java.version>,<maven.compiler.source>21</maven.compiler.source>,<maven.compiler.target>21</maven.compiler.target>). TheremoveFirst()method, introduced in Java 21, is fully compatible with this configuration. The change fromremove(0)toremoveFirst()is appropriate.
owlplug-client/src/main/java/com/owlplug/core/controllers/TaskBarController.java
Outdated
Show resolved
Hide resolved
8791166 to
f88359c
Compare
f88359c to
0bcd111
Compare
*********************************************************************** Merge pull request DropSnorz#392 from DropSnorz/feat/smooth-progress Refactor task runner bindings and apply timelined progress 6332cda Arthur Poiret <[email protected]> on 05/11/2025 at 19:51 committed by GitHub <[email protected]> ***********************************************************************
*********************************************************************** Merge pull request DropSnorz#392 from DropSnorz/feat/smooth-progress Refactor task runner bindings and apply timelined progress 6332cda Arthur Poiret <[email protected]> on 05/11/2025 at 19:51 committed by GitHub <[email protected]> ***********************************************************************
No description provided.