Add Layer Notify plugin#1444
Conversation
jacopotediosi
left a comment
There was a problem hiding this comment.
@Benaa42 First of all, thank you for your contribution!
Unfortunately, I'm unable to review your plugin until the PR template has been filled out - it should appear automatically when opening a PR in this repository.
That template helps us reviewers work more efficiently and ensures that plugin maintainers have read all the necessary documentation and accepted the terms.
We've noticed that a few recent PRs, also from other users, have been missing it, so just a friendly reminder - please take a moment to complete it, and I'll be happy to proceed with the review. Thanks!
|
Quick look, plugin is missing software update hook, is_template_autoescaped, is_api_protected, and any kind of permissions on the API calls. |
|
Thank you for the review @jacopotediosi and @jneilliii! I've addressed both points: 1. PR template filled — all questions answered above. 2. Plugin code updated (commit 7b3d1f8):
Please let me know if anything else is needed. Thank you! |
|
I can't tell you how much it pains us to review these AI developed plugins. I took another look at the actual logic and realized a few more things after running the plugin through octoscanner.
|
There was a problem hiding this comment.
In addition to what was reported by @jneilliii, and to my comment below, there doesn't seem to be anything else to fix at this moment.
As for the potential XSS in Pnotify, my advice is to wrap data.command and data.layer with _.escape().
| - url: https://raw.githubusercontent.com/Benaa42/octoprint-layer-notify/main/docs/screenshot_settings.png | ||
| alt: Settings panel showing layer list and sound configuration | ||
| caption: Configure target layers with optional GCODE commands and sound alerts | ||
| - url: https://raw.githubusercontent.com/Benaa42/octoprint-layer-notify/main/docs/screenshot_tab.png | ||
| alt: Layer Notify tab with real-time status | ||
| caption: Dedicated tab showing which layers have fired and which are waiting | ||
|
|
||
| featuredimage: https://raw.githubusercontent.com/Benaa42/octoprint-layer-notify/main/docs/screenshot_tab.png |
There was a problem hiding this comment.
Images should be placed in /assets/img/plugins/layer_notify/ within this repository
|
Hi @jneilliii, all 6 points have been addressed in commit f2a915b:
Please let me know if anything else needs attention. Thank you for the detailed review! |
|
I reviewed the plugin's current code again, there are still a few issues:
As per my comment above, I suggest using
Nope, your Finally, regarding this PR, please place images within this repo per my comment #1444 (comment). Everything else looks ok to me. |
|
Also in your readme.md you still mention gcode comments in the |
What is the name of your plugin?
Layer Notify
What does your plugin do?
Sends a visual notification (browser toast + OS native notification) and an optional sound alert when a specific layer is reached during a print job. Each target layer can also trigger a GCODE command automatically (e.g.
M600for a filament change,M117to show a message on the printer display). Multiple target layers can be configured independently, each with its own command, sound and enable toggle.Where can we find the source code of your plugin?
https://github.com/Benaa42/octoprint-layer-notify
Was any kind of genAI (ChatGPT, Copilot etc) involved in creating this plugin?
Yes — Claude (Anthropic) was used as a coding assistant during development. All code was reviewed and tested on a physical printer (Creality Ender S1 PRO) before submission.
Is your plugin commercial in nature?
No, it is free and open-source (AGPLv3).
Does your plugin rely on some cloud services?
No. All functionality runs locally inside OctoPrint. No external services or internet connection required.
Further notes
;LAYER:X, PrusaSlicer; layer X,) with a Z-movement fallback that works with any slicer.