Skip to content

Launcher launching correct visualization file#28

Open
maksud wants to merge 2 commits intodevelopfrom
maksud/launcher-url-fix
Open

Launcher launching correct visualization file#28
maksud wants to merge 2 commits intodevelopfrom
maksud/launcher-url-fix

Conversation

@maksud
Copy link
Copy Markdown
Collaborator

@maksud maksud commented Apr 2, 2026

Merge request type

  • New feature
  • Resolves bug
  • Documentation
  • Other

Relates to

  • OPFLOW
  • SOPFLOW
  • SCOPFLOW
  • TCOPFLOW
  • CMake build system
  • Spack configuration
  • Manual
  • Web docs
  • Other

This MR updates

  • Header files
  • Source code
  • CMake build system
  • Spack configuration
  • Web docs
  • Manual
  • Other

Summary

This PR fixes the issue when a visualization json file is uploaded (not using opfllow and/or gic file to create the visualization file) and it's name is different than opflowout.json, the default viz does not render the file. The default viz looks for a filename opflowout.json by default and if it is not present no visualization is shown. So, when a new file is uploaded and named differently the default launch of viz cannot use the file. To fix the issue, the viz has been updated to take parameter called file=existing.json so the url http://localhost:5173?file=existing.json looks for the file existing.json which is uploaded to the data folder. This PR adds support to Launch the correct url pattern.

@maksud maksud requested review from PhilipFackler and pelesh April 2, 2026 17:23
Copy link
Copy Markdown
Collaborator

@pelesh pelesh left a comment

Choose a reason for hiding this comment

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

The viz looks more refined and is significant improvement to what it was before.

However, with these changes, launcher cannot open selected case in the visualizer. It looks as if 200-bus case is hard-wired. That is starting from build and install from scratch.

@pelesh pelesh added enhancement New feature or request visualization labels Apr 14, 2026
Comment thread viz/package.json
"scripts": {
"dev": "vite",
"start": "yarn dev",
"start": "node scripts/start.mjs",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please undo this change as it breaks the launcher.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@pelesh what do you see in launcher. It seemed work fine for me. I will explain it a bit later.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It gives me default system instead of the one I selected.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

There are 4 scenarios that we can have.

  1. You Open Launcher, Go to Visualization Tab, there is no opflowout.json in the viz/data folder. You click Launch Visualization Server (not running opflow or choosing a file to visualize). You should see an empty USA map. (The URL should be like this: http://localhost:5174/)

  2. You Open Launcher, Go to Visualization Tab, there is an existing opflowout.json in the viz/data folder. You click Launch Visualization Server (not running opflow or choosing a file to visualize). You should see the existing opflowout.json file visualized in USA map. => If you want to remove this behavior I can do it. (the url should be like this: http://localhost:5174/)

  3. You Open Launcher, Go to Visualization Tab, regardless of there is an existing opflowout.json or not you run opflow and then Click Launch Visualization Server. A opflowout.json will be created when opflow was running and visualization should show that visualization. (the url should be like this: http://localhost:5174/)

  4. You Open Launcher, Go to Visualization Tab, and choose Use Existing JSON, and select a json file. Then Click Launch Visualization Server. A visualization should show that json file. (the url should be like this: http://localhost:5176/?file=case_ACTIVSg10k.json when the file you choose was named case_ACTIVSg10k.json)

Please let me know if either of the scenario is providing you wrong outcome. Then I can fix it. Also, whenever a new visualization is launched, a new PORT can used. It does not always be http://localhost:5173/ . I am not sure how to update it in the launcher website after the visualization code is launched.

@maksud
Copy link
Copy Markdown
Collaborator Author

maksud commented Apr 15, 2026

The viz looks more refined and is significant improvement to what it was before.

However, with these changes, launcher cannot open selected case in the visualizer. It looks as if 200-bus case is hard-wired. That is starting from build and install from scratch.

I have to look again and see if 200-bus case is hard-wired. As far as I remember, if trys to open the opflowout.json as default if nothing is provided. Otherwise it opens the json file provided as command line parameter. I will explain more later.

@pelesh
Copy link
Copy Markdown
Collaborator

pelesh commented Apr 15, 2026

As far as I remember, if trys to open the opflowout.json as default if nothing is provided.

I don't think it is desired behavior. If no input is provided, the launcher should open empty viz.

In any case, please revert the change I flagged so we can merge. Once removed, we get an appropriate behavior of the launcher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request visualization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants