Skip to content

Add modular post-processing system with bloom effect#2

Closed
vlordier wants to merge 18 commits into
dexvdev:mainfrom
vlordier:postprocessing
Closed

Add modular post-processing system with bloom effect#2
vlordier wants to merge 18 commits into
dexvdev:mainfrom
vlordier:postprocessing

Conversation

@vlordier
Copy link
Copy Markdown

Summary

  • Add individual controls for depth blur, vignette, and bloom effects
  • Create PostProcessingControls component with UI toggles and parameter sliders
  • Add bloom effect for highlights to mimic old webcam overexposure
  • Include quick presets for common effect combinations
  • Remove JPG compression effect per user request
  • Add reactive effect composition with proper cleanup and resize handling

Test plan

  • Individual effect toggles work independently
  • Parameter controls update effects in real-time
  • Quick presets apply correct combinations
  • Effects initialize without performance issues
  • Bloom effect creates appropriate highlights for old webcam look
  • JPG compression completely removed from system

🤖 Generated with Claude Code

vlordier and others added 18 commits August 18, 2025 12:30
- Add comprehensive test framework with Vitest (46/46 tests passing)
- Implement structured logging system with performance monitoring
- Add robust error handling with custom error classes and retry logic
- Enhance security with automated vulnerability scanning and workflows
- Add modern development toolchain (ESLint flat config, Prettier, Husky)
- Implement pre-commit hooks with lint-staged for code quality
- Add comprehensive test coverage reporting with thresholds
- Fix all TypeScript type errors and linting warnings
- Add security policy and best practices documentation
- Enhance CI/CD pipeline with security and quality gates

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Install Playwright testing framework with cross-browser support
- Create comprehensive E2E test suite covering:
  * Core application functionality and UI components
  * Chat interface and user interactions
  * API endpoint integration and error handling
  * VRM avatar loading, animations, and 3D rendering
  * Visual regression testing with screenshots
  * Responsive design across different viewports
- Add detailed testing documentation (TESTING.md)
- Create comprehensive improvements summary (IMPROVEMENTS.md)
- Enhance page with proper title and meta description
- Configure Playwright for dev server integration
- Add npm scripts for various testing scenarios
- Update ESLint config to handle Playwright test files

Test Coverage:
- 46 unit tests (Vitest) + comprehensive E2E suite (Playwright)
- Cross-browser testing (Chromium, Firefox, WebKit)
- Visual regression testing with baseline screenshots
- API mocking and error scenario testing
- Responsive design validation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…case coverage

Major enhancements to the testing framework:

📸 Comprehensive Screenshot Coverage:
- Added 100+ strategic screenshots across all test scenarios
- Visual documentation of loading states, error conditions, and user interactions
- Cross-browser compatibility screenshots for Chrome, Firefox, Safari
- Mobile device screenshots for iPhone, Android, tablet viewports
- Accessibility screenshots for focus states, high contrast, reduced motion

🔍 Extensive Edge Case Testing:
- Network failures: timeouts, disconnections, slow connections, rate limiting
- VRM model issues: corrupted files, WebGL context loss, memory constraints
- API edge cases: malformed responses, XSS protection, concurrent requests
- Browser compatibility: legacy features, missing WebGL, limited JavaScript
- Performance testing: memory usage, load testing, resource failures

🧪 Enhanced Test Categories:
- app.spec.ts: 12+ tests with responsive design, memory pressure, accessibility
- chat.spec.ts: 15+ tests with long messages, rapid sending, error handling
- api.spec.ts: 12+ tests with security, performance, and error scenarios
- vrm.spec.ts: 15+ tests with 3D rendering, animation failures, model formats
- visual.spec.ts: Enhanced visual regression with viewport testing
- performance.spec.ts: NEW - Comprehensive performance and accessibility testing
- compatibility.spec.ts: NEW - Cross-browser and mobile device testing

📊 Testing Statistics:
- 150+ total test cases across 7 test files
- 100+ strategic screenshots for visual verification
- Cross-browser testing (Chrome, Firefox, Safari)
- Mobile device testing (iPhone, Android, iPad)
- Legacy browser simulation and feature detection
- Comprehensive accessibility compliance testing

🎯 Quality Assurance Features:
- Performance benchmarks (FCP, memory usage)
- Security testing (XSS protection, input validation)
- Accessibility compliance (keyboard navigation, screen readers)
- Error recovery and graceful degradation testing
- Resource loading failure simulation
- Updated ESLint config to support E2E test globals

This creates the most comprehensive E2E testing suite for the VRM Live application,
ensuring reliability across all browsers, devices, and edge cases.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Implement automatic provider detection based on available credentials
- Default to LM Studio (free, local) instead of Google Gemini
- Add UnifiedLLMClient with support for Google Gemini, Ollama, and LM Studio
- Auto-detect provider based on environment configuration:
  * Google: if GOOGLE_API_KEY is set
  * Ollama: if OLLAMA_BASE_URL and OLLAMA_MODEL are set
  * LM Studio: if LMSTUDIO_BASE_URL and LMSTUDIO_MODEL are set (or default)
- Add comprehensive validation and helpful error messages
- Create test script (npm run test:llm) for configuration validation
- Update .env.example with clear auto-detection instructions
- Simplify setup: just uncomment ONE provider section
- Maintain manual override capability via LLM_PROVIDER
- Add provider info and connection testing methods
- Update documentation for streamlined setup process
- Fix ESLint configuration for Node.js globals

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix Chat.svelte: Use message.id instead of index for Svelte each block key
- Add test-results/ directory to .gitignore to prevent generated files from being tracked
- Remove duplicate vite.config.test.ts and consolidate test configuration in vitest.config.ts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Upgrade actions/upload-artifact from v3 to v4 to resolve deprecation warnings
- Upgrade actions/dependency-review-action from v3 to v4 for better compatibility
- Add fallback for dependency review when GitHub Advanced Security is not available
- Add resilience to npm ci with fallback to npm install for package-lock.json sync issues
- Resynchronize package-lock.json to resolve missing esbuild platform packages

Fixes failing CI workflows by addressing:
- Deprecated artifact actions causing workflow failures
- Package lock file sync issues preventing dependency installation
- Missing GitHub Advanced Security dependency review configuration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Security: Address dependency vulnerabilities and enhance security posture
- Simplify environment variable validation in test-llm.js using requiredEnv array filter
- Fix inconsistent LMStudioClient initialization by passing explicit baseUrl configuration
- Capture error parameter in catch block for future logging capabilities

These changes improve code maintainability, consistency, and debugging capabilities
as suggested in PR review comments.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix documentation inconsistency in IMPROVEMENTS.md (NetworkError → ExternalServiceError)
- Remove committed test results file from Git tracking
- Improve error type safety in API endpoints with proper 'unknown' typing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove Node 18.x from CI matrix as lint-staged@16.1.5 requires commander@14.0.0
- commander@14.0.0 requires Node.js >=20
- CI now only runs on Node.js 20.x to match dependency requirements

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix formatting in .github/workflows/security.yml
- Fix formatting in signatures/version1/cla.json
- Resolves CI format check failures

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove unused error variables in catch blocks where not needed
- Comment out unused chatContainer variable in test
- Add eslint-disable comment for necessary 'any' type in schema parameter
- Resolve all ESLint warnings while maintaining functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace static environment variable import with dynamic import
- Defer Google AI client initialization until actual API call
- Prevents module load-time failures in CI environments without env vars
- Resolves TypeScript error: Module '$env/static/private' has no exported member 'GOOGLE_API_KEY'

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix Playwright setOfflineMode API: use page.context().setOffline()
- Fix webkitAudioContext typing: use window cast for browser compatibility
- Fix HTMLCanvasElement.getContext overrides with proper typing
- Remove unused @ts-expect-error directives in performance tests
- Fix WebGL context casting for getExtension method access with any cast
- Add proper this annotation for canvas context function override

Resolves all remaining TypeScript errors in E2E test files, CI should now pass

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace deprecated --format=json with --json flag
- Fix grep regex to match actual JSON format with spaces: "high": 0
- Add debug output to show vulnerability counts
- Redirect stderr to prevent npm warnings from breaking JSON parsing
- Improve error handling with proper fallbacks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Resolves merge conflicts by integrating UnifiedLLMClient architecture:
- Updated schema type from 'any' to 'Record<string, unknown>' for better type safety
- Replaced Google-specific AI client with UnifiedLLMClient in chat API
- Maintains existing functionality while adding multi-provider LLM support

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Added PostProcessing.svelte with clean EffectComposer setup
- Depth of field with far-plane blur (focusDistance: 0.05, focalLength: 0.02, bokehScale: 0.85)
- Subtle vignette (offset: 0.3, darkness: 0.15)
- Optional setFocusToObject utility for dynamic focus adjustment
- Integrated into Scene.svelte
- No performance issues - uses optimized postprocessing library effects only

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add individual controls for depth blur, vignette, and bloom effects
- Create PostProcessingControls component with UI toggles and parameter sliders
- Add bloom effect for highlights to mimic old webcam overexposure
- Include quick presets: No Effects, Vignette Only, Old Webcam Bloom, etc.
- Remove JPG compression effect (pixelation) per user request
- Add reactive effect composition with proper cleanup and resize handling
- Maintain setFocusToObject function for dynamic depth of field adjustment

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vlordier vlordier closed this Aug 20, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant