GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Member dashboard UX fixes and interactive club join requests by 22f2000147 · Pull Request #30 · aloktripathi1/Sangam Conversation
|
|
@DevloperHS is attempting to deploy a commit to the aloktripathi1's projects team on Vercel, but is not a member of this team. To resolve this issue, you can:
To read more about collaboration on Vercel, click here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughThe pull request adds club join-request toggling, profile editing and notification controls, client-side issue filtering with modal creation, profile-backed shell naming, dashboard layout adjustments, and prompt logging configuration. ChangesClub join requests
Profile workflows
Issues workflow
Member shell and dashboard
Repository prompt rules
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Member
participant JoinRequestButton
participant toggleJoinRequestAction
participant Prisma
Member->>JoinRequestButton: click request or withdraw
JoinRequestButton->>toggleJoinRequestAction: submit clubId
toggleJoinRequestAction->>Prisma: query or mutate membership
toggleJoinRequestAction-->>JoinRequestButton: complete action
JoinRequestButton-->>Member: update requested state
sequenceDiagram
participant Member
participant EditDetailsModal
participant updateProfileAction
participant Prisma
EditDetailsModal->>updateProfileAction: submit name and interests
updateProfileAction->>Prisma: validate and update user
updateProfileAction-->>EditDetailsModal: return form state
EditDetailsModal-->>Member: close or display error
sequenceDiagram
participant Member
participant IssuesClient
participant IssueFilter
participant IssueForm
participant Modal
Member->>IssueFilter: select issue status
IssueFilter-->>IssuesClient: return selected status
IssuesClient-->>Member: render filtered issue rows
Member->>IssueForm: open new issue form
IssueForm->>Modal: render form dialog
Modal-->>Member: display issue form and cancel action
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@22f2000147 is attempting to deploy a commit to the aloktripathi1's projects team on Vercel, but is not a member of this team. To resolve this issue, you can:
To read more about collaboration on Vercel, click here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
app/(member)/app/clubs/actions.ts (1)
11-35: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winCheck-then-act race without a transaction.
The read of
existingand the subsequentcreate/deletearen't wrapped in a transaction, so concurrent invocations (double-click, multiple tabs) could race and hit theuserId_clubIdunique constraint or double-delete. Considerprisma.$transactionor catching theP2002unique-constraint error defensively.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/`(member)/app/clubs/actions.ts around lines 11 - 35, Wrap the existing membership lookup and conditional create/delete logic in a Prisma transaction, using the transaction client consistently for all membership, user, and club queries within the operation. Preserve the Pending deletion and missing-membership creation behavior, and defensively handle a concurrent-create P2002 unique-constraint error if needed.
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/`(member)/app/clubs/JoinRequestButton.tsx:
- Around line 17-22: Update toggle in JoinRequestButton to wrap
toggleJoinRequestAction(clubId) in try/catch, only update requested after
success, and add or use an error state to display a user-facing failure message
when the action throws.
- Around line 17-22: Update the JoinRequestButton toggle flow to track the
entire toggleJoinRequestAction request with explicit local pending state, rather
than relying on startTransition’s isPending for the async work. Set the pending
state before the request, clear it in a finally block, and use it in the
button’s disabled state so the button remains disabled until the mutation
completes.
In `@app/`(member)/app/clubs/page.tsx:
- Line 7: Wire JoinRequestButton into ClubDiscoveryCard: derive a
requestedClubIds set from the current user’s pending memberships, pass each
club’s requested status into the card, and replace the static button with
JoinRequestButton using clubId={c.id} and
initialRequested={requestedClubIds.has(c.id)}. Ensure the membership lookup and
prop flow cover all discovery cards.
---
Nitpick comments:
In `@app/`(member)/app/clubs/actions.ts:
- Around line 11-35: Wrap the existing membership lookup and conditional
create/delete logic in a Prisma transaction, using the transaction client
consistently for all membership, user, and club queries within the operation.
Preserve the Pending deletion and missing-membership creation behavior, and
defensively handle a concurrent-create P2002 unique-constraint error if needed.
Fix all unresolved CodeRabbit comments on this PR:
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 888b614b-29a4-4b2c-86cb-bc8d5ab77803
.gitignoreapp/(member)/app/clubs/JoinRequestButton.tsxapp/(member)/app/clubs/actions.tsapp/(member)/app/clubs/page.tsxapp/(member)/app/page.tsxapp/(member)/app/profile/NotificationPreferences.tsxapp/(member)/app/profile/page.tsxcomponents/shell/AppShell.tsx
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| function toggle() { | ||
| startTransition(async () => { | ||
| await toggleJoinRequestAction(clubId); | ||
| setRequested((value) => !value); | ||
| }); | ||
| } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
No error handling around the server action call.
If toggleJoinRequestAction throws (e.g. "Not authenticated", "Club not found", or the Prisma error noted in actions.ts), the rejection is unhandled and setRequested never runs — the button is left stuck with stale state and no user-facing feedback. Wrap the call in try/catch and surface an error state.
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@app/`(member)/app/clubs/JoinRequestButton.tsx around lines 17 - 22, Update
toggle in JoinRequestButton to wrap toggleJoinRequestAction(clubId) in
try/catch, only update requested after success, and add or use an error state to
display a user-facing failure message when the action throws.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🏁 Script executed:
#!/bin/bash set -euo pipefail printf '\n== package.json files ==\n' git ls-files '**/package.json' | sed -n '1,80p' printf '\n== JoinRequestButton.tsx ==\n' sed -n '1,220p' 'app/(member)/app/clubs/JoinRequestButton.tsx' printf '\n== React version references ==\n' rg -n '"react"|"react-dom"|useTransition|startTransition' -g 'package.json' -g '*.tsx' -g '*.ts' -g '*.js' -g '*.jsx' .
Repository: aloktripathi1/MAY2026-Team-004
Length of output: 2020
🌐 Web query:
React 18 startTransition async callback pending resolves at first await useTransition async actions React 19 documentation
💡 Result:
In React 19, support for asynchronous functions within transitions—referred to as "Actions"—has been significantly enhanced [1][2]. The behavior regarding state updates after an await depends on whether you are using the startTransition provided by the useTransition hook or the standalone React.startTransition function [3]. When using useTransition in React 19, state updates that occur after an await are automatically included in the transition [3]. The isPending state becomes true immediately upon the call to startTransition and remains true until the entire asynchronous action (including any subsequent state updates triggered by it) has completed [1][4]. In contrast, the standalone React.startTransition function still requires that any state updates occurring after an await be explicitly wrapped in an additional startTransition call [3]. This distinction exists because useTransition is bound to a specific component context, whereas the isomorphic React.startTransition is not associated with a specific root or component tree [3][5]. The requirement to wrap post-await updates in the standalone function is a consequence of the current lack of universal browser support for an "Async Context" API [6]. React handles this by grouping together all updates that occur within the synchronous execution phase of the transition and tracking the lifecycle of the action, but it cannot automatically propagate the transition context across asynchronous boundaries for the standalone function [6]. Top results: [1][3][5][4]
Citations:
🌐 Web query:
site:react.dev useTransition async actions React 19 pending state first await startTransition async
💡 Result:
In React 19, useTransition allows you to track the pending state of asynchronous actions [1][2]. The isPending boolean returned by useTransition becomes true as soon as startTransition is called and remains true until all actions within the transition have completed [3]. Regarding async behavior, React tracks state updates scheduled synchronously during the startTransition function call as part of the transition [3][4]. If your action contains asynchronous code, note that any state updates occurring after an await expression will fall outside the original transition unless explicitly wrapped in another startTransition call [3][4]. This is a known limitation: to ensure subsequent updates remain part of the same transition, you must wrap those specific updates in a nested startTransition call [4]. For example: const [isPending, startTransition] = useTransition; // Inside your event handler startTransition(async => { // Sync state updates here are part of the transition setIsLoading(true); await performAsyncWork; // Updates after await are NOT part of the original transition // unless explicitly wrapped: startTransition( => { setResult(data); setIsLoading(false); }); }); To provide immediate feedback while the transition is ongoing, such as optimistic UI updates, you can use the useOptimistic hook in conjunction with useTransition [5][3].
Citations:
🌐 Web query:
React 18 useTransition async callback isPending first await pending resolves docs
💡 Result:
In React 18, the isPending state provided by useTransition does not remain true across await expressions [1][2][3]. When an asynchronous callback is passed to startTransition, isPending switches to true when the function is initially called, but it will revert to false as soon as the first await is encountered and the function pauses execution [1][3]. This occurs because, in React 18, startTransition only tracks synchronous state updates scheduled during the initial execution of the callback [1][2]. Once the function hits an await, control is returned to the browser's event loop, and React considers the "transition" complete, even if the asynchronous operation is still ongoing [1][2][3]. Consequently, any state updates performed after the await are not automatically treated as part of the original transition [1][2][4]. To ensure subsequent updates are treated as transitions in React 18, you must manually wrap those post-await state updates in another startTransition call [1][2][4]. This behavior was addressed in React 19, where useTransition was updated to natively support async actions, allowing isPending to remain true for the entire duration of an asynchronous operation [5][3].
Citations:
isPending can clear before toggleJoinRequestAction finishes
startTransition(async () => ...) on React 18 only tracks the synchronous part of the callback, so the button may re-enable while the mutation is still in flight. Track pending explicitly with local state so the disabled state covers the full request.
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@app/`(member)/app/clubs/JoinRequestButton.tsx around lines 17 - 22, Update
the JoinRequestButton toggle flow to track the entire toggleJoinRequestAction
request with explicit local pending state, rather than relying on
startTransition’s isPending for the async work. Set the pending state before the
request, clear it in a finally block, and use it in the button’s disabled state
so the button remains disabled until the mutation completes.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| import { parseInterests } from "@/lib/interests"; | ||
| import { PageHeader } from "@/components/shell/AppShell"; | ||
| import { GlassCard, StatusPill } from "@/components/ui/primitives"; | ||
| import { JoinRequestButton } from "./JoinRequestButton"; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
JoinRequestButton is imported but never rendered — discover cards remain static.
Line 7 adds import { JoinRequestButton } from "./JoinRequestButton";, but ClubDiscoveryCard (lines 104-123) still renders the original plain <button> (lines 118-120) with no onClick, no membership lookup, and no initialRequested prop. The PR's stated goal — persistent "Request to join"/"Requested" states driven by membership lookup — isn't actually wired up in this file; the new component is dead code here.
ClubDiscoveryCard needs a requestedClubIds (or similar) set derived from the current user's pending memberships, passed down per club, and the static button replaced with <JoinRequestButton clubId={c.id} initialRequested={...} />.
function ClubDiscoveryCard({ club: c, recommended = false }: { club: DiscoverClub; recommended?: boolean }) {
+ const isRequested = /* derive from pending memberships for c.id */;
return (
<GlassCard className="overflow-hidden">
...
<div className="mt-1 text-xs text-muted-foreground">{c.tagline}</div>
- <button className="mt-4 w-full rounded-lg border border-white/[0.12] bg-white/[0.035] py-2 text-xs font-semibold text-white/[0.78] transition hover:border-secondary/35 hover:bg-white/[0.06] hover:text-secondary">
- Request to join
- </button>
+ <JoinRequestButton clubId={c.id} initialRequested={isRequested} />
</GlassCard>
);
}Also applies to: 104-123
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@app/`(member)/app/clubs/page.tsx at line 7, Wire JoinRequestButton into
ClubDiscoveryCard: derive a requestedClubIds set from the current user’s pending
memberships, pass each club’s requested status into the card, and replace the
static button with JoinRequestButton using clubId={c.id} and
initialRequested={requestedClubIds.has(c.id)}. Ensure the membership lookup and
prop flow cover all discovery cards.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Tested this locally; a few things before this is ready to merge:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
… for name/interests with shell name sync Co-authored-by: Cursor <[email protected]>
7b16b9fd
Deployed
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Fix notification toggle on Profile page Fix sidebar active state and clipped nav highlight border for member dashboard sidebar Fix inconsistent card spacing in Your week member dashboard section
There was an error while loading. Please reload this page.