Skip to content

UI: Fix the QML engine instant coding feature#3156

Open
Alxiice wants to merge 2 commits into
developfrom
fix/qml_instant_coding
Open

UI: Fix the QML engine instant coding feature#3156
Alxiice wants to merge 2 commits into
developfrom
fix/qml_instant_coding

Conversation

@Alxiice

@Alxiice Alxiice commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Description

Fix the QML engine instant coding feature

Peek 2026-07-03 11-09

@Alxiice Alxiice self-assigned this Jul 2, 2026
Comment thread meshroom/ui/utils.py Dismissed
@Alxiice
Alxiice force-pushed the fix/qml_instant_coding branch from f601952 to ad8fd84 Compare July 2, 2026 07:07

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the QML engine setup in Meshroom. Specifically, QmlInstantEngine in meshroom/ui/utils.py has been refactored to inherit from QObject instead of QQmlApplicationEngine directly, wrapping an internal engine instance and introducing a setupEngine callback to cleanly handle initial loads and hot reloads. meshroom/ui/app.py has been updated to adapt to this new architecture. The review feedback highlights a critical bug in setupEngine where accessing self.engine instead of the passed engine parameter will raise an AttributeError. Additionally, the feedback suggests optimizing engine initialization, increasing the debounce timer interval to properly handle rapid file system events, and robustly re-adding watched files to prevent file-watching loss during 'safe saves'.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread meshroom/ui/app.py Outdated
Comment thread meshroom/ui/utils.py
Comment thread meshroom/ui/utils.py
Comment thread meshroom/ui/utils.py Outdated
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.07%. Comparing base (1d89d80) to head (4b61d40).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3156   +/-   ##
========================================
  Coverage    86.07%   86.07%           
========================================
  Files           78       78           
  Lines        12111    12111           
========================================
  Hits         10425    10425           
  Misses        1686     1686           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Alxiice
Alxiice force-pushed the fix/qml_instant_coding branch from ad8fd84 to ef9fefd Compare July 2, 2026 07:36
@Alxiice Alxiice added the feature new feature (proposed as PR or issue planned by dev) label Jul 2, 2026
@Alxiice Alxiice added this to the Meshroom 2026.1.0 milestone Jul 2, 2026
@Alxiice
Alxiice force-pushed the fix/qml_instant_coding branch 4 times, most recently from 222d165 to 5ba82e0 Compare July 2, 2026 09:53
@cbentejac cbentejac added bugfix and removed feature new feature (proposed as PR or issue planned by dev) labels Jul 6, 2026
@Alxiice

Alxiice commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Comment from #3159

self._debounceTimer = QTimer(parent=self, singleShot=True, interval=100)

@Alxiice
Alxiice force-pushed the fix/qml_instant_coding branch 2 times, most recently from 642deb6 to c683b57 Compare July 7, 2026 10:24
@Alxiice
Alxiice force-pushed the fix/qml_instant_coding branch from c683b57 to 4b61d40 Compare July 15, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants