Hi @DewGew,
I'm a Machinon user (running it on my home Domoticz instance) and I'd like to offer help modernizing the codebase. Before doing any work, I wanted to check if you're open to
receiving PRs along these lines.
Why now?
With issue #157 showing that the new Domoticz beta (Angular conversion) is already breaking the theme, this feels like a natural moment to address some of the underlying
brittleness that makes the theme fragile against upstream changes.
What I've found
After auditing the codebase, these are the main areas that could benefit from attention:
JavaScript
- 8+ synchronous AJAX calls (
async: false) that freeze the browser UI during settings load/save
- 20+ global variables with no module pattern — every file mutates shared state freely
- Memory leaks — intervals never cleared (
standby.js), object URLs never revoked (dashboard_camera.js)
- Race conditions — multiple
setTimeout hacks with comments like "delay it a few otherwise it gets overwritten"
- Tight coupling to Angular — polling loop every 100ms checking
typeof angular with no cleanup
- Duplicated code —
switchState recreated in 3 files, near-identical settings functions in themesettings.js
- Vendored libraries —
moment.js (deprecated upstream), livestamp.js (2015), animate.css v3.7.2 (2019)
CSS
- 248+
!important declarations - fighting upstream styles with brute force
icons_on_tabs.css - 341 lines that are ~80% duplication, could be ~100 lines
- Invalid CSS -
height: flex and width: flex in custom.css (not valid values)
- Hardcoded colors - 100+ raw hex/rgb values that should be CSS custom properties
- No design token system - shadows, borders, spacing, breakpoints all hardcoded and duplicated
Security
- Unsanitized values used in DOM selectors (
$("tr[data-idx='" + data.idx + "']"))
- Unvalidated URLs injected into iframe
src and CSS url()
How I'd approach it
- Small, focused PRs - one concern per PR, easy to review
- No behavior changes - same features, same look, just cleaner internals
- Prioritized by impact - start with bug-causing issues (invalid CSS, memory leaks, sync AJAX) before structural refactoring
Transparency
I use Claude Code (AI-assisted development) as my development tool. All code will be reviewed and tested by me on my own Domoticz instance
before submitting. I'll note AI assistance in commit messages per convention (Co-Authored-By: Claude).
What I'm asking
Are you open to receiving PRs like this? I'm happy to:
- Start with a single small PR so you can evaluate the approach
- Adjust scope/style based on your feedback
- Back off entirely if you'd prefer to keep the codebase as-is
I'd also really value your input and perspective on priorities - you know this codebase and its history far better than I do. If there are areas you've been wanting to clean
up, or things you'd rather leave untouched, I'd love to hear that before diving in.
No pressure either way - just offering to help with a theme I use and appreciate daily.
Thanks for maintaining Machinon! 🙏
Hi @DewGew,
I'm a Machinon user (running it on my home Domoticz instance) and I'd like to offer help modernizing the codebase. Before doing any work, I wanted to check if you're open to
receiving PRs along these lines.
Why now?
With issue #157 showing that the new Domoticz beta (Angular conversion) is already breaking the theme, this feels like a natural moment to address some of the underlying
brittleness that makes the theme fragile against upstream changes.
What I've found
After auditing the codebase, these are the main areas that could benefit from attention:
JavaScript
async: false) that freeze the browser UI during settings load/savestandby.js), object URLs never revoked (dashboard_camera.js)setTimeouthacks with comments like "delay it a few otherwise it gets overwritten"typeof angularwith no cleanupswitchStaterecreated in 3 files, near-identical settings functions inthemesettings.jsmoment.js(deprecated upstream),livestamp.js(2015),animate.cssv3.7.2 (2019)CSS
!importantdeclarations - fighting upstream styles with brute forceicons_on_tabs.css- 341 lines that are ~80% duplication, could be ~100 linesheight: flexandwidth: flexincustom.css(not valid values)Security
$("tr[data-idx='" + data.idx + "']"))srcand CSSurl()How I'd approach it
Transparency
I use Claude Code (AI-assisted development) as my development tool. All code will be reviewed and tested by me on my own Domoticz instance
before submitting. I'll note AI assistance in commit messages per convention (
Co-Authored-By: Claude).What I'm asking
Are you open to receiving PRs like this? I'm happy to:
I'd also really value your input and perspective on priorities - you know this codebase and its history far better than I do. If there are areas you've been wanting to clean
up, or things you'd rather leave untouched, I'd love to hear that before diving in.
No pressure either way - just offering to help with a theme I use and appreciate daily.
Thanks for maintaining Machinon! 🙏