feat (Frontend): Add team tender list sign-up page#408
Conversation
Low-friction page accessible via QR code (/tt/) where users can log in and sign up to receive tender emails for DMUN conference team positions. Reuses existing wantsJoinTeamInformation field on User model. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a new "Team Tender" feature: localized strings (EN/DE), an authenticated SvelteKit route with server-side load querying user preference, a client page to sign up/unsubscribe via GraphQL mutation with toasts, a breadcrumb entry, and a short /tt → /team-tender redirect. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant B as Browser/Page
participant S as SvelteKit Server (load)
participant GQ as GraphQL API
U->>B: Navigate to /team-tender
B->>S: invoke load()
activate S
S->>GQ: query user(wantsJoinTeamInformation) by id
activate GQ
GQ-->>S: return user preference
deactivate GQ
S-->>B: return signedUp status
deactivate S
B->>U: render signup UI (signedUp state)
U->>B: Click Sign Up / Unsubscribe
B->>GQ: mutation updateOneUsersNewsletterPreferences(email, wantsJoinTeamInformation)
activate GQ
GQ-->>B: mutation result (success/error)
deactivate GQ
B->>U: show toast, update UI state
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/routes/(authenticated)/team-tender/+page.svelte (1)
4-5: Align i18n/icon usage with Svelte conventions.This component uses
m.*()helpers andfa-solidicons, while project Svelte conventions require$t()and duotone icons.As per coding guidelines "Use Paraglide-JS
$t()function for translated strings in Svelte components" and "Use FontAwesome Duotone icons withfa-duotone fa-icon-nameformat in Svelte components".Also applies to: 51-51, 67-67
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/routes/`(authenticated)/team-tender/+page.svelte around lines 4 - 5, This file uses the Paraglide m.*() helpers and solid icon classes; update each use of m.<...>() in the Svelte component (e.g., where PageProps or labels are built) to call the Paraglide-JS Svelte translation function $t(...) instead, and replace any FontAwesome "fa-solid" classes with duotone classes in the "fa-duotone fa-<icon-name>" format; specifically update occurrences noted (around the usages at the current imports and the two other locations referenced) so string lookups use $t and icon class attributes use fa-duotone.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/routes/`(authenticated)/team-tender/+page.svelte:
- Around line 13-17: The GraphQL mutation UpdateTeamTenderPreference and the
resolver updateOneUsersNewsletterPreferences accept a mutable email parameter
allowing clients to change other users' preferences; remove the client-supplied
email from the mutation signature and from the client call in +page.svelte, and
modify the resolver in modules/user.ts to derive the target user from the
authenticated context (e.g., ctx.user.id or equivalent) and ignore any provided
email input so updates are only applied to the signed-in user.
- Around line 35-37: The mutation successful path currently only updates local
state (setting signedUp after awaiting promise); after the mutation succeeds you
must mark Houdini cache stale and revalidate route data by calling
cache.markStale() and then awaiting invalidateAll() — e.g., in the same success
branch where you await promise (before/after setting signedUp) call
cache.markStale() and await invalidateAll() so other views receive updated
preference state. Ensure you import or reference the existing Houdini
cache/invalidate helpers used in the project and only run these calls on the
successful completion of the mutation.
---
Nitpick comments:
In `@src/routes/`(authenticated)/team-tender/+page.svelte:
- Around line 4-5: This file uses the Paraglide m.*() helpers and solid icon
classes; update each use of m.<...>() in the Svelte component (e.g., where
PageProps or labels are built) to call the Paraglide-JS Svelte translation
function $t(...) instead, and replace any FontAwesome "fa-solid" classes with
duotone classes in the "fa-duotone fa-<icon-name>" format; specifically update
occurrences noted (around the usages at the current imports and the two other
locations referenced) so string lookups use $t and icon class attributes use
fa-duotone.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: fa27538f-5978-450d-a054-8326de902c2b
📒 Files selected for processing (6)
messages/de.jsonmessages/en.jsonsrc/routes/(authenticated)/Breadcrumbs.sveltesrc/routes/(authenticated)/team-tender/+page.server.tssrc/routes/(authenticated)/team-tender/+page.sveltesrc/routes/tt/+page.ts
trivy-action@0.32.0 defaults to "latest" which can resolve to versions with removed release artifacts (e.g. v0.69.1), causing exit code 1. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tion Ensures other views (e.g. my-account) reflect updated preference state. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
/team-tender/(with short URL/tt/for QR codes) where users can opt in to receive tender emails for DMUN conference team positionswantsJoinTeamInformationfield on the User model and theupdateOneUsersNewsletterPreferencesmutation — no backend changes neededTest plan
/tt/and verify redirect to/team-tender//team-tender/after loginwantsJoinTeamInformationtoggles correctly in the database🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
Chores