Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions components/dashboard/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { LinkedInCallback } from "react-linkedin-login-oauth2";
import { useQueryParams } from "./hooks/use-query-params";
import { useTheme } from "./theme-context";
import QuickStart from "./components/QuickStart";
import { isGitpodIo, getURLHash } from "./utils";

export const StartWorkspaceModalKeyBinding = `${/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘" : "Ctrl﹢"}O`;

Expand Down Expand Up @@ -64,6 +65,15 @@ const App: FC = () => {
return <AppLoading />;
}

// Redirect non-signed-in Gitpod Classic PAYG users from gitpod.io/# to app.ona.com/#
const hash = getURLHash();
if (!user && isGitpodIo() && location.pathname === "/" && hash !== "") {
// Preserve the hash fragment when redirecting
const hashFragment = window.location.hash;
window.location.href = `https://app.ona.com/${hashFragment}`;
return <AppLoading />; // Show loading while redirecting
}

// Technically this should get handled in the QueryErrorBoundary, but having it here doesn't hurt
// At this point if there's no user, they should Login
if (!user) {
Expand Down
1 change: 1 addition & 0 deletions memory-bank/activeContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Building a comprehensive knowledge base of the Gitpod codebase and architecture
- Enhanced API component documentation with code generation information
- Implemented server readiness probe with database, SpiceDB, and Redis connectivity checks
- **Improved `registry-facade` resilience by implementing a comprehensive retry mechanism for blob retrieval, addressing transient network errors.**
- **Implemented redirect for non-signed-in Gitpod Classic PAYG users from `gitpod.io/#` (with hash fragments) to `app.ona.com/#`, preserving hash fragments. Only applies to users with hash fragments, not all gitpod.io visitors.**

## Next Steps

Expand Down
7 changes: 7 additions & 0 deletions memory-bank/components/dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ The Dashboard provides interfaces for:
- IDE preferences
- Feature preview settings

4. **Redirection Logic**:
- Redirects non-signed-in Gitpod Classic PAYG users from `gitpod.io/#` to `app.ona.com/#`
- Only triggers when a hash fragment is present (`hash !== ""`)
- Preserves hash fragments during the redirect
- Only applies to the root path (`/`) on gitpod.io domains
- Does NOT redirect users visiting `gitpod.io/` without hash fragments

## Development Workflow

The Dashboard supports several development workflows:
Expand Down
Loading