## Summary
- Create centralized frontend logger with level-based filtering (debug/info/warn/error)
- Add sensitive data sanitization for tokens, passwords, secrets, and credentials
- Support VITE_LOG_LEVEL environment variable with graceful fallback to 'info'
- Logger fails silently to prevent app crashes
Fixes #84
## Files Changed
- **Created**: `frontend/src/utils/logger.ts` - Logger utility with sanitization
- **Modified**: `frontend/src/vite-env.d.ts` - Added VITE_LOG_LEVEL type
## Test Plan
- [x] `npm run type-check` passes
- [x] `npm run lint` shows no new warnings in changed files
- [ ] Manual browser testing with different VITE_LOG_LEVEL values
- [ ] Verify sensitive data redaction in console output
- [ ] Test on mobile viewport (320px)
- [ ] Test on desktop viewport (1920px)
## Acceptance Criteria
- [x] VITE_LOG_LEVEL controls frontend log verbosity
- [x] Invalid VITE_LOG_LEVEL shows warning and falls back to 'info'
- [x] Sensitive data (tokens, passwords) are sanitized
- [x] Logger fails silently (no app crashes)
- [ ] Works on mobile viewport (320px) - requires browser testing
- [ ] Works on desktop viewport (1920px) - requires browser testing
Generated with [Claude Code](https://claude.com/claude-code)
- Create centralized logger utility at frontend/src/utils/logger.ts
- Support debug/info/warn/error levels controlled by VITE_LOG_LEVEL
- Sanitize sensitive data (tokens, passwords, secrets) in log output
- Graceful fallback to 'info' level for invalid VITE_LOG_LEVEL values
- Add VITE_LOG_LEVEL to ImportMetaEnv type definitions
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Fixes #84
Files Changed
frontend/src/utils/logger.ts- Logger utility with sanitizationfrontend/src/vite-env.d.ts- Added VITE_LOG_LEVEL typeTest Plan
npm run type-checkpassesnpm run lintshows no new warnings in changed filesAcceptance Criteria
Generated with Claude Code