🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

fix(site): support browser back and forward in template builder wizard - #27104

Merged
jeremyruppel merged 1 commit into
mainfrom
jeremyruppel/devex-594-wizard-browser-navigation
Jul 14, 2026
Merged

fix(site): support browser back and forward in template builder wizard#27104
jeremyruppel merged 1 commit into
mainfrom
jeremyruppel/devex-594-wizard-browser-navigation

Conversation

@jeremyruppel

@jeremyruppel jeremyruppel commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Browser back/forward controls did not work in the template builder wizard. Using browser navigation sent the user out of the wizard entirely instead of moving between steps.

The wizard's current step is now driven by a ?step= search param. Step transitions push history entries so browser back/forward walks the steps. Steps that are invalid, skipped, or unreachable given the wizard state are clamped and the URL is rewritten with a replace, keeping URL and state in sync in both directions.

?base= is accepted as the only entry search param and deep-links to a preselected base template (superseding #26808). The page container resolves it against the available bases, holds the wizard behind a loader until it is consumed and removed from the URL, then mounts the wizard starting on the first step after base selection.

Closes https://linear.app/codercom/issue/DEVEX-594

Generated with Coder by @jeremyruppel

@linear-code

linear-code Bot commented Jul 8, 2026

Copy link
Copy Markdown

DEVEX-594

Comment thread site/src/pages/TemplateBuilder/TemplateBuilderPageView.tsx
@jeremyruppel
jeremyruppel marked this pull request as ready for review July 8, 2026 18:27

@aqandrew aqandrew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Works well! Feels very snappy + glad state is preserved when going forward/back with Cmd + arrow keys

Comment thread site/src/pages/TemplateBuilder/TemplateBuilderPageView.tsx
Comment thread site/src/pages/TemplateBuilder/TemplateBuilderPageView.tsx
@jeremyruppel
jeremyruppel marked this pull request as draft July 8, 2026 20:07
…wizard

Drive the wizard's current step from a ?step= search param so browser
back/forward moves between steps instead of leaving the wizard. Step
transitions push history entries; invalid, skipped, or unreachable
steps are clamped to what the wizard state allows and the URL is
rewritten with a replace.

The ?base= param is the only search param accepted on entry. It is
consumed by the page container: resolved against the available bases,
held in local state, and removed from the URL before the wizard view
mounts. When a base is preselected this way, the wizard starts on the
first step after base selection.

Also moves toSelectedBaseMeta into wizardState.ts so both the page
container and BaseInfraSelectStep can use it, and adds initWizardState
and furthestAllowedIndex helpers.
@jeremyruppel
jeremyruppel force-pushed the jeremyruppel/devex-594-wizard-browser-navigation branch from 32f5ce9 to df136ff Compare July 13, 2026 12:59
@jeremyruppel
jeremyruppel requested a review from aqandrew July 13, 2026 14:06
@jeremyruppel
jeremyruppel marked this pull request as ready for review July 13, 2026 14:06
@jeremyruppel
jeremyruppel merged commit f218157 into main Jul 14, 2026
31 of 32 checks passed
@jeremyruppel
jeremyruppel deleted the jeremyruppel/devex-594-wizard-browser-navigation branch July 14, 2026 12:55
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants