fix: resolve 13 findings from March 23 triage#30
Merged
Conversation
Security: remove open redirect via x-forwarded-host in auth callback, add crypto.timingSafeEqual for all 4 cron routes via shared cronAuth.js. Performance: memoize FocusContext value (useMemo), batch N+1 notification inserts in streak-breaks cron, cap orphaned session duration correctly. Design: remove noise texture overlay, desaturate bg gradients + accent, vary gradient angles, tighten border-radius, soften dark borders, reduce button glow, neutralize background colors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ion type whitelist Activity log batch insert in streak-breaks cron now logs errors instead of silently swallowing them. DB create_notification function whitelist updated to include all 19 notification types from NOTIFICATION_TYPES. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Root cause: e2e job ran next dev on a cold CI runner, which routinely exceeded the 120s webServer timeout. The build artifact from build-and-lint was never shared to the e2e job. Fix: add npx next build step in e2e job, switch Playwright webServer to next start in CI (2s startup vs 2min). Locally still uses next dev. Also adds a unit test job running npx vitest run. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves 13 findings from 3 automated email sources on March 23, 2026:
Security (2 fixes)
x-forwarded-hostheader no longer used in auth callback; redirect validated against origin with//protocol-relative guardlib/cronAuth.jsusingcrypto.timingSafeEqual(); all 4 cron routes updatedPerformance & Data Integrity (3 fixes)
useMemo,formatTimeinuseCallback.insert()replaces N individual calls in streak-breaks cronMath.min(now, expectedEnd)instead of alwaysstarted_at + durationDesign (8 CSS quick wins in
globals.css)#6366F1#FAFAFA/#F5F5F5— violet tint removed)Review fixes
create_notificationfunction type whitelist updated (9 → 19 types)Files changed (10)
app/auth/callback/route.jslib/cronAuth.js(new)timingSafeEqualcron auth utilityapp/api/cron/send-reminders/route.jsapp/api/cron/check-streak-risk/route.jsapp/api/cron/check-streak-breaks/route.jsapp/api/cron/cleanup/route.jslib/FocusContext.jsapp/globals.csssupabase/notifications.sqlTest plan
🤖 Generated with Claude Code