mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-18 16:02:10 +00:00
fix: let the import wizard survive sign-in and a missing workspace
Signing in with `rd=/projects/import?hub=...` dropped the destination: the login redirect only honours `rd` verbatim for `/user/workspaces`, so anyone with more than one workspace landed on the workspace picker instead — the page the wizard exists to replace, asking the question it was about to ask. Both copies of that logic now allow the wizard through. The root layout's "no workspace selected" redirect skips the wizard too. It picks the destination itself and may end in a workspace that does not exist yet, so bouncing it to the picker forces the very choice it is there to make. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -196,7 +196,13 @@
|
||||
} else {
|
||||
goto(resolvedRd ?? '/')
|
||||
}
|
||||
} else if (resolvedRd?.startsWith('/user/workspaces')) {
|
||||
// The import wizard picks the destination workspace itself, so sending it to
|
||||
// the workspace picker first asks the same question twice — and the wizard
|
||||
// may end in a workspace that does not exist yet.
|
||||
} else if (
|
||||
resolvedRd?.startsWith('/user/workspaces') ||
|
||||
resolvedRd?.startsWith('/projects/import')
|
||||
) {
|
||||
goto(resolvedRd)
|
||||
} else if (resolvedRd == '/#user-settings') {
|
||||
goto(`/user/workspaces#user-settings`)
|
||||
|
||||
@@ -106,7 +106,10 @@
|
||||
} else {
|
||||
goto(rd ?? '/')
|
||||
}
|
||||
} else if (rd?.startsWith('/user/workspaces')) {
|
||||
// The import wizard picks the destination workspace itself, so sending it to
|
||||
// the workspace picker first asks the same question twice — and the wizard
|
||||
// may end in a workspace that does not exist yet.
|
||||
} else if (rd?.startsWith('/user/workspaces') || rd?.startsWith('/projects/import')) {
|
||||
goto(rd)
|
||||
} else if (rd == '/#user-settings') {
|
||||
goto(`/user/workspaces#user-settings`)
|
||||
|
||||
@@ -146,7 +146,11 @@
|
||||
} else {
|
||||
if (
|
||||
(!page.url.pathname.startsWith('/user/') || page.url.pathname.startsWith('/user/cli')) &&
|
||||
!page.url.pathname.startsWith('/oauth/mcp_authorize')
|
||||
!page.url.pathname.startsWith('/oauth/mcp_authorize') &&
|
||||
// The hub import wizard asks for the destination itself, and may end in a
|
||||
// workspace that does not exist yet — bouncing it to the picker would
|
||||
// force the very choice it exists to make.
|
||||
!page.url.pathname.startsWith('/projects/import')
|
||||
) {
|
||||
goto(
|
||||
`/user/workspaces?rd=${encodeURIComponent(page.url.href.replace(page.url.origin, ''))}`
|
||||
|
||||
Reference in New Issue
Block a user