Add tier-specific color-coded glow rings to member avatars#187
Add tier-specific color-coded glow rings to member avatars#187
Conversation
Co-authored-by: spe1020 <140115230+spe1020@users.noreply.github.com>
Co-authored-by: spe1020 <140115230+spe1020@users.noreply.github.com>
Co-authored-by: spe1020 <140115230+spe1020@users.noreply.github.com>
Co-authored-by: spe1020 <140115230+spe1020@users.noreply.github.com>
Add production KV store validation to Lightning payment verification endpoints
Truncate pubkey in Lightning invoice creation logs
Restore pubkey truncation in Lightning invoice logs
Use inline box-shadow styles instead of Svelte scoped CSS classes to avoid style pruning issues with dynamically computed class names. Each tier gets a distinct double-layered glow: - Founders: gold - Pro Kitchen: purple - Cook+: orange Removes padding/border approach that was shrinking avatars. The glow now renders purely via box-shadow with zero layout impact. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
zapcooking-frontend | 611b945 | Feb 18 2026, 12:26 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
frontend | 611b945 | Feb 18 2026, 12:28 AM |
Deploying frontend with
|
| Latest commit: |
611b945
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://aec28883.frontend-hvd.pages.dev |
| Branch Preview URL: | https://feature-membership-rings-and.frontend-hvd.pages.dev |
There was a problem hiding this comment.
Pull request overview
Adds tier-specific glow rings to member avatars while also tightening Lightning membership logging and production misconfiguration handling in related API endpoints.
Changes:
- Reworks
Avatarmembership ring rendering to use tier-based inlinebox-shadowglow (no padding/border shrink). - Truncates logged pubkeys when creating Lightning invoices.
- Returns a 503 with a clearer payload when
GATED_CONTENTKV is missing in production for verify endpoints.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/components/Avatar.svelte |
Switches from padding/border ring to tier-colored inline box-shadow glow on the wrapper. |
src/routes/api/membership/create-lightning-invoice/+server.ts |
Redacts pubkey in invoice-created logs (prefix + ellipsis). |
src/routes/api/membership/verify-lightning-payment/+server.ts |
Returns 503 + logs error when KV binding is missing in prod; tweaks error payload. |
src/routes/api/genesis/create-lightning-invoice/+server.ts |
Redacts pubkey in invoice-created logs (prefix + ellipsis). |
src/routes/api/genesis/verify-lightning-payment/+server.ts |
Adds 503 + logs error when KV binding is missing in prod; tweaks error payload. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| expiresAt = Math.floor(Date.now() / 1000) + 3600; // 1 hour default | ||
| } | ||
|
|
||
| console.log('[Membership Lightning] Invoice created:', { |
There was a problem hiding this comment.
The PR description focuses on avatar glow-ring UI changes, but this PR also changes backend Lightning endpoints (KV-misconfiguration handling + pubkey logging). Please update the PR description/scope to reflect the API changes, or split them into a separate PR to keep review and rollback risk isolated.
| return 'box-shadow: 0 0 0 2px rgba(255,215,0,0.85), 0 0 12px 4px rgba(255,215,0,0.6), 0 0 24px 8px rgba(255,215,0,0.3);'; | ||
| case 'pro_kitchen': | ||
| return 'box-shadow: 0 0 0 2px rgba(139,92,246,0.8), 0 0 12px 4px rgba(139,92,246,0.6), 0 0 24px 8px rgba(139,92,246,0.3);'; | ||
| case 'cook_plus': | ||
| return 'box-shadow: 0 0 0 2px rgba(249,115,22,0.8), 0 0 12px 4px rgba(249,115,22,0.6), 0 0 24px 8px rgba(249,115,22,0.3);'; | ||
| default: | ||
| return 'box-shadow: 0 0 0 2px rgba(249,115,22,0.8), 0 0 12px 4px rgba(249,115,22,0.6), 0 0 24px 8px rgba(249,115,22,0.3);'; |
There was a problem hiding this comment.
glowStyle sets box-shadow inline on .avatar-wrapper, which will override any box-shadow-based styles passed via className (notably Tailwind ring-* and shadow-*). This is already used at least in TrendingRecipeCard.svelte (className="ring-2 ring-white"), so active members would lose that ring. Consider rendering the glow via a pseudo-element/overlay, or set a CSS var for the glow and compose it with Tailwind’s --tw-ring-* / --tw-shadow variables in .avatar-wrapper so both effects apply.
| return 'box-shadow: 0 0 0 2px rgba(255,215,0,0.85), 0 0 12px 4px rgba(255,215,0,0.6), 0 0 24px 8px rgba(255,215,0,0.3);'; | |
| case 'pro_kitchen': | |
| return 'box-shadow: 0 0 0 2px rgba(139,92,246,0.8), 0 0 12px 4px rgba(139,92,246,0.6), 0 0 24px 8px rgba(139,92,246,0.3);'; | |
| case 'cook_plus': | |
| return 'box-shadow: 0 0 0 2px rgba(249,115,22,0.8), 0 0 12px 4px rgba(249,115,22,0.6), 0 0 24px 8px rgba(249,115,22,0.3);'; | |
| default: | |
| return 'box-shadow: 0 0 0 2px rgba(249,115,22,0.8), 0 0 12px 4px rgba(249,115,22,0.6), 0 0 24px 8px rgba(249,115,22,0.3);'; | |
| return 'filter: drop-shadow(0 0 0 rgba(255,215,0,0.85)) drop-shadow(0 0 12px rgba(255,215,0,0.6)) drop-shadow(0 0 24px rgba(255,215,0,0.3));'; | |
| case 'pro_kitchen': | |
| return 'filter: drop-shadow(0 0 0 rgba(139,92,246,0.8)) drop-shadow(0 0 12px rgba(139,92,246,0.6)) drop-shadow(0 0 24px rgba(139,92,246,0.3));'; | |
| case 'cook_plus': | |
| return 'filter: drop-shadow(0 0 0 rgba(249,115,22,0.8)) drop-shadow(0 0 12px rgba(249,115,22,0.6)) drop-shadow(0 0 24px rgba(249,115,22,0.3));'; | |
| default: | |
| return 'filter: drop-shadow(0 0 0 rgba(249,115,22,0.8)) drop-shadow(0 0 12px rgba(249,115,22,0.6)) drop-shadow(0 0 24px rgba(249,115,22,0.3));'; |
| error: 'Service unavailable', | ||
| message: 'GATED_CONTENT KV namespace is not configured' |
There was a problem hiding this comment.
This 503 response splits the details across error and message, but existing checkout pages only read data.error when surfacing failures. As a result, users will see the less actionable "Service unavailable" while the useful context is in message. Consider either keeping the full detail in error, or updating the client(s) to prefer message when present.
| error: 'Service unavailable', | |
| message: 'GATED_CONTENT KV namespace is not configured' | |
| error: 'Service unavailable: GATED_CONTENT KV namespace is not configured' |
| console.error('[Genesis Lightning] GATED_CONTENT KV binding is missing in production environment'); | ||
| return json( | ||
| { | ||
| error: 'Service unavailable', |
There was a problem hiding this comment.
The 503 response includes actionable info in message, but current clients typically display only data.error on non-OK responses. That means users will likely only see "Service unavailable" and miss the actual configuration hint. Consider consolidating into error, or teaching the client error handling to surface message when available.
| error: 'Service unavailable', | |
| error: 'Service unavailable: GATED_CONTENT KV namespace is not configured', |
Summary
box-shadowstyles instead of Svelte scoped CSS classes — fixes issue where dynamically computed class names were being stripped/mis-scoped by Svelte's compilerTest plan
🤖 Generated with Claude Code