Skip to content

Conversation

@camielvs
Copy link
Collaborator

@camielvs camielvs commented Oct 15, 2025

Description

Fixes a couple of issues relating to copy + paste nodes & node duplication. These issues were pre-existing to this PR stack (but made easier to solve using the new Node Manager).

Fixes:

  • IO Nodes don't copy metadata (name, value, type etc)
  • Can't copy + paste across multiple instances of the app
  • Output nodes fail to connect when pasted

KNOWN ISSUE: copy + paste output nodes between Oasis instances does not copy over the connection to that node. This is because in the new instance we do not have access to the original graphSpec.outputValues data (from the old instance) which tells us what it is connected to. This is a complex issue which will be addressed separately. For now users will need to manually remake that connection. For more info see https://github.com/Shopify/oasis-frontend/issues/314

Related Issue and Pull requests

Closes https://github.com/Shopify/oasis-frontend/issues/250
Closes https://github.com/Shopify/oasis-frontend/issues/302

Type of Change

  • Bug fix

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

Test Instructions

  • Verify that copy + paste single nodes and groups of nodes works as expected. Including combinations of IO nodes and tasks
  • Verify that it now also works when copying across different pipelines/tabs

Note: output nodes copied across tabs will not be connected due to technical limitations in our architecture

Additional Comments

NOT FOR THIS PR - but duplicateNodes method desperately needs a refactor.

@camielvs camielvs changed the title Fix IO Node Copy + Paste Fix Node Copy + Paste Oct 15, 2025
@camielvs camielvs mentioned this pull request Oct 15, 2025
3 tasks
Copy link
Collaborator Author

camielvs commented Oct 15, 2025

@camielvs camielvs mentioned this pull request Oct 15, 2025
3 tasks
@camielvs camielvs force-pushed the 10-14-fix_io_node_copy_paste branch 2 times, most recently from aff054f to 5134306 Compare October 15, 2025 18:12
@camielvs camielvs marked this pull request as ready for review October 15, 2025 18:38
@camielvs camielvs assigned maxy-shpfy and Mbeaulne and unassigned Mbeaulne and maxy-shpfy Oct 15, 2025
@camielvs camielvs force-pushed the 10-14-fix_io_node_copy_paste branch from 5134306 to d874723 Compare October 16, 2025 18:17
@camielvs camielvs force-pushed the 10-10-refactor_handleconnection branch from 3d8a4ff to 802180e Compare October 17, 2025 17:36
@camielvs camielvs force-pushed the 10-14-fix_io_node_copy_paste branch 2 times, most recently from fe2444d to f31471f Compare October 17, 2025 18:22
@camielvs camielvs force-pushed the 10-10-refactor_handleconnection branch 2 times, most recently from ab05c72 to 79c1b16 Compare October 17, 2025 18:26
@camielvs camielvs force-pushed the 10-14-fix_io_node_copy_paste branch 3 times, most recently from f961a3a to d903794 Compare October 17, 2025 18:49
@camielvs camielvs force-pushed the 10-10-refactor_handleconnection branch from 43187fe to 58e539d Compare October 17, 2025 18:49
@camielvs camielvs force-pushed the 10-14-fix_io_node_copy_paste branch from d903794 to 1d1d22b Compare October 17, 2025 21:28
existingNames: Set<string>,
): string => {
let finalName = name;
const baseName = name.replace(/ \(\d+\)$/, "");
Copy link
Collaborator Author

@camielvs camielvs Oct 17, 2025

Choose a reason for hiding this comment

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

This will remove instances where we end up with task, task 2, task 2 2, task 2 2 2 and so on. Currently this happens for input & output nodes duplicated via the toolbar.

Now the sequence will always be task, task (2), task (3) and so on. The brackets were added to minimize the chance of matching the regex to a non-duplicate task id with numbers in it.

@camielvs camielvs force-pushed the 10-14-fix_io_node_copy_paste branch 2 times, most recently from c6a42f8 to c3fb0e6 Compare October 17, 2025 21:41
@camielvs camielvs force-pushed the 10-10-refactor_handleconnection branch 2 times, most recently from 443bb5b to cc62eb1 Compare October 17, 2025 21:42
@camielvs camielvs force-pushed the 10-14-fix_io_node_copy_paste branch from c3fb0e6 to 402b148 Compare October 17, 2025 21:42
@camielvs camielvs force-pushed the 10-10-refactor_handleconnection branch from cc62eb1 to c596d45 Compare October 22, 2025 20:18
@camielvs camielvs force-pushed the 10-14-fix_io_node_copy_paste branch 2 times, most recently from cf466ba to 62ddca4 Compare October 22, 2025 22:19
@camielvs camielvs force-pushed the 10-10-refactor_handleconnection branch from c596d45 to 32dac7f Compare October 22, 2025 22:19
@camielvs camielvs force-pushed the 10-14-fix_io_node_copy_paste branch from 62ddca4 to b72a03b Compare October 23, 2025 16:35
@camielvs camielvs force-pushed the 10-10-refactor_handleconnection branch from 32dac7f to 616fff2 Compare October 23, 2025 16:35
@camielvs camielvs force-pushed the 10-14-fix_io_node_copy_paste branch from b72a03b to 61f09a9 Compare October 23, 2025 20:05
@camielvs camielvs force-pushed the 10-10-refactor_handleconnection branch from 616fff2 to 2a075fd Compare October 23, 2025 20:05
@camielvs camielvs force-pushed the 10-14-fix_io_node_copy_paste branch from 61f09a9 to 410d058 Compare October 23, 2025 20:11
@camielvs camielvs force-pushed the 10-10-refactor_handleconnection branch 2 times, most recently from 4bb4dca to 8b691b0 Compare October 23, 2025 23:23
@camielvs camielvs force-pushed the 10-14-fix_io_node_copy_paste branch from 410d058 to 18d7353 Compare October 23, 2025 23:23
@camielvs camielvs force-pushed the 10-10-refactor_handleconnection branch from 8b691b0 to 6cfe339 Compare October 24, 2025 00:15
@camielvs camielvs force-pushed the 10-14-fix_io_node_copy_paste branch 2 times, most recently from 2c65cbf to 70314be Compare October 28, 2025 21:04
@camielvs camielvs force-pushed the 10-10-refactor_handleconnection branch from 6cfe339 to 174009d Compare October 28, 2025 21:04
@maxy-shpfy maxy-shpfy marked this pull request as draft October 30, 2025 16:56
@camielvs camielvs force-pushed the 10-10-refactor_handleconnection branch from 174009d to ed65518 Compare October 30, 2025 19:10
@camielvs camielvs force-pushed the 10-14-fix_io_node_copy_paste branch from 70314be to 80ac27b Compare October 30, 2025 19:10
@camielvs camielvs force-pushed the 10-10-refactor_handleconnection branch from ed65518 to c82efe1 Compare October 30, 2025 19:44
@camielvs camielvs force-pushed the 10-14-fix_io_node_copy_paste branch from 80ac27b to 28dbb2b Compare October 30, 2025 19:44
@camielvs camielvs force-pushed the 10-14-fix_io_node_copy_paste branch from 28dbb2b to ff591fa Compare October 31, 2025 00:23
@camielvs camielvs force-pushed the 10-10-refactor_handleconnection branch from c82efe1 to b2503ef Compare October 31, 2025 00:23
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

Successfully merging this pull request may close these issues.

4 participants