Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes Qt/C++ Modeleditor dependencies by replacing key components with pure-Ruby implementations and a new SketchUp UI::HtmlDialog-based Inspector UI.
Changes:
- Replaced the Qt-backed path watcher with a pure-Ruby polling watcher using
UI.start_timer. - Replaced the Qt-backed GitHub release checker with a pure-Ruby update checker using
Sketchup::Http::Request. - Added a new HtmlDialog-based InspectorDialog (Ruby backend + HTML/Vue frontend) and wired it into menu/dialog management.
Reviewed changes
Copilot reviewed 12 out of 17 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| plugin/openstudio/lib/watchers/PluginPathWatcher.rb | Replaces Qt/C++ PathWatcher with Ruby polling watcher. |
| plugin/openstudio/lib/watchers/PluginModelWatcher.rb | Switches to new OpenStudio::ensureSpaceLoadDefinition callsite. |
| plugin/openstudio/lib/interfaces/Luminaire.rb | Switches to new OpenStudio::ensureSpaceLoadDefinition callsite. |
| plugin/openstudio/lib/dialogs/InspectorDialog/vendor/modus/jquery.js | Adds vendored jQuery for the new inspector UI. |
| plugin/openstudio/lib/dialogs/InspectorDialog/vendor/modus/bootstrap.bundle.min.js | Adds vendored Bootstrap bundle for the new inspector UI. |
| plugin/openstudio/lib/dialogs/InspectorDialog/reload.rb | Adds dev-only reload helper for the new inspector dialog. |
| plugin/openstudio/lib/dialogs/InspectorDialog/inspector_dialog.rb | New Ruby HtmlDialog backend for inspector + access policy parsing + CRUD. |
| plugin/openstudio/lib/dialogs/InspectorDialog/html/inspector_dialog.html | New Vue-based inspector frontend and Ruby↔JS glue functions. |
| plugin/openstudio/lib/dialogs/InspectorDialog/copilot-instructions.md | Adds dialog/porting guidance doc for contributors. |
| plugin/openstudio/lib/dialogs/InspectorDialog/SketchUpPluginPolicy.xml | Adds XML access policy source consumed by the inspector. |
| plugin/openstudio/lib/UpdateManager.rb | Replaces Qt HTTP release checker with Sketchup::Http::Request implementation. |
| plugin/openstudio/lib/PluginManager.rb | Updates startup requires (now includes ModelEditor). |
| plugin/openstudio/lib/MenuManager.rb | Swaps old inspector dialog integration to new HtmlDialog-based inspector. |
| plugin/openstudio/lib/DialogManager.rb | Instantiates new inspector dialog and updates related method calls. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
@jmarrec I merged your ProgressBar in, I was getting bug splats in my first implementation but yours worked, I must have been forgetting a virtual method or something. This is nice, it will allow us to completely get rid of the openstudio_modeleditor.so file |
There was a problem hiding this comment.
Pull request overview
This PR removes the SketchUp plugin’s dependency on Qt/Modeleditor UI components by porting key features (notably the Inspector) to SketchUp’s UI::HtmlDialog and replacing Qt-backed utilities with pure-Ruby/SketchUp API equivalents.
Changes:
- Replaces the Qt-based Inspector dialog with a new Ruby + HTML/Vue
UI::HtmlDialogimplementation, including field access policy enforcement and model/watch integration. - Replaces Qt-backed utilities (PathWatcher, UpdateManager, ProgressBar, ensureSpaceLoadDefinition) with pure-Ruby implementations using SketchUp APIs.
- Adds/updates policy parsing (XML) and introduces/extends tests around access policy behavior.
Reviewed changes
Copilot reviewed 18 out of 23 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| plugin/openstudio/test/AccessPolicyStore_Test.rb | Adds Minitest coverage for AccessPolicyStore and field-name alignment with the OpenStudio IDD. |
| plugin/openstudio/lib/watchers/PluginPathWatcher.rb | Replaces Qt/C++ PathWatcher with a polling watcher using UI.start_timer. |
| plugin/openstudio/lib/watchers/PluginModelWatcher.rb | Switches ensureSpaceLoadDefinition call to the new pure-Ruby implementation. |
| plugin/openstudio/lib/interfaces/SelectionInterface.rb | Minor cleanup (whitespace) in selection handling. |
| plugin/openstudio/lib/interfaces/ModelInterface.rb | Hooks inspector dialog to a new on_model_attached lifecycle event. |
| plugin/openstudio/lib/interfaces/Luminaire.rb | Switches ensureSpaceLoadDefinition call to the new pure-Ruby implementation. |
| plugin/openstudio/lib/dialogs/ProgressDialog.rb | Replaces Qt progress bar wrapper with a pure-Ruby status-text-based progress display. |
| plugin/openstudio/lib/dialogs/InspectorDialog/vendor/modus/jquery.js | Adds vendored jQuery used by the HtmlDialog UI. |
| plugin/openstudio/lib/dialogs/InspectorDialog/vendor/modus/bootstrap.bundle.min.js | Adds vendored Bootstrap bundle used by the HtmlDialog UI. |
| plugin/openstudio/lib/dialogs/InspectorDialog/inspector_dialog.rb | New HtmlDialog-backed Inspector implementation (Ruby backend + watchers + CRUD + unit conversion). |
| plugin/openstudio/lib/dialogs/InspectorDialog/html/inspector_dialog.html | New Vue-based 3-panel Inspector UI (types/objects/fields). |
| plugin/openstudio/lib/dialogs/InspectorDialog/copilot-instructions.md | Adds local development notes/instructions for porting/architecture. |
| plugin/openstudio/lib/dialogs/InspectorDialog/access_policy_store.rb | New AccessPolicyStore implementation parsing SketchUpPluginPolicy.xml. |
| plugin/openstudio/lib/dialogs/InspectorDialog/SketchUpPluginPolicy.xml | Adds the policy XML used to lock/hide fields by IDD type/field. |
| plugin/openstudio/lib/dialogs/InspectorDialog/.gitignore | Ignores local porting/reference directories under InspectorDialog. |
| plugin/openstudio/lib/UpdateManager.rb | Replaces Qt HTTP update checker with Sketchup::Http::Request + GitHub Releases API parsing. |
| plugin/openstudio/lib/PluginManager.rb | Removes Qt application initialization/event pumping; adjusts require order (adds ModelEditor). |
| plugin/openstudio/lib/ModelEditor.rb | Adds pure-Ruby OpenStudio.ensureSpaceLoadDefinition replacement. |
| plugin/openstudio/lib/MenuManager.rb | Wires menu command to the new Inspector dialog and updated method names. |
| plugin/openstudio/lib/DialogManager.rb | Swaps inspector dialog class, updates API calls, and forwards unit system changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Seeing this in a bugsplat on Mac, copilot diagnosed, environment variable is working when set before loading OpenStudio The disassembly tells us everything. Look at __armv8_rng_probe: __armv8_rng_probe:0000000002274704 mrs x0, S3_3_C2_C4_0 ← RNDR instruction0000000002274708 mrs x0, S3_3_C2_C4_1 ← RNDRRS instruction000000000227470c ret Why It Crashes on M1 Verify the Signal Handler Bug # Check if OPENSSL_cpuid_setup / ill_handler is called before the probeotool -tv /Applications/OpenStudioApplication-1.11.0/lib/libopenstudiolib.dylib | grep -B 5 "_ill_handler"# Check what calls armv8_rng_probe (the caller at 0x2274de0)otool -tv /Applications/OpenStudioApplication-1.11.0/lib/libopenstudiolib.dylib | grep -B 30 "2274de0" # OpenSSL 3.x respects this to disable ARMv8 capability probing Option 2 — Wrap with a launcher script: #!/bin/bashexport OPENSSL_armcap=0exec /Applications/OpenStudioApplication-1.11.0/OpenStudioApplication.app/Contents/MacOS/OpenStudioApplication "$@" chmod +x ~/launch_openstudio.sh # Back up firstcp /Applications/OpenStudioApplication-1.11.0/lib/libopenstudiolib.dylib \ /Applications/OpenStudioApplication-1.11.0/lib/libopenstudiolib.dylib.bak# The function at offset 0x2274704 should be patched to:# mov x0, xzr (return 0 = not supported)# ret# nop# instead of executing RNDR/RNDRRS |
…ripts where this is isn't done...
|
Ok so after some investigation:
|
…g as far as I can tell
…ow when creating a new dialog
|
Thanks for cleaning up all the user scripts @jmarrec. shared_dialog was an attempt to avoid having to create a new window every time we make a dialog. I don't know that it is helping that much, the dialogs aren't as responsive as I was hoping (given that Chrome is running in another process), I don't know if there is a separate thread for sending the messages to Chrome from Ruby, I assume that sending the messages out is where the holdup is. The progress bar isn't great, but it is something (it is better than status_text) and I haven't seen it cause any issues. |
|
I have a branch, https://github.com/openstudiocoalition/openstudio-sketchup-plugin/tree/tweak_progressdialog, where I tried a bunch of things. It's still not behaving exactly like I wanted and it's time consuming. One thing to note is that I'm testing on SU 2024, where you don't have dialog.hide. |
Yeah, the main point of the PR is replacing the inspector dialog and removing Qt. The progress bar is just kind of an annoying detail; I don't think it's worth sucking up too much time and attention. I've assumed that anyone with a license would update to the latest but I can test in SU 2025 as well. |
|
Merge away if you're satisfied @macumber ! |


Recreate the inspector dialog using SketchUp Html Dialog to remove the dependency of the SketchUp Plug-in on Qt
Fixes #167
Depends on openstudiocoalition/OpenStudioApplication#864
Testing