Skip to content

Commit 68bc5e7

Browse files
committed
feat(web): unify landing and routed page premium UI
1 parent 307d29c commit 68bc5e7

6 files changed

Lines changed: 1683 additions & 484 deletions

File tree

apps/web/src/components/AgentTimeline.tsx

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,15 @@ import type { AgentState } from "../hooks/useJobStream";
44

55
export function AgentTimeline({ agents }: { agents: AgentState[] }) {
66
return (
7-
<div style={{ position: "relative" }}>
7+
<div className="sf-agent-timeline">
88
{/* Vertical connector line */}
9-
<div
10-
style={{
11-
position: "absolute",
12-
left: "39px",
13-
top: "24px",
14-
bottom: "24px",
15-
width: "2px",
16-
background: "linear-gradient(to bottom, #6366f1, #8b5cf6, #23232f)",
17-
borderRadius: "1px",
18-
zIndex: 0,
19-
}}
20-
/>
9+
<div className="sf-agent-timeline-line" />
2110

22-
<div style={{ display: "flex", flexDirection: "column", gap: "12px", position: "relative", zIndex: 1 }}>
23-
{agents.map((agent, i) => (
11+
<div className="sf-agent-timeline-list">
12+
{agents.map((agent) => (
2413
<div
2514
key={agent.name}
2615
className="animate-fade-in"
27-
style={{ animationDelay: `${i * 60}ms`, animationFillMode: "both" }}
2816
>
2917
<AgentCard agent={agent} />
3018
</div>

apps/web/src/components/Layout.tsx

Lines changed: 9 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -5,78 +5,26 @@ export function Layout({ children }: { children: React.ReactNode }) {
55
const location = useLocation();
66

77
return (
8-
<div style={{ minHeight: "100vh", display: "flex", flexDirection: "column" }}>
9-
{/* ─── Navbar ─────────────────────────────────────────────────────── */}
10-
<nav
11-
style={{
12-
position: "sticky",
13-
top: 0,
14-
zIndex: 100,
15-
display: "flex",
16-
alignItems: "center",
17-
justifyContent: "space-between",
18-
padding: "0 32px",
19-
height: "64px",
20-
background: "rgba(10, 10, 15, 0.8)",
21-
backdropFilter: "blur(16px) saturate(180%)",
22-
borderBottom: "1px solid #23232f",
23-
}}
24-
>
8+
<div className="sf-shell">
9+
<nav className="sf-nav">
2510
<Link
2611
to="/"
27-
style={{
28-
display: "flex",
29-
alignItems: "center",
30-
gap: "10px",
31-
textDecoration: "none",
32-
color: "#f0f0f5",
33-
}}
12+
className="sf-logo"
3413
>
35-
{/* Logo icon */}
36-
<div
37-
style={{
38-
width: "32px",
39-
height: "32px",
40-
borderRadius: "8px",
41-
background: "linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)",
42-
display: "flex",
43-
alignItems: "center",
44-
justifyContent: "center",
45-
fontSize: "16px",
46-
fontWeight: 800,
47-
color: "#fff",
48-
boxShadow: "0 2px 8px rgba(99, 102, 241, 0.3)",
49-
}}
50-
>
51-
S
52-
</div>
53-
<span style={{ fontSize: "18px", fontWeight: 700, letterSpacing: "-0.02em" }}>
54-
Stack<span style={{ color: "#8b5cf6" }}>Forge</span>
55-
</span>
14+
<div className="sf-logo-icon">S</div>
15+
<span>StackForge</span>
5616
</Link>
5717

58-
<div style={{ display: "flex", alignItems: "center", gap: "24px" }}>
18+
<div className="sf-nav-links">
5919
<NavLink to="/" active={location.pathname === "/"}>
6020
Home
6121
</NavLink>
6222
</div>
6323
</nav>
6424

65-
{/* ─── Main ──────────────────────────────────────────────────────── */}
66-
<main style={{ flex: 1 }}>{children}</main>
25+
<main className="sf-main">{children}</main>
6726

68-
{/* ─── Footer ────────────────────────────────────────────────────── */}
69-
<footer
70-
style={{
71-
display: "flex",
72-
alignItems: "center",
73-
justifyContent: "center",
74-
padding: "24px 32px",
75-
borderTop: "1px solid #23232f",
76-
fontSize: "13px",
77-
color: "#5c5c6f",
78-
}}
79-
>
27+
<footer className="sf-footer">
8028
Built with AI agents&nbsp;·&nbsp;StackForge © {new Date().getFullYear()}
8129
</footer>
8230
</div>
@@ -95,16 +43,7 @@ function NavLink({
9543
return (
9644
<Link
9745
to={to}
98-
style={{
99-
fontSize: "14px",
100-
fontWeight: active ? 600 : 400,
101-
color: active ? "#f0f0f5" : "#9898a8",
102-
textDecoration: "none",
103-
transition: "color 250ms",
104-
position: "relative",
105-
paddingBottom: "2px",
106-
borderBottom: active ? "2px solid #6366f1" : "2px solid transparent",
107-
}}
46+
className={`sf-nav-link ${active ? "is-active" : ""}`}
10847
>
10948
{children}
11049
</Link>

apps/web/src/components/TelemetryPanel.tsx

Lines changed: 21 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,7 @@ function AnimatedNumber({
7272
}, [watchValue]);
7373

7474
return (
75-
<span
76-
style={{
77-
display: "inline-block",
78-
transform: pulse ? "scale(1.1)" : "scale(1)",
79-
transition: "transform 200ms ease",
80-
}}
81-
>
75+
<span className={`sf-telemetry-animated-number ${pulse ? "is-pulse" : ""}`}>
8276
{display}
8377
</span>
8478
);
@@ -155,24 +149,13 @@ export function TelemetryPanel({ jobId, isDemo = false }: { jobId?: string; isDe
155149

156150
return (
157151
<aside
158-
style={{
159-
position: "fixed",
160-
right: "20px",
161-
bottom: "20px",
162-
width: "min(360px, calc(100vw - 32px))",
163-
zIndex: 40,
164-
background: "#12121b",
165-
border: "1px solid #23232f",
166-
borderRadius: "14px",
167-
boxShadow: "0 14px 38px rgba(0, 0, 0, 0.45)",
168-
padding: "16px",
169-
}}
152+
className="sf-telemetry-panel"
170153
>
171-
<div style={{ fontSize: "15px", fontWeight: 700, marginBottom: "12px", color: "#f0f0f5" }}>
154+
<div className="sf-telemetry-title">
172155
📊 This Run
173156
</div>
174157

175-
<div style={{ borderTop: "1px solid #23232f", borderBottom: "1px solid #23232f", padding: "12px 0" }}>
158+
<div className="sf-telemetry-stats-wrap">
176159
<StatRow
177160
label="Total tokens"
178161
value={<AnimatedNumber display={formatInt(telemetry.totalTokensUsed)} watchValue={telemetry.totalTokensUsed} />}
@@ -196,34 +179,34 @@ export function TelemetryPanel({ jobId, isDemo = false }: { jobId?: string; isDe
196179
/>
197180
</div>
198181

199-
<div style={{ marginTop: "12px" }}>
200-
<div style={{ fontSize: "13px", color: "#9898a8", marginBottom: "10px" }}>Provider breakdown:</div>
182+
<div className="sf-telemetry-group">
183+
<div className="sf-telemetry-group-title">Provider breakdown:</div>
201184
{providerRows.length === 0 && (
202-
<div style={{ fontSize: "12px", color: "#6f6f84" }}>No provider calls yet</div>
185+
<div className="sf-telemetry-empty">No provider calls yet</div>
203186
)}
204187
{providerRows.map((row, index) => (
205188
<ProviderRow
206189
key={`provider-${row.name}`}
207190
name={toDisplayName(row.name)}
208191
calls={row.calls}
209192
ratio={providerTotalCalls > 0 ? (row.calls / providerTotalCalls) * 100 : 0}
210-
color={index % 2 === 0 ? "#3b82f6" : "#a855f7"}
193+
variant={index % 2 === 0 ? "provider-a" : "provider-b"}
211194
/>
212195
))}
213196
</div>
214197

215-
<div style={{ marginTop: "10px" }}>
216-
<div style={{ fontSize: "13px", color: "#9898a8", marginBottom: "10px" }}>Model breakdown:</div>
198+
<div className="sf-telemetry-group sf-telemetry-group-tight">
199+
<div className="sf-telemetry-group-title">Model breakdown:</div>
217200
{modelRows.length === 0 && (
218-
<div style={{ fontSize: "12px", color: "#6f6f84" }}>No model calls yet</div>
201+
<div className="sf-telemetry-empty">No model calls yet</div>
219202
)}
220203
{modelRows.map((row, index) => (
221204
<ProviderRow
222205
key={`model-${row.name}`}
223206
name={row.name}
224207
calls={row.calls}
225208
ratio={modelTotalCalls > 0 ? (row.calls / modelTotalCalls) * 100 : 0}
226-
color={index % 2 === 0 ? "#22c55e" : "#14b8a6"}
209+
variant={index % 2 === 0 ? "model-a" : "model-b"}
227210
/>
228211
))}
229212
</div>
@@ -233,18 +216,9 @@ export function TelemetryPanel({ jobId, isDemo = false }: { jobId?: string; isDe
233216

234217
function StatRow({ label, value }: { label: string; value: React.ReactNode }) {
235218
return (
236-
<div
237-
style={{
238-
display: "flex",
239-
alignItems: "center",
240-
justifyContent: "space-between",
241-
fontSize: "13px",
242-
color: "#f0f0f5",
243-
marginBottom: "7px",
244-
}}
245-
>
246-
<span style={{ color: "#9898a8" }}>{label}</span>
247-
<strong style={{ fontWeight: 700 }}>{value}</strong>
219+
<div className="sf-telemetry-stat-row">
220+
<span className="sf-telemetry-stat-label">{label}</span>
221+
<strong className="sf-telemetry-stat-value">{value}</strong>
248222
</div>
249223
);
250224
}
@@ -253,31 +227,23 @@ function ProviderRow({
253227
name,
254228
calls,
255229
ratio,
256-
color,
230+
variant,
257231
}: {
258232
name: string;
259233
calls: number;
260234
ratio: number;
261-
color: string;
235+
variant: "provider-a" | "provider-b" | "model-a" | "model-b";
262236
}) {
263237
return (
264-
<div style={{ display: "grid", gridTemplateColumns: "minmax(84px, 1fr) 2fr auto", alignItems: "center", gap: "8px", marginBottom: "8px" }}>
238+
<div className="sf-telemetry-provider-row">
265239
<span
266240
title={name}
267-
style={{
268-
fontSize: "12px",
269-
color: "#f0f0f5",
270-
whiteSpace: "nowrap",
271-
overflow: "hidden",
272-
textOverflow: "ellipsis",
273-
}}
241+
className="sf-telemetry-provider-name"
274242
>
275243
{name}
276244
</span>
277-
<div style={{ background: "#1d1d2a", borderRadius: "999px", height: "10px", overflow: "hidden" }}>
278-
<div style={{ width: `${ratio}%`, height: "100%", transition: "width 300ms ease", background: color }} />
279-
</div>
280-
<span style={{ fontSize: "12px", color: "#9898a8", minWidth: "56px", textAlign: "right" }}>{calls} calls</span>
245+
<progress className={`sf-telemetry-provider-progress is-${variant}`} max={100} value={ratio} />
246+
<span className="sf-telemetry-provider-calls">{calls} calls</span>
281247
</div>
282248
);
283249
}

0 commit comments

Comments
 (0)