fix: SonarQube cleanup batch 2 + habit-card refactoring - #4
Merged
Conversation
- S4144: Deduplicate route handlers into single handler function - S6819: Replace ARIA roles with native HTML (section, nav, progress, label+input) - S6479: Replace array index keys with content-based keys - S7721: Extract pure functions to outer scope (factCategoryColor, isValidTime, etc.) - S3358: Flatten nested ternaries into if/else or &&-chains - S6852: Add tabIndex/aria-label to interactive role elements - S6847: Fix non-interactive elements with click handlers - S3776: Reduce cognitive complexity via helper extraction - Additional linter auto-fixes for code quality Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- S7735: Fix negated conditions - swap ternary branches to positive first - habit-form-fields.tsx: hasProAccess positive branch first - message-bubble.tsx: dismissedBreakdowns.has() positive branch first - S6582: Use optional chaining for movingHabit?.parentId - S4043: Copy array before sort with [...overdueHabits].sort() Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract sub-components: CompletionButton, SelectCheckbox, HabitBadges, HabitMeta, ActionButtons, ActionsMenu. Replace nested ternaries with helper functions. Fix accessibility issues (native elements). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
thomasluizon
added a commit
that referenced
this pull request
Apr 15, 2026
…ferral/JWT
Security hardening on the web BFF auth layer:
- Dedicated /api/auth/{send-code,verify-code,google,logout} routes now call
buildForwardedClientHeaders(request) so X-Forwarded-For / CF-Connecting-IP /
X-Orbit-Country-Code / Accept-Language / X-Orbit-Time-Zone reach the .NET
backend. Previously these routes sent no client context, so the backend's
DistributedRateLimitFilter partitioned every anonymous auth request under
the Next.js server IP — collapsing the per-client 5 req/min bucket.
- auth_token cookie maxAge changed from 86_400 (1 day) to 604_800 (7 days) so
it matches the backend JwtSettings.ExpiryHours=168. Prevents daily forced
token refresh round-trips.
- Length-cap the JWT payload segment in /api/auth/session before JSON.parse
(4 KB ceiling). Blocks a memory-amplification vector where a malicious
cookie contains a megabyte-scale base64 segment.
- Cap referral query-param at 40 chars before cookie write on the login page.
Includes new unit tests for send-code header forwarding and updates
auth-api.test.ts to assert the 7-day maxAge.
Covers frontend plan Area A #1, #2, #4, #5.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced May 18, 2026
40 tasks
This was referenced Jun 27, 2026
Merged
This was referenced Jul 12, 2026
This was referenced Jul 24, 2026
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
Test plan
npx vitest run- 1210 tests, 116 files, all passingnpx turbo run type-check- web passes (mobile has pre-existing errors)🤖 Generated with Claude Code