feat: Allow Users to Save Tour Pipelines#2339
Draft
camielvs wants to merge 1 commit into
Draft
Conversation
🎩 PreviewA preview build has been created at: |
This was referenced May 28, 2026
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
4 tasks
e1a0ce6 to
98d9144
Compare
288fe40 to
1733fc8
Compare
2805208 to
931f929
Compare
931f929 to
d56854f
Compare
1733fc8 to
444aa16
Compare
d56854f to
eed0e9a
Compare
444aa16 to
38b4021
Compare
eed0e9a to
a906d43
Compare
38b4021 to
b2e2959
Compare
a906d43 to
9d3d7e9
Compare
b2e2959 to
63df8cc
Compare
9d3d7e9 to
ea34dec
Compare
63df8cc to
e33f721
Compare
e33f721 to
b4e258c
Compare
ea34dec to
7f7afb8
Compare
b4e258c to
9978c0a
Compare
7f7afb8 to
d12e944
Compare
9978c0a to
5d19fd6
Compare
d12e944 to
3eb354f
Compare
3eb354f to
e8f940e
Compare
5d19fd6 to
297bd4c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Adds a Save this pipeline affordance at the end of every tour. Curious users who want to keep poking at the pipeline they just walked through (or use it as a starting point) can convert the ephemeral tour pipeline into a real, durable one.
Surfaces only on the last tour step, as a small link-style button below the primary Done action, under a "Continue exploring:" label. Clicking it:
/editor/$nameroute with the new file open.If the user just clicks Done, behavior is unchanged: tour ends, temp pipeline stays in session storage until the next tour starts (which resets it).
Architecture
TourCompletionActionsextension (src/providers/TourProvider/tourPopover.tsx)saveExploreHandleris registered. Both render in the last step's content area.saveExploreHandlerslot +registerSaveExploreHandler(cb)API bridges the React tree gap between the reactour popover (rendered aboveTourModeProviderin the tree, no access to it) and the dialog host (rendered belowSharedStoreProvider, has the spec access we need). The popover only knows "is something registered? if so, call it". The dialog host is what registers itself.TourSaveExploreDialog(src/providers/TourProvider/TourSaveExploreDialog.tsx, mounted insideEditorV2Content)setOpen(true)handler withregisterSaveExploreHandleron mount whentourModeis active; clears it on unmount.useSharedStores().navigation, renames it in-memory viausePipelineActions().renamePipeline, serializes to YAML, and callstourMode.promoteToPipeline(name, yaml).promoteToPipeline(src/providers/TourProvider/TourModeContext.tsx+Tour.tsx)TourModeContextvalue. The implementation lives inTourPage(above the storage override) whereusePipelineStorage()resolves to the durable IndexedDB service./editor/$name. Errors surface viauseToastNotification.Why the indirection through a module-level handler
The natural place to render the dialog is inside
EditorV2, whereSharedStoreProviderexposes the live spec. The natural place to render the trigger button is the popover, which reactour mounts above ourTourModeProvider. React Context can't bridge that gap (the popover renders outside the provider's subtree). The module-level slot is the smallest possible bridge: one writer, one reader, scoped by lifecycle of the dialog host.Related Issue and Pull requests
Progresses https://github.com/Shopify/oasis-frontend/issues/583
Type of Change
Checklist
Screenshots
Test Instructions
Pre-req: a registered tour (use this branch with #2306 on top).
Happy path
/editor/<name>with the pipeline open and editable. The file appears in the regular pipelines list.__tour__<slug>) remains in session storage; it'll be reset on the next tour start.Cancel / dismiss
Name collision
Regression
/learn/tours, nothing is added to the pipelines list.Additional Comments
The "Continue exploring:" framing is intentional — users who walk through a guided tour and walk away should not feel obligated to save anything. Save is opt-in for the curious.