Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flow list mixed up between multiple projects #49

Closed
mshioji opened this issue Mar 24, 2024 · 7 comments
Closed

flow list mixed up between multiple projects #49

mshioji opened this issue Mar 24, 2024 · 7 comments

Comments

@mshioji
Copy link

mshioji commented Mar 24, 2024

Hello,
This is only happen when "Projects feature" is turned on at Node-RED settings.js
Screenshot from 2024-03-24 12-02-56

how to reproduce:

  1. if you have project-one with some flow-tabs like following, create new project-two from project menu.
    Screenshot from 2024-03-24 11-57-27
    newProject

  2. then we could see flow list of plugin is mixed up from project-one and project two.
    however, it seems unnecessary flow options will not be shown after browser reload.
    image

please note that flow-number count are slightly strange before following patch on node-red repo is applied:
node-red/node-red#4600
node-red/node-red#4619

Thank you,

ralphwetzel added a commit that referenced this issue Apr 6, 2024
@ralphwetzel
Copy link
Owner

Hi @mshioji !
Thank you for this report. As I'm not using the project feature, I can't really test it.
I've yet tried to provide a fix - based on what @knolleary implemented to reset the workspace index.
I'd appreciate of you could check if it solves the issue. You need to pull the latest changes directly from the repo to run this.

@mshioji
Copy link
Author

mshioji commented Apr 8, 2024

Hello @ralphwetzel ,
Thank you for the update. I also not using the project feature usually, but recently I learned this in yokoi-san's workshop and trying with node-red-mcu environment.

I tried plugin 1.5.0 today, now flow-tabs-list working fine. thank you for your work.
however, it seems build selection checkbox in the list still sometimes goes strange.
I am not sure following steps always reproduce the phenomenon but...

  1. Build Project two - flow 1
  2. switch to Project one
  3. touch checkbox on the flow-list
    -- "Deploy" button doesn't turn to RED,
    -- Build button keep activated and I could start Build without flow selection.
    (this phenomenon recovered after reload the browser. )

image

Environment:
node v20.11.1
node-red v3.1.8
mcu plugin v1.5.0
OS: Ubuntu 22.04.4 LTS

Thank you,

@ralphwetzel
Copy link
Owner

Hi @mshioji
I think I found the reason for the "strange" behaviour you experienced.
The fix was straight forward and is already in the repo - awaiting your tests.

There's one open topic yet: Currently a running debug session will not be terminated when you switch projects. That might create the funny situation that you'll continue to see screen action when you're switching back to the project you started a build from.
Do you (and/or the people around you working with the plugin) have an opinion about what should happen with a running debug session when you switch projects? Keep it running - or terminate it?

Highly appreciate you feedback!

@mshioji
Copy link
Author

mshioji commented Apr 13, 2024

Hi @ralphwetzel ,
Thank you for your quick fix, I tried latest and it works very nice.

Regarding the debug session (Keep-running or terminate), my opinion is... when I switch project, I think my brain already going to another project therefore terminate debug session is good in this case.
I am asking this topic to some people so I think I will add comment if I get different answers.
Thank you very much!

@phoddie
Copy link

phoddie commented Apr 13, 2024

Do you (and/or the people around you working with the plugin) have an opinion about what should happen with a running debug session when you switch projects? Keep it running - or terminate it?

I'm not a user of Projects, but maybe the Node-RED behavior should guide here. If a flow is running in Node and you switch projects, what happens?

@ralphwetzel
Copy link
Owner

Closing as resolved. Fix is implemented in v1.5.1.

@phoddie
Copy link

phoddie commented Apr 14, 2024

FWIW – the Node-RED documentation for the Projects features says:

Node-RED only runs one project at any time. By opening another project you change what flows are running

This seems consistent with the comment of @mshioji above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants