photonvision icon indicating copy to clipboard operation
photonvision copied to clipboard

Swap after creating or duplicating pipeline

Open samfreund opened this issue 3 months ago • 0 comments

Description

Currently, after creating/duplicating a pipeline it's necessary to manually change to the new pipeline. As a QoL feature, this change makes that switch occur automatically.

This solution is guaranteed to work because when creating/dupeing a pipeline, we set it's index to int.max_value (heh another max_value @Gold856) and re-assign indexes. This reassignment will result in the new pipelines index being the largest, meaning we can choose the highest index to get that pipeline.

closes #960

Meta

Merge checklist:

  • [x] Pull Request title is short, imperative summary of proposed changes
  • [x] The description documents the what and why
  • [ ] If this PR changes behavior or adds a feature, user documentation is updated
  • [ ] If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly
  • [ ] If this PR touches configuration, this is backwards compatible with settings back to v2025.3.2
  • [ ] If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated
  • [ ] If this PR addresses a bug, a regression test for it is added

samfreund avatar Oct 15 '25 13:10 samfreund