-
Notifications
You must be signed in to change notification settings - Fork 0
chore: prepare release v0.2.0 #27
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
Changes from all commits
43dcbc6
722da0c
ac7eda8
75c0e10
b08264e
221fb5a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,16 @@ | ||
| "use client" | ||
|
|
||
| import * as React from "react" | ||
| import { ConvexProvider, ConvexReactClient } from "convex/react" | ||
| import { ThemeProvider as NextThemesProvider, useTheme } from "next-themes" | ||
|
|
||
| const convex = new ConvexReactClient(process.env.NEXT_PUBLIC_CONVEX_URL || "") | ||
|
|
||
| function ThemeProvider({ | ||
| children, | ||
| ...props | ||
| }: React.ComponentProps<typeof NextThemesProvider>) { | ||
| return ( | ||
| <NextThemesProvider | ||
| attribute="class" | ||
| defaultTheme="system" | ||
| enableSystem | ||
| disableTransitionOnChange | ||
| {...props} | ||
| > | ||
| <ThemeHotkey /> | ||
| {children} | ||
| </NextThemesProvider> | ||
| ) | ||
| return <ConvexProvider client={convex}>{children}</ConvexProvider> | ||
|
Comment on lines
9
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
git diff -- apps/web/components/theme-provider.tsx -- apps/web/components/theme-provider.tsx || true
printf '\n--- file ---\n'
cat -n apps/web/components/theme-provider.tsx | sed -n '1,220p'
printf '\n--- theme hotkey refs ---\n'
rg -n "ThemeHotkey|useTheme|NextThemesProvider|ConvexProvider" apps/web/components/theme-provider.tsx apps/web -g '!**/node_modules/**'Repository: RISHII7/echo Length of output: 3236 Compose 🧰 Tools🪛 GitHub Check: Lint[warning] 11-11: 🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
| function isTypingTarget(target: EventTarget | null) { | ||
|
|
@@ -34,7 +26,7 @@ | |
| ) | ||
| } | ||
|
|
||
| function ThemeHotkey() { | ||
| const { resolvedTheme, setTheme } = useTheme() | ||
|
|
||
| React.useEffect(() => { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,19 @@ | ||
| import { add } from "@workspace/math/add" | ||
| "use client" | ||
|
|
||
| import { useMutation, useQuery } from "convex/react" | ||
| import { api } from "@workspace/backend/_generated/api" | ||
| import { Button } from "@workspace/ui/components/button" | ||
| import { Input } from "@workspace/ui/components/input" | ||
|
|
||
| export default function Page() { | ||
| const users = useQuery(api.users.getMany) | ||
| const addUser = useMutation(api.users.add) | ||
|
|
||
| return ( | ||
| <div className="flex min-h-svh items-center justify-center"> | ||
| <div className="flex flex-col items-center justify-center gap-4"> | ||
| <h1 className="text-2xl font-bold">Hello apps/widget</h1> | ||
| <Button className="sm">Button</Button> | ||
| <p>{add(10, 12)}</p> | ||
| <Input /> | ||
| <div className="flex min-h-svh flex-col items-center justify-center"> | ||
| <p> apps/widget</p> | ||
| <Button onClick={() => addUser()}>Add</Button> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '\n== page.tsx ==\n'
sed -n '1,120p' apps/widget/app/page.tsx
printf '\n== users mutation ==\n'
sed -n '1,220p' packages/backend/convex/users.ts
printf '\n== useMutation usages ==\n'
rg -n "useMutation\\(|addUser\\(" apps/widget packages/backend -S
printf '\n== convex/react docs in repo (if any) ==\n'
rg -n "useMutation" . -g '!node_modules' -g '!dist' -g '!build' -SRepository: RISHII7/echo Length of output: 2119 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Locate the relevant files precisely and inspect surrounding context.
git ls-files 'apps/widget/app/page.tsx' 'packages/backend/convex/users.ts' || true
printf '\n== page.tsx with line numbers ==\n'
cat -n apps/widget/app/page.tsx | sed -n '1,120p'
printf '\n== users.ts with line numbers ==\n'
cat -n packages/backend/convex/users.ts | sed -n '1,220p'
printf '\n== search for any local error handling around addUser ==\n'
rg -n "addUser\\(|console\\.error|catch \\(" apps/widget -SRepository: RISHII7/echo Length of output: 1674 Handle the mutation promise here. 🤖 Prompt for AI Agents |
||
| <div className="mx-auto w-full max-w-sm"> | ||
| {JSON.stringify(users, null, 2)} | ||
| </div> | ||
| </div> | ||
| ) | ||
|
|
||
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.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Add loading and error states for the Convex query.
useQueryreturnsundefinedwhile loading andnullon error. Currently,JSON.stringify(undefined, null, 2)renders as empty whitespace with no user feedback. Add explicit loading and error handling before rendering results.export default function Page() { const users = useQuery(api.users.getMany) const addUser = useMutation(api.users.add) + + if (users === undefined) { + return <div className="flex min-h-svh items-center justify-center">Loading...</div> + } + + if (users === null) { + return <div className="flex min-h-svh items-center justify-center text-red-500">Error loading users</div> + } + return ( <div className="flex min-h-svh flex-col items-center justify-center"> <p> apps/web</p> <Button onClick={() => addUser()}>Add</Button> <div className="mx-auto w-full max-w-sm"> - {JSON.stringify(users, null, 2)} + <pre className="rounded bg-muted p-4 overflow-auto"> + {JSON.stringify(users, null, 2)} + </pre> </div> </div> ) }🤖 Prompt for AI Agents