Skip to content

Commit 36bf466

Browse files
committed
fix: homepage blank screen by only blocking auth during OAuth callback
1 parent c3a99e2 commit 36bf466

4 files changed

Lines changed: 21 additions & 13 deletions

File tree

changelog.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
2525

2626
### Fixed
2727

28-
- Temporarily disabled homepage Platform Stats rendering to isolate crash
28+
- Fixed homepage blank screen in production caused by auth loading blocking page render
29+
- Changed loading guard to only block during OAuth callback (when URL contains ?code=)
30+
- Anonymous visitors now see homepage content immediately without waiting for Convex auth
31+
- Platform Stats leaderboard re-enabled after confirming auth was the root cause
2932
- Fixed duplicate "cursor" and "Cursor" entries in source filter dropdown
3033
- Normalized source values: "cursor" is now converted to "cursor-sync" on sync
3134
- Updated sessions.upsert and batchUpsert to normalize source on insert/update

files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ React frontend application.
5858

5959
| File | Description |
6060
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
61-
| `Login.tsx` | Public homepage with WorkOS AuthKit integration. Shows "Go to Dashboard" button when logged in (no auto-redirect), "Sign in" when logged out. Includes privacy messaging, "Syncs with" section showing supported CLI tools (OpenCode, Claude Code, Droid, Codex CLI, Cursor, Pi), getting started section with plugin links including codex-sync and pi-opensync-plugin (mobile-visible), tan mode theme support with footer (theme switcher, Terms/Privacy/Updates links), footer icons (GitHub, Discord, Support, Discussions), updated mockup with view tabs and OC/CC source badges (desktop-only), feature list with Sync/Search/Private/Tag/Export/Delete keywords and eval datasets tagline, Watch the demo link, trust message with cloud/local deployment info, real-time Platform Stats leaderboard (Top Models, Top CLI) above Open Source footer link, Platform Stats rendering temporarily disabled for crash isolation |
61+
| `Login.tsx` | Public homepage with WorkOS AuthKit integration. Shows "Go to Dashboard" button when logged in (no auto-redirect), "Sign in" when logged out. Loading spinner only during OAuth callback (not for cold page loads), includes privacy messaging, "Syncs with" section showing supported CLI tools (OpenCode, Claude Code, Droid, Codex CLI, Cursor, Pi), getting started section with plugin links including codex-sync and pi-opensync-plugin (mobile-visible), tan mode theme support with footer (theme switcher, Terms/Privacy/Updates links), footer icons (GitHub, Discord, Support, Discussions), updated mockup with view tabs and OC/CC source badges (desktop-only), feature list with Sync/Search/Private/Tag/Export/Delete keywords and eval datasets tagline, Watch the demo link, trust message with cloud/local deployment info, real-time Platform Stats leaderboard (Top Models, Top CLI) above Open Source footer link |
6262
| `Stats.tsx` | Public stats page (/stats) COMMENTED OUT to reduce Convex reads. Route still exists but shows placeholder "Stats page is currently disabled" message. Original code preserved in block comment for future use. Previously included MessageMilestoneCounter, GrowthChart, error boundary. |
6363
| `Dashboard.tsx` | Main dashboard with custom themed source filter dropdown (filters by user's enabled agents from Settings, dark/tan mode support, click-outside close, escape key close), source badges (CC/OC/FD), eval toggle button, Context link with search icon, Updates link with Bell icon, setup banner for new users with plugin cards (OpenCode, Claude Code, Factory Droid, Pi), mobile-optimized header/filters/session rows, URL param support for deep linking from Context search (?session=id), Cmd/Ctrl+K shortcut to open Context search, MessageBubble with content normalization helpers (getPartTextContent, getToolName) for multi-plugin format support, flash-free session transitions using lastValidSessionRef cache (shows cached content until new data loads, subtle corner spinner), sessions pagination (40 initial, load more 20 at a time), eval selection mode (checkbox toggle, select all, batch mark for evals), CompactDropdown component for themed filter dropdowns, and five views: Overview (responsive stat grids), Sessions (mobile-friendly list with stacked layout, pagination, eval selection), Evals (CRM-style compact list with hidden scrollbars, flex layout, 50 items + load more, truncated names, wider model column, CompactDropdown filters), Analytics (responsive breakdowns with CompactDropdown filters), Wrapped (Daily Sync Wrapped visualization) |
6464
| `Settings.tsx` | Tabbed settings: API Access (two-column layout with Plugin Setup and AI Coding Agents sections, keys, endpoints with plugin links including codex-sync), Profile (collapsible section for privacy, account info, Legal section with Terms/Privacy links, Danger Zone with delete data/account options). AI Coding Agents section lets users enable/disable CLI tools for the source filter dropdown (OpenCode, Claude Code, Factory Droid, Codex CLI with supported status, Cursor, Continue, Amp, Aider, Goose, Mentat, Cline, Kilo Code). Back link navigates to /dashboard |

src/pages/Login.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,7 @@ function PlatformLeaderboard({ isDark }: { isDark: boolean }) {
176176
const topModels = platformStats?.topModels ?? [];
177177
const topSources = platformStats?.topSources ?? [];
178178

179-
// TEMP: Disable Platform Stats rendering to isolate crash.
180-
if (false) {
181-
return (
179+
return (
182180
<div
183181
className={`mt-10 rounded-lg border p-5 ${
184182
isDark
@@ -346,9 +344,6 @@ function PlatformLeaderboard({ isDark }: { isDark: boolean }) {
346344
</div>
347345
</div>
348346
);
349-
}
350-
351-
return null;
352347
}
353348

354349
// TEMP: Stats components moved to /stats page
@@ -361,8 +356,13 @@ export function LoginPage() {
361356
const { theme } = useTheme();
362357
const isDark = theme === "dark";
363358

364-
// Show loading state while processing callback or checking auth
365-
if (isLoading || workosLoading) {
359+
// Only show loading spinner during active OAuth callback (URL has ?code=)
360+
// Do NOT block the public homepage waiting for Convex auth to complete
361+
const isOAuthCallback =
362+
typeof window !== "undefined" && window.location.search.includes("code=");
363+
364+
// Only block render during OAuth callback flow
365+
if (isOAuthCallback && (isLoading || workosLoading)) {
366366
return (
367367
<div
368368
className={`min-h-screen flex items-center justify-center ${isDark ? "bg-[#0E0E0E]" : "bg-[#faf8f5]"}`}

task.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@ OpenSync supports two AI coding tools: **OpenCode** and **Claude Code**.
88

99
- [ ] (add next task here)
1010

11-
## Recently Completed (Homepage Crash Debug)
12-
13-
- [x] Temporarily disabled homepage Platform Stats rendering to isolate crash
11+
## Recently Completed (Homepage Blank Screen Fix)
12+
13+
- [x] Fixed homepage blank screen in production
14+
- Root cause: `isLoading` from `useAuth()` stayed `true` indefinitely for anonymous visitors
15+
- `convexLoading` from `useConvexAuth()` was hanging in production
16+
- Fix: Changed loading guard to only block during OAuth callback (URL contains ?code=)
17+
- Anonymous visitors now see homepage immediately without waiting for Convex auth
18+
- Platform Stats leaderboard re-enabled after confirming auth was root cause
1419

1520
## Recently Completed (Pi Plugin Integration)
1621

0 commit comments

Comments
 (0)