fix: lowercase the workspace key segment in workspace URLs - #7263
Merged
Merged
Conversation
Every workspace-scoped path now goes through factoryDetailPath, which lowercases the factoryKey when writing it into the path. The stored factory.key (and everywhere it's displayed, e.g. Settings) stays uppercase — only the URL segment is lowercase. factoryRouteNeedsCanonicalRedirect now treats the lowercase key as canonical: an uppercase or mixed-case route segment redirects to lowercase, and a correct lowercase segment does not redirect (no redirect loop). replaceFactoryKeySegment always emits the lowercase canonical key. pathAfterWorkspaceSwitch normalizes the (uppercase) current factory key before comparing it against the (lowercase) pathname prefix, so the settings/velocity/etc. "keep this page" check still matches after the workspace switch. Signed-off-by: SuperPlane Agent <superplaneagent@superplane.com> Co-authored-by: Miyat Miletic <mijat.miletic98@gmail.com>
factoryRouteNeedsCanonicalRedirect: a lowercase route segment matching factory.key case-insensitively is now canonical (no redirect); an uppercase or mixed-case segment redirects. replaceFactoryKeySegment always emits a lowercase key. Every workspace-scoped path builder now asserts a lowercase URL segment while keeping the factoryKey argument uppercase, matching the stored factory.key shape. Signed-off-by: SuperPlane Agent <superplaneagent@superplane.com> Co-authored-by: Miyat Miletic <mijat.miletic98@gmail.com>
These specs build workspace paths through factoryDetailPath (or a builder that composes from it) and assert on the resulting URL, so they now expect the lowercase canonical segment: legacy work-order redirects, mission detail links, new-workspace setup redirect, onboarding-gate redirects, onboarding resume path, the root organization redirect, and the factory-app default-tab gate. Signed-off-by: SuperPlane Agent <superplaneagent@superplane.com> Co-authored-by: Miyat Miletic <mijat.miletic98@gmail.com>
Contributor
Author
|
Maintainers: comment |
Contributor
Author
|
👋 Commands for maintainers:
|
These frontend unit specs still asserted the uppercase factory.key in the generated workspace URLs (task/line/app/settings links, redirects, and onboarding navigation). Workspace-scoped paths now go through factoryDetailPath, which lowercases the URL segment while the stored factory.key stays uppercase, so the specs now expect the lowercase canonical URL form. Signed-off-by: SuperPlane Agent <superplaneagent@superplane.com>
mytmlt
enabled auto-merge (squash)
September 9, 2026 11:51
Signed-off-by: SuperPlane Agent <superplaneagent@superplane.com>
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.
SUPER-155
This change makes the workspace key lowercase in every workspace URL, for example
/superplane/workspaces/super/lines/9f2a291c-...instead of/superplane/workspaces/SUPER/lines/9f2a291c-.... The stored workspace key, the settings page, task identifiers (for exampleSP-42), and the key validation rules stay uppercase and unchanged. This is a frontend-only change with no backend, database, or API impact.UI
factoryDetailPathis the one function that every workspace-scoped path builder uses to add the workspace key to a URL. It now lowercases the key before it writes the key into the path. Because every other path builder (lines, tasks, apps, automations, missions, wiki, velocity, settings, and so on) calls this function, the whole app now produces lowercase workspace URLs without needing changes in each individual builder.The redirect logic that sends old links to the current workspace URL now treats the lowercase key as the canonical form. A URL with an uppercase or mixed-case workspace key (for example
/workspaces/SUPER/...) redirects to the lowercase URL. A URL that already uses the lowercase key does not redirect, so the app does not get stuck in a redirect loop. Old links that use the workspace database ID instead of the key still resolve and redirect to the lowercase key URL, as before.The workspace switcher builds the target URL for the new workspace from the current URL. Because the current URL now has a lowercase workspace key but the switcher read the key from the workspace record (which stays uppercase), a case mismatch could stop the switcher from recognizing pages like Settings or Velocity that it should keep open in the new workspace. The switcher logic now normalizes the case before it compares the two, so this keeps working correctly.
The workspace key shown on the Settings page, the key input field on that page, and task identifiers (for example
SP-42) are not changed by this update. They keep using the uppercase key exactly as stored.Tests
Unit tests for the URL builders and the redirect logic are updated to expect lowercase workspace URLs. A few other tests that build or assert workspace URLs elsewhere in the app (onboarding, legacy task redirects, mission links, the app default-tab gate, and the root organization redirect) are updated the same way.
Created via SuperPlane.
The PR appears safe to merge.