Skip to content

Update dashboard navigation and landing page interactivity#81

Open
DealPatrol wants to merge 11 commits into
mainfrom
v0/colecollins763-2959-43e51b0d
Open

Update dashboard navigation and landing page interactivity#81
DealPatrol wants to merge 11 commits into
mainfrom
v0/colecollins763-2959-43e51b0d

Conversation

@DealPatrol

Copy link
Copy Markdown
Owner

User Interface

  • Added an interactive HeroChat component and updated the landing page design.
  • Replaced the dashboard top header with a new sidebar layout to improve navigation.

Security & Authentication

  • Implemented authentication checks and redirects for the analysis route to ensure data privacy.

Infrastructure

  • Streamlined Stripe environment variable management and improved payment-related error handling.

v0 Session

v0agent and others added 5 commits June 4, 2026 00:39
Updated Next.js type import for development environment.

Co-authored-by: Cole Collins <118781133+DealPatrol@users.noreply.github.com>
Updated import path for route types to align with current Next.js structure

Co-authored-by: Cole Collins <118781133+DealPatrol@users.noreply.github.com>
Replaced DashboardHeader with DashboardSidebar for updated layout; added sidebar component

Co-authored-by: Cole Collins <118781133+DealPatrol@users.noreply.github.com>
Co-authored-by: Cole Collins <118781133+DealPatrol@users.noreply.github.com>
… handling

Co-authored-by: Cole Collins <118781133+DealPatrol@users.noreply.github.com>
@DealPatrol DealPatrol added the v0 label Jun 5, 2026 — with Vercel
@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
repo-app-architect Error Error Jun 14, 2026 5:07am
repofuse Error Error Jun 14, 2026 5:07am
v0-repo-app-architect Error Error Jun 14, 2026 5:07am

@supabase

supabase Bot commented Jun 5, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project bpjftwoiosftvjvxpovz because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

Co-authored-by: Cole Collins <118781133+DealPatrol@users.noreply.github.com>
…ironment type import

Co-authored-by: Cole Collins <118781133+DealPatrol@users.noreply.github.com>
Updated Stripe webhook secret retrieval to use new getStripeWebhookSecret function

Co-authored-by: Cole Collins <118781133+DealPatrol@users.noreply.github.com>
Co-authored-by: Cole Collins <118781133+DealPatrol@users.noreply.github.com>
…hook route

Renamed function for clarity and consistency in stripe secret handling

Co-authored-by: Cole Collins <118781133+DealPatrol@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the dashboard UI structure and Stripe/auth integration points to support a new sidebar navigation layout, streamlined Stripe env lookups, and stronger access control for running analyses.

Changes:

  • Replaced the dashboard header layout with a fixed left sidebar navigation component.
  • Refactored Stripe helpers/usage to rely on consolidated env lookups and a single “pro” price accessor.
  • Added early authentication handling to the analysis “run” API route.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
next-env.d.ts Updates the generated route-types reference import.
lib/stripe.ts Simplifies Stripe env-variable access and pricing helpers.
components/dashboard-sidebar.tsx Adds the new client-side dashboard sidebar navigation UI.
app/dashboard/layout.tsx Switches dashboard layout from header-based to sidebar-based shell.
app/api/stripe/webhook/route.ts Refactors Stripe webhook imports and configuration/signature checks.
app/api/checkout/route.ts Uses the unified getPriceId() helper for checkout line items.
app/api/analyses/[id]/run/route.ts Adds authentication gating behavior before starting SSE analysis runs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/stripe.ts
Comment on lines 5 to 9
type StripeMode = 'live' | 'test'

function normalizeMode(value?: string): StripeMode {
if (value?.toLowerCase() === 'test') return 'test'
return 'live'
}

function detectModeFromKey(key: string): StripeMode {
if (key.startsWith('sk_test_') || key.startsWith('rk_test_')) return 'test'
return 'live'
Comment thread lib/stripe.ts
Comment on lines 27 to 31
console.log('[v0] getStripe() called')
console.log('[v0] Checking env vars:')
console.log('[v0] STRIPE_LIVE_SECRET_KEY:', process.env.STRIPE_LIVE_SECRET_KEY ? '***SET***' : 'NOT SET')
console.log('[v0] STRIPE_SECRET_KEY:', process.env.STRIPE_SECRET_KEY ? '***SET***' : 'NOT SET')
console.log('[v0] Available env keys containing STRIPE:', Object.keys(process.env).filter(k => k.includes('STRIPE')))
Comment on lines 126 to 130
const signature = request.headers.get('stripe-signature')

const webhookSecret = getWebhookSecret()
if (!signature || !webhookSecret) {
return NextResponse.json({ error: 'Webhook not configured' }, { status: 400 })
Comment thread app/dashboard/layout.tsx
Comment on lines +19 to +23
<DashboardSidebar user={user ? {
name: user.name || 'Developer',
email: user.email,
plan: 'pro'
} : undefined} />
Comment on lines +204 to +207
<button className="w-full flex items-center gap-2 px-3 py-2 rounded-lg text-xs font-medium text-[#8B949E] hover:text-[#F0F6FC] hover:bg-[#161B22] transition-colors">
<LogOut className="h-3.5 w-3.5" />
Sign Out
</button>
export function DashboardSidebar({ user }: SidebarProps) {
const pathname = usePathname()

const isActive = (href: string) => pathname === href
Comment on lines +142 to +146
const accessToken = await getCurrentAccessToken().catch(() => null)
if (!accessToken) {
const redirectUrl = new URL('/api/auth/github/login', req.url)
redirectUrl.searchParams.set('returnTo', `/dashboard/analyses/${id}`)
return NextResponse.redirect(redirectUrl)
Comment thread app/api/stripe/webhook/route.ts Outdated
import { NextRequest, NextResponse } from 'next/server'
import { getStripe, getWebhookSecret } from '@/lib/stripe'
import { upsertSubscription, getSubscriptionByStripeCustomerId, getUserByGithubId } from '@/lib/queries'
import { getWebhookSecret, getStripe, getPriceIdForPlan } from '@/lib/stripe'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants