Skip to content

Auto-stamp lineage on paste + offer to track original#2398

Draft
morgan-wowk wants to merge 1 commit into
mwowk/component-lineage-upgrade-panelfrom
mwowk/component-lineage-paste-prompt
Draft

Auto-stamp lineage on paste + offer to track original#2398
morgan-wowk wants to merge 1 commit into
mwowk/component-lineage-upgrade-panelfrom
mwowk/component-lineage-paste-prompt

Conversation

@morgan-wowk

Copy link
Copy Markdown

Description

Related Issue and Pull requests

Type of Change

  • Bug fix
  • New feature
  • Improvement
  • Cleanup/Refactor
  • Breaking change
  • Documentation update

Checklist

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

Screenshots (if applicable)

Test Instructions

Additional Comments

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: mwowk/component-lineage-paste-prompt/09da649

morgan-wowk commented Jun 5, 2026

Copy link
Copy Markdown
Author

When a task with no lineage annotation is pasted or duplicated:

- The clone gets a fresh origin stamped automatically: url ?? digest ?? UUID.
  From this point forward every subsequent copy of the pasted task carries
  a stable lineage, enabling future reconcile detection.

- PasteLineagePrompt surfaces a non-blocking toast above the canvas with a
  checkbox (unchecked by default) and a single Done button. If the user
  checks 'Track changes to the original' before dismissing, the source task
  is back-linked to the same origin in a single undo step — so edits to
  either task will offer to update the other.

- Prompt auto-dismisses after 6 s if untouched. Only shown for same-pipeline
  operations: cross-pipeline source tasks are absent from the current spec so
  no prompt fires. Cross-pipeline paste still gets the auto-stamp on the clone.

- ClipboardStore.latestPasteContext carries the source→new idMap so the
  prompt can match pasted tasks back to their origins without any side-channel.
  cloneSnapshotsWithBindings now returns { newIds, idMap } (CloneResult).
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.

1 participant