-
Notifications
You must be signed in to change notification settings - Fork 0
chore(repo): sync develop into main after v0.3.0 release #34
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
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,9 +1,7 @@ | ||
| import { AuthLayout } from "@/modules/auth/ui/layouts/auth-layout" | ||
|
|
||
| const Layout = ({ children }: { children: React.ReactNode }) => { | ||
| return ( | ||
| <div className="flex h-full min-h-screen min-w-screen flex-col items-center justify-center"> | ||
| {children} | ||
| </div> | ||
| ) | ||
| return <AuthLayout>{children}</AuthLayout> | ||
| } | ||
|
|
||
| export default Layout |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import { OrgSelectionView } from "@/modules/auth/ui/views/org-selection-view" | ||
|
|
||
| const Page = () => { | ||
| return <OrgSelectionView /> | ||
| } | ||
| export default Page |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| import { SignIn } from "@clerk/nextjs" | ||
| import { SignInView } from "@/modules/auth/ui/views/sign-in-view" | ||
|
|
||
| const Page = () => { | ||
| return <SignIn /> | ||
| return <SignInView /> | ||
| } | ||
|
|
||
| export default Page |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| import { SignUp } from "@clerk/nextjs" | ||
| import { SignUpView } from "@/modules/auth/ui/views/sign-up-view" | ||
|
|
||
| const Page = () => { | ||
| return <SignUp /> | ||
| return <SignUpView /> | ||
| } | ||
|
|
||
| export default Page |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import { AuthGuard } from "@/modules/auth/ui/components/auth-guard" | ||
| import { OrganizationGuard } from "@/modules/auth/ui/components/organization-guard" | ||
|
|
||
| const Layout = ({ children }: { children: React.ReactNode }) => { | ||
| return ( | ||
| <AuthGuard> | ||
| <OrganizationGuard>{children}</OrganizationGuard> | ||
| </AuthGuard> | ||
| ) | ||
| } | ||
|
|
||
| export default Layout |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,24 @@ | ||||||||||
| "use client" | ||||||||||
|
|
||||||||||
| import { useMutation, useQuery } from "convex/react" | ||||||||||
| import { OrganizationSwitcher, UserButton } from "@clerk/nextjs" | ||||||||||
|
|
||||||||||
| import { api } from "@workspace/backend/_generated/api" | ||||||||||
|
|
||||||||||
| import { Button } from "@workspace/ui/components/button" | ||||||||||
|
|
||||||||||
| export default function Page() { | ||||||||||
| const users = useQuery(api.users.getMany) | ||||||||||
| const addUser = useMutation(api.users.add) | ||||||||||
| return ( | ||||||||||
| <div className="flex min-h-svh flex-col items-center justify-center"> | ||||||||||
| <p> apps/web</p> | ||||||||||
| <UserButton /> | ||||||||||
| <OrganizationSwitcher hidePersonal /> | ||||||||||
| <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. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Gate the add mutation behind an in-flight state. Line 18 fires ♻️ Proposed fix+import { useState } from "react"
import { useMutation, useQuery } from "convex/react"
import { OrganizationSwitcher, UserButton } from "`@clerk/nextjs`"
@@
export default function Page() {
const users = useQuery(api.users.getMany)
const addUser = useMutation(api.users.add)
+ const [isAdding, setIsAdding] = useState(false)
+
+ const handleAddUser = async () => {
+ if (isAdding) return
+ setIsAdding(true)
+ try {
+ await addUser()
+ } finally {
+ setIsAdding(false)
+ }
+ }
+
return (
@@
- <Button onClick={() => addUser()}>Add</Button>
+ <Button disabled={isAdding} onClick={handleAddUser}>
+ Add
+ </Button>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| <div className="mx-auto w-full max-w-sm"> | ||||||||||
| {JSON.stringify(users, null, 2)} | ||||||||||
| </div> | ||||||||||
| </div> | ||||||||||
| ) | ||||||||||
| } | ||||||||||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| "use client" | ||
|
|
||
| import { Authenticated, AuthLoading, Unauthenticated } from "convex/react" | ||
|
|
||
| import { SignInView } from "@/modules/auth/ui/views/sign-in-view" | ||
|
|
||
| import { AuthLayout } from "@/modules/auth/ui/layouts/auth-layout" | ||
|
|
||
| export const AuthGuard = ({ children }: { children: React.ReactNode }) => { | ||
| return ( | ||
| <> | ||
| <AuthLoading> | ||
| <AuthLayout> | ||
| <p>Loading</p> | ||
| </AuthLayout> | ||
| </AuthLoading> | ||
| <Authenticated>{children}</Authenticated> | ||
| <Unauthenticated> | ||
| <AuthLayout> | ||
| <SignInView /> | ||
| </AuthLayout> | ||
| </Unauthenticated> | ||
| </> | ||
| ) | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| "use client" | ||
|
|
||
| import { useOrganization } from "@clerk/nextjs" | ||
|
|
||
| import { AuthLayout } from "@/modules/auth/ui/layouts/auth-layout" | ||
| import { OrgSelectionView } from "@/modules/auth/ui/views/org-selection-view" | ||
|
|
||
| export const OrganizationGuard = ({ | ||
| children, | ||
| }: { | ||
| children: React.ReactNode | ||
| }) => { | ||
| const { organization } = useOrganization() | ||
|
|
||
| if (!organization) { | ||
| return ( | ||
| <AuthLayout> | ||
| <OrgSelectionView /> | ||
| </AuthLayout> | ||
| ) | ||
| } | ||
| return <div>{children}</div> | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| export const AuthLayout = ({ children }: { children: React.ReactNode }) => { | ||
| return ( | ||
| <div className="flex h-full min-h-screen min-w-screen flex-col items-center justify-center"> | ||
| {children} | ||
| </div> | ||
| ) | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import { OrganizationList } from "@clerk/nextjs" | ||
|
|
||
| export const OrgSelectionView = () => { | ||
| return ( | ||
| <OrganizationList | ||
| afterCreateOrganizationUrl="/" | ||
| afterSelectOrganizationUrl="/" | ||
| hidePersonal | ||
| skipInvitationScreen | ||
| /> | ||
| ) | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import { SignIn } from "@clerk/nextjs" | ||
|
|
||
| export const SignInView = () => { | ||
| return <SignIn routing="hash" /> | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import { SignUp } from "@clerk/nextjs" | ||
|
|
||
| export const SignUpView = () => { | ||
| return <SignUp routing="hash" /> | ||
| } |
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.
🗄️ Data Integrity & Integration | 🟠 Major
Version mismatch between PR objectives and changelog.
The PR objectives describe this as a post-release synchronization for v0.3.0, but the changelog introduces a v0.4.0 release section. Please confirm the intended version — this discrepancy could cause confusion in release automation and tagging.
🤖 Prompt for AI Agents