Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/dashboard/src/OnaRightPanel.tsx
2498 views
1
/**
2
* Copyright (c) 2025 Gitpod GmbH. All rights reserved.
3
* Licensed under the GNU Affero General Public License (AGPL).
4
* See License.AGPL.txt in the project root for license information.
5
*/
6
7
import React, { useState, useEffect } from "react";
8
import { trackEvent } from "./Analytics";
9
import { useCurrentUser } from "./user-context";
10
import { getPrimaryEmail } from "@gitpod/public-api-common/lib/user-utils";
11
import { useToast } from "./components/toasts/Toasts";
12
import onaWordmark from "./images/ona-wordmark.svg";
13
import onaApplication from "./images/ona-application.webp";
14
15
export const OnaRightPanel = () => {
16
const [email, setEmail] = useState("");
17
const [isSubmitted, setIsSubmitted] = useState(false);
18
const user = useCurrentUser();
19
const { toast } = useToast();
20
21
useEffect(() => {
22
const storedOnaData = localStorage.getItem("ona-waitlist-data");
23
if (storedOnaData) {
24
const { submitted } = JSON.parse(storedOnaData);
25
setIsSubmitted(submitted || false);
26
}
27
}, []);
28
29
const handleEmailSubmit = (e: React.FormEvent) => {
30
e.preventDefault();
31
if (!email.trim()) return;
32
33
const userEmail = user ? getPrimaryEmail(user) || email : email;
34
trackEvent("waitlist_joined", { email: userEmail, feature: "Ona" });
35
36
setIsSubmitted(true);
37
localStorage.setItem("ona-waitlist-data", JSON.stringify({ submitted: true }));
38
39
toast(
40
<div>
41
<div className="font-medium">You're on the waitlist</div>
42
<div className="text-sm opacity-80">We'll reach out to you soon.</div>
43
</div>,
44
);
45
};
46
47
return (
48
<div className="w-full lg:w-1/3 flex flex-col justify-center p-4 lg:p-6 md:min-h-screen">
49
<div
50
className="rounded-lg flex flex-col gap-6 text-white p-6 h-full max-w-md mx-auto w-full"
51
style={{
52
background:
53
"linear-gradient(340deg, #1F1329 0%, #333A75 20%, #556CA8 40%, #90A898 60%, #E2B15C 80%, #BEA462 100%)",
54
}}
55
>
56
<div className="flex justify-center pt-4">
57
<img src={onaWordmark} alt="ONA" className="w-32" draggable="false" />
58
</div>
59
60
<div className="relative bg-white/10 backdrop-blur-sm rounded-lg p-4 -mt-2">
61
<img
62
src={onaApplication}
63
alt="Ona application preview"
64
className="w-full h-auto rounded-lg shadow-lg"
65
draggable="false"
66
/>
67
</div>
68
69
<div className="flex flex-col gap-4 flex-1">
70
<h2 className="text-white text-xl font-bold leading-tight text-center">
71
Ona - parallel SWE agents in the cloud, sandboxed for high-autonomy.{" "}
72
<a
73
href="https://app.ona.com"
74
target="_blank"
75
rel="noreferrer"
76
className="underline hover:no-underline"
77
>
78
Start for free
79
</a>{" "}
80
and get $100 credits. Gitpod Classic sunsets Oct 15 |{" "}
81
<a
82
href="https://ona.com/stories/gitpod-classic-payg-sunset"
83
target="_blank"
84
rel="noreferrer"
85
className="underline hover:no-underline"
86
>
87
Learn more
88
</a>
89
</h2>
90
91
<div className="space-y-3 text-sm text-white/90 leading-relaxed">
92
<p>
93
Delegate software tasks to Ona. It writes code, runs tests, and opens a pull request. Or
94
jump in to inspect output or pair program in your IDE.
95
</p>
96
<p>
97
Ona runs inside your infrastructure (VPC), with full audit trails, zero data exposure, and
98
support for any LLM.
99
</p>
100
</div>
101
102
<div className="mt-auto pt-4">
103
{!isSubmitted ? (
104
<form onSubmit={handleEmailSubmit} className="space-y-3">
105
<input
106
type="email"
107
value={email}
108
onChange={(e) => setEmail(e.target.value)}
109
placeholder="Enter your work email"
110
className="w-full px-4 py-2.5 rounded-lg bg-white/10 backdrop-blur-sm border border-white/20 text-white placeholder-white/60 focus:outline-none focus:ring-2 focus:ring-white/30 text-sm"
111
required
112
/>
113
<button
114
type="submit"
115
className="w-full bg-white text-gray-900 font-medium py-2.5 px-4 rounded-lg hover:bg-gray-100 transition-colors text-sm inline-flex items-center justify-center gap-2"
116
>
117
Request access
118
<span className="font-bold"></span>
119
</button>
120
</form>
121
) : (
122
<button
123
onClick={() =>
124
window.open("https://www.gitpod.io/solutions/ai", "_blank", "noopener,noreferrer")
125
}
126
className="w-full bg-white/20 backdrop-blur-sm text-white font-medium py-2.5 px-4 rounded-lg hover:bg-white/30 transition-colors border border-white/20 inline-flex items-center justify-center gap-2 text-sm"
127
>
128
Learn more
129
<span className="font-bold"></span>
130
</button>
131
)}
132
</div>
133
</div>
134
</div>
135
</div>
136
);
137
};
138
139