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

front: multiple intermediate OP are changed together #10375

Open
woshilapin opened this issue Jan 14, 2025 · 3 comments
Open

front: multiple intermediate OP are changed together #10375

woshilapin opened this issue Jan 14, 2025 · 3 comments
Assignees
Labels
area:front Work on Standard OSRD Interface modules kind:bug Something isn't working module:stdcm Short-Term DCM severity:major Major severity bug

Comments

@woshilapin
Copy link
Contributor

What happened?

When I modify the second intermediate OP, the first intermediate OP is also modified with the same values at the same time.

What did you expect to happen?

Each intermediate OP should be independently changed and isolated from one another.

How can we reproduce it (as minimally and precisely as possible)?

  1. Add a first intermediate OP and fill in some values
  2. Add a second intermediate OP
  3. Fill in some values in the second, and observe that the first one changed

See also the following video.

20250114-1108-02.8913967.mp4

On which environments the bug occurs?

Other

On which browser the bug occurs?

Firefox

OSRD version (top right corner Account button > Informations)

fdfd8ac

@woshilapin woshilapin added the kind:bug Something isn't working label Jan 14, 2025
@Maymanaf Maymanaf added area:front Work on Standard OSRD Interface modules module:stdcm Short-Term DCM severity:major Major severity bug labels Jan 15, 2025
@woshilapin
Copy link
Contributor Author

woshilapin commented Jan 15, 2025

I tried to reproduce with @maelysLeratRosso without success, but I digged in a bit a find a more precise way to reproduce.

  1. Only one intermediary OP in the first simulation, run it.
  2. Retain the simulation
  3. Launch a new simulation with the existing parameters
  4. In the new tab, add another intermediary OP
  5. Change one of the intermediary OP: ⚠ the other OP changes too
20250115-0933-09.2384167.mp4

There is a workaround (not ideal). You can remove all the intermediary OP, it should resume to a normal situation.

@Wadjetz Wadjetz self-assigned this Jan 15, 2025
@woshilapin
Copy link
Contributor Author

Might be fixed by #10381 (not sure, so it'd be nice to try to reproduce once #10381 is merged).

@Wadjetz
Copy link
Member

Wadjetz commented Jan 15, 2025

The problem is with the react-id-generator. It’s a sequential ID generator, and when we refresh the page, the sequence resets, which can result in duplicate IDs. Not saving the state in the local storage will fix the issue. Alternatively, we can use a random ID generator, such as UUID, to resolve this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:front Work on Standard OSRD Interface modules kind:bug Something isn't working module:stdcm Short-Term DCM severity:major Major severity bug
Projects
None yet
Development

No branches or pull requests

3 participants