-
Notifications
You must be signed in to change notification settings - Fork 0
UI overhaul #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
UI overhaul #20
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
aea4b67
feat: full UI overhaul with amber palette and dark/light mode
MinitJain a76c663
feat: add constellation logo as favicon and auth page branding
MinitJain eb3a516
feat: replace favicon with new logo.svg
MinitJain 9484d0e
fix: favicon with solid dark background so amber is visible at small …
MinitJain 747402d
feat: landing page, /app route, SEO
MinitJain 5eef0d8
fix: replace fake social proof with honest product stats
MinitJain 9726164
feat: ui overhaul — landing page, smart routing, theme system, UX polish
MinitJain 00a0030
fix: resolve CI lint error in ThemeToggle + add Google/GitHub OAuth
MinitJain 39a4b29
fix: reset OAuth loading state on page back-navigation (bfcache)
MinitJain 251c285
fix: prevent open-redirect via next param in auth callback
MinitJain 3cf8d11
refactor: deduplicate Supabase client in callback route + use next/image
MinitJain 66a6dea
fix: ThemeToggle hydration mismatch + auth page home link
MinitJain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import BookmarkCardSkeleton from "@/components/BookmarkCardSkeleton"; | ||
|
|
||
| export default function Loading() { | ||
| return ( | ||
| <div className="min-h-screen bg-[var(--bg)]"> | ||
| {/* Header placeholder */} | ||
| <div className="h-12 border-b border-[var(--border)] bg-[var(--bg)]/80" /> | ||
| <main className="max-w-2xl mx-auto pt-6 pb-16 px-4"> | ||
| <div className="flex flex-col gap-3"> | ||
| <BookmarkCardSkeleton /> | ||
| <BookmarkCardSkeleton /> | ||
| <BookmarkCardSkeleton /> | ||
| </div> | ||
| </main> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| import { Suspense } from "react"; | ||
| import { prisma } from "@/lib/prisma"; | ||
| import BookmarkCard from "@/components/BookmarkCard"; | ||
| import BookmarkCardSkeleton from "@/components/BookmarkCardSkeleton"; | ||
| import SaveUrlForm from "@/components/SaveUrlForm"; | ||
| import Header from "@/components/Header"; | ||
| import SearchBar from "@/components/SearchBar"; | ||
| import { createClient } from "@/lib/supabase/server"; | ||
| import { redirect } from "next/navigation"; | ||
| import { Bookmark } from "lucide-react"; | ||
|
|
||
| export const metadata = { title: "Your Bookmarks | Recall" }; | ||
|
|
||
| async function BookmarkList({ userId }: { userId: string }) { | ||
| const bookmarks = await prisma.bookmark.findMany({ | ||
| where: { userId }, | ||
| orderBy: { createdAt: "desc" }, | ||
| include: { tags: true }, | ||
| }); | ||
|
|
||
| if (bookmarks.length === 0) { | ||
| return ( | ||
| <div className="flex flex-col items-center justify-center gap-4 rounded-2xl border border-[var(--border)] bg-[var(--surface)] text-center" style={{ padding: "48px 32px" }}> | ||
| <Bookmark size={40} className="text-[var(--accent)]" /> | ||
| <div> | ||
| <h2 className="text-xl font-semibold text-[var(--text)] mb-1">Nothing saved yet</h2> | ||
| <p className="text-sm text-[var(--text-muted)]">Paste any URL above to save your first bookmark</p> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| return ( | ||
| <div className="flex flex-col gap-3"> | ||
| {bookmarks.map((bookmark, i) => ( | ||
| <div key={bookmark.id} className="animate-fade-up" style={{ animationDelay: `${i * 40}ms` }}> | ||
| <BookmarkCard | ||
| bookmark={{ | ||
| ...bookmark, | ||
| createdAt: bookmark.createdAt.toISOString(), | ||
| }} | ||
| /> | ||
| </div> | ||
| ))} | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| function BookmarkListSkeleton() { | ||
| return ( | ||
| <div className="flex flex-col gap-3"> | ||
| <BookmarkCardSkeleton /> | ||
| <BookmarkCardSkeleton /> | ||
| <BookmarkCardSkeleton /> | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| export default async function AppPage() { | ||
| const supabase = await createClient(); | ||
| const { | ||
| data: { user }, | ||
| } = await supabase.auth.getUser(); | ||
| if (!user) redirect("/auth"); | ||
|
|
||
| return ( | ||
| <div className="min-h-screen bg-[var(--bg)]"> | ||
| <Header email={user.email ?? ""} /> | ||
| <main className="max-w-2xl mx-auto pt-6 pb-16 px-4"> | ||
| <SaveUrlForm /> | ||
| <SearchBar /> | ||
| <Suspense fallback={<BookmarkListSkeleton />}> | ||
| <BookmarkList userId={user.id} /> | ||
| </Suspense> | ||
| </main> | ||
| </div> | ||
| ); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import { createClient } from "@/lib/supabase/server"; | ||
| import { NextResponse } from "next/server"; | ||
|
|
||
| export async function GET(request: Request) { | ||
| const { searchParams, origin } = new URL(request.url); | ||
| const code = searchParams.get("code"); | ||
| const rawNext = searchParams.get("next") ?? "/app"; | ||
| // Reject anything that isn't a relative path to prevent open redirects | ||
| const next = | ||
| rawNext.startsWith("/") && !rawNext.startsWith("//") && !rawNext.includes("://") | ||
| ? rawNext | ||
| : "/app"; | ||
|
|
||
| if (code) { | ||
| const supabase = await createClient(); | ||
| const { error } = await supabase.auth.exchangeCodeForSession(code); | ||
| if (!error) { | ||
| return NextResponse.redirect(`${origin}${next}`); | ||
| } | ||
| } | ||
|
|
||
| return NextResponse.redirect(`${origin}/auth?error=oauth`); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cap the initial bookmark query.
This loads every bookmark plus every tag for the user, and the route is refreshed again after mutations from
SaveUrlFormandBookmarkCard. Once an account grows,/appbecomes an unbounded DB query and HTML payload on every save/delete. Add pagination, cursoring, or at least a first-page limit here.🤖 Prompt for AI Agents