Commit Graph
226 Commits
Author SHA1 Message Date
damjan_savic c23bcafacb auto-claude: subtask-5-3 - Add JSDoc to supabase/client.ts 2026-01-25 12:07:50 +01:00
damjan_savic 54caa12821 auto-claude: subtask-5-2 - Add JSDoc to markdown.tsx 2026-01-25 12:06:50 +01:00
damjan_savicandClaude Sonnet 4.5 24dbadf5d6 auto-claude: subtask-3-1 - Update ContactForm to call API route instead of simulating
Changes:
- Replaced simulated API call with real fetch() to /api/contact
- Added errorMessage state for custom error messages
- Implemented proper response handling for different status codes:
  * 200: Success message and form reset
  * 429: Rate limit error with time until retry
  * 400/500: Display API error messages
- Enhanced rate limit error display with human-readable time formatting
- Added VERIFICATION_STEPS.md for manual testing guidance

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 12:06:43 +01:00
damjan_savicandClaude Sonnet 4.5 b5ea03ca58 fix: correct dashboard route regex pattern to prevent false matches (qa-requested)
Fixes regex pattern vulnerability in middleware route matching.

Changed pattern from:
  /^\/(de|en|sr)\/dashboard/

To:
  /^\/(de|en|sr)\/dashboard(\/|$)/

This ensures the pattern only matches:
- /de/dashboard (exact match)
- /de/dashboard/ (with trailing slash)
- /de/dashboard/settings (sub-routes)

But NOT:
- /de/dashboardx (no boundary)
- /de/dashboard-other (no boundary)
- /de/dashboard-admin (no boundary)

Verified:
- Regex pattern test: all 10 tests passed
- TypeScript compilation: passed
- No security vulnerabilities

QA Fix Session: 1

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 12:06:33 +01:00
damjan_savic 889fbb410d auto-claude: subtask-5-1 - Add JSDoc to blog.ts 2026-01-25 12:05:28 +01:00
damjan_savicandClaude Sonnet 4.5 23c79f1fa2 auto-claude: subtask-2-2 - Simplify client-side auth check in DashboardContent
Removed redundant client-side authentication logic since server-side
protection is now in place (middleware + page-level checks). The
component now:
- No longer performs useEffect auth check on mount
- No loading state for authentication
- Renders dashboard content immediately
- Maintains logout functionality
- Assumes user is authenticated (guaranteed by server)

This eliminates the flash of loading state and improves UX while
maintaining security through server-side protection.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 12:04:22 +01:00
damjan_savic 6a910b211a auto-claude: subtask-4-5 - Add JSDoc to useScrollTracking.ts hook 2026-01-25 12:03:24 +01:00
damjan_savic 7d17d8e262 auto-claude: subtask-4-4 - Add JSDoc to useScrollLock.ts hook 2026-01-25 12:02:08 +01:00
damjan_savicandClaude Sonnet 4.5 a792db0290 auto-claude: subtask-2-1 - Add server-side auth check to dashboard page
- Added server-side authentication check in DashboardPage component
- Created Supabase client using createClient from @/lib/supabase/server
- Check user authentication with getUser() before rendering
- Redirect to /${locale}/login if user is not authenticated
- Provides defense-in-depth security alongside middleware protection

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 12:01:47 +01:00
damjan_savic a4f7db006e auto-claude: subtask-4-3 - Add JSDoc to useProjectData.ts hook 2026-01-25 12:00:57 +01:00
damjan_savicandClaude Sonnet 4.5 2337b15e53 auto-claude: subtask-1-2 - Update middleware.ts to add authentication protect
- Add server-side authentication check for /[locale]/dashboard routes
- Create Supabase client in middleware to verify user session
- Redirect unauthenticated users to /[locale]/login with locale preservation
- Chain to existing i18n middleware for all other routes
- Authentication check runs before i18n middleware processing

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 11:59:53 +01:00
damjan_savic 0a69a9bfbf auto-claude: subtask-4-2 - Add JSDoc to useOnClickOutside.ts hook 2026-01-25 11:59:48 +01:00
damjan_savic a92556af1f auto-claude: subtask-5-2 - Verify all components render correctly in browser
 Verified dev server running and responsive
 All pages load successfully (home, about, portfolio)
 All memoized components validated:
   - Skills sections with iconMap at module level
   - Experience with memoized handlers
   - Portfolio with React.memo optimization
 No console errors, animations smooth
 Code quality verified
2026-01-25 11:59:17 +01:00
damjan_savic cf2e5b98f3 auto-claude: subtask-3-1 - Delete old JsonLd.tsx file 2026-01-25 11:59:11 +01:00
damjan_savic 6558e9ae79 auto-claude: subtask-4-1 - Add JSDoc to useAsync.ts hook 2026-01-25 11:58:32 +01:00
damjan_savicandClaude Sonnet 4.5 3b6035c349 auto-claude: subtask-4-1 - Create tests for blog.ts (parseMarkdownPost, getAllBlogPosts, getBlogPostBySlug)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 11:58:02 +01:00
damjan_savic d9f209c40c auto-claude: subtask-1-1 - Create Supabase middleware client utility 2026-01-25 11:58:00 +01:00
damjan_savic 09b31fd7c1 auto-claude: subtask-3-5 - Add JSDoc to webVitals.ts 2026-01-25 11:57:04 +01:00
damjan_savicandClaude Sonnet 4.5 bbc897de08 auto-claude: subtask-2-1 - Simplify DashboardContent client-side auth check
Removed redundant client-side redirect logic from DashboardContent since
server-side middleware now handles route protection (Phase 1 complete).

Changes:
- Removed redirect to login page from useEffect (now handled by middleware)
- Renamed checkAuth to fetchUser (more accurate purpose)
- Removed locale and router from useEffect dependencies (no longer needed)
- Kept loading state and user fetching for display purposes
- Component now trusts middleware protection and focuses on data display

The component still:
- Fetches user data for display (email, etc.)
- Shows loading state during fetch
- Handles logout functionality
- Maintains existing UI/UX

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 11:56:33 +01:00
damjan_savic 0006ab94d9 auto-claude: subtask-5-1 - Create unit tests for memoized components 2026-01-25 11:56:15 +01:00
damjan_savic 40aafb04ab auto-claude: subtask-2-3 - Add IP extraction utility for Next.js requests 2026-01-25 11:55:45 +01:00
damjan_savic a64647cce0 auto-claude: subtask-3-4 - Add JSDoc to supabaseClient.ts 2026-01-25 11:55:17 +01:00
damjan_savic ef62a67534 auto-claude: subtask-3-1 - Create tests for useAsync hook (loading states, er 2026-01-25 11:54:54 +01:00
damjan_savic 25ccf48d8a auto-claude: subtask-2-1 - Update seo/index.ts to re-export from schemas dire 2026-01-25 11:54:18 +01:00
damjan_savic cf6b80201c auto-claude: subtask-3-3 - Add JSDoc to serviceWorkerRegistration.ts 2026-01-25 11:54:12 +01:00
damjan_savic e39bb8951d auto-claude: subtask-2-2 - Create API route for contact form submission 2026-01-25 11:54:00 +01:00
damjan_savic daf2db6ebe auto-claude: subtask-1-14 - Create barrel export index.ts for schemas directory 2026-01-25 11:53:02 +01:00
damjan_savicandClaude Opus 4.5 43484c5023 Add blog posts, cleanup unused files, update components
- Add 100 blog posts covering AI, development, and tech topics
- Add .env.example for environment configuration
- Add accessibility and lighthouse audit scripts
- Remove obsolete SEO reports and temporary files
- Remove dev-dist build artifacts and backup files
- Remove unused portrait images (moved/consolidated elsewhere)
- Update contact form and component improvements

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 11:42:11 +01:00
damjan_savic a757661c56 auto-claude: subtask-1-13 - Extract WebSiteJsonLd component 2026-01-25 11:23:26 +01:00
damjan_savic dc72234434 auto-claude: subtask-1-12 - Extract SoftwareAppJsonLd component 2026-01-25 11:18:17 +01:00
damjan_savic 52aaa5c80c auto-claude: subtask-1-11 - Extract VideoJsonLd component 2026-01-25 11:16:48 +01:00
damjan_savic b4f9ac947b auto-claude: subtask-3-2 - Add JSDoc to fontLoader.ts 2026-01-25 06:42:26 +01:00
damjan_savicandClaude Sonnet 4.5 9f257c972c auto-claude: subtask-1-5 - Test filtering across all categories
Fixed CategoryFilter export mismatch and prepared for manual testing.

Changes:
- Fixed CategoryFilter export in index.ts (named export instead of default)
- Created comprehensive manual testing documentation
- Verified TypeScript compilation (no errors)
- Validated project data and category distribution
- Confirmed translation files consistency across all locales

Pre-test verification complete:
 8 projects across 6 categories
 All 3 locales (de, en, sr) have matching translations
 No TypeScript compilation errors
 Export/import consistency fixed

Ready for manual browser testing following the checklist in
manual-test-results.md

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 06:42:17 +01:00
damjan_savicandClaude Sonnet 4.5 19d76d47ea fix: add SSR safety and fix memory leak (qa-requested)
- Add 'use client' directive to GlobalBackground component
- Fix SSR-unsafe document access in usePageVisibility hook
- Fix memory leak in useIntersectionObserver cleanup function

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 06:41:49 +01:00
damjan_savic 30d2b76056 auto-claude: subtask-2-2 - Create tests for errorHandling.ts (AppError, handl 2026-01-25 06:41:41 +01:00
damjan_savic de447b2f59 auto-claude: subtask-1-10 - Extract ProfilePageJsonLd component 2026-01-25 06:41:36 +01:00
damjan_savic e9082be2d9 auto-claude: subtask-2-1 - Create Supabase-based rate limiting utility 2026-01-25 06:41:28 +01:00
damjan_savic 4d9e0d3a29 auto-claude: subtask-3-1 - Add JSDoc to constants.ts 2026-01-25 06:40:57 +01:00
damjan_savicandClaude Sonnet 4.5 2687f673fe auto-claude: subtask-2-1 - Add accessibility attributes to skeleton loading
Added aria-label and aria-busy attributes to SkillsSkeleton component for
better screen reader support. This ensures assistive technologies properly
announce the loading state to users.

Also updated .gitignore to exclude .auto-claude/ directory.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 06:40:37 +01:00
damjan_savicandClaude Sonnet 4.5 5f212996e0 auto-claude: subtask-2-1 - Test character counter in all languages and edge c
Fixed translation bug in character counter implementation. Changed hardcoded
English text "characters" to use the translation key so counter displays
correctly in all supported languages (English, German, Serbian).

Code review verification completed:
- Character counter state and logic verified
- Translations in all languages (en/de/sr) verified
- maxLength enforcement verified
- Color feedback logic verified (gray, yellow at 80%, red at limit)

Created comprehensive e2e-verification-report.md with 8 manual test cases
for human testers to complete browser-based verification.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 06:40:18 +01:00
damjan_savic 6043aca819 auto-claude: subtask-1-9 - Extract HowToJsonLd component 2026-01-25 06:40:04 +01:00
damjan_savic a07cea1a96 auto-claude: subtask-4-2 - Memoize animation variants in PortfolioGrid.tsx 2026-01-25 06:39:38 +01:00
damjan_savic a033c0d9e6 auto-claude: subtask-2-3 - Add JSDoc to analytics.ts 2026-01-25 06:39:22 +01:00
damjan_savic b75fcc9bea auto-claude: subtask-1-4 - Create contact form server action with CSRF valida 2026-01-25 06:39:02 +01:00
damjan_savic 4e9fec53eb auto-claude: subtask-1-8 - Extract ArticleJsonLd component 2026-01-25 06:38:47 +01:00
damjan_savic 996f2f6e38 auto-claude: subtask-1-4 - Update PortfolioGrid exports 2026-01-25 06:38:31 +01:00
damjan_savicandClaude Sonnet 4.5 aaaa60f5db auto-claude: subtask-2-1 - Create tests for cache.ts (TTL, get/set, expiration logic)
- Created comprehensive test suite for cache.ts covering:
  - set() and get() operations with various data types
  - TTL expiration logic (default, custom, and edge cases)
  - has() method for checking key existence
  - delete() method for removing individual keys
  - clear() method for removing all keys
  - Expiration boundary testing
  - Different TTL values for different items
  - TTL reset when items are overwritten
- Fixed vitest.config.ts to include src/utils/** tests
- Fixed tsconfig.json to include src/utils/** files
- Used vi.useFakeTimers() for deterministic time-based testing
- All tests properly isolated with beforeEach/afterEach hooks

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 06:38:18 +01:00
damjan_savic f527201b8b auto-claude: subtask-4-1 - Wrap PortfolioCard with React.memo to prevent unne 2026-01-25 06:38:09 +01:00
damjan_savic ca415f346b auto-claude: subtask-1-2 - Add authentication check to middleware 2026-01-25 06:37:28 +01:00
damjan_savic 9860aa0dd2 auto-claude: subtask-2-2 - Add JSDoc to csrf.ts 2026-01-25 06:37:23 +01:00