feat: add local file selector for face images#15
Conversation
- Add radio buttons to choose between URL or file upload - Implement file input with image validation and preview - Add base64 encoding for local image storage - Maintain existing URL functionality - Add Japanese labels for better UX - Store imageType setting for persistence Co-authored-by: Ryo Oshima <oshimaryo@users.noreply.github.com>
|
Claude finished @oshimaryo's task —— View job PR Review Complete ✅Review Checklist:
📋 Review SummaryThis PR successfully adds local file upload functionality with good backward compatibility. The implementation includes nice UX touches like image previews and bilingual labels. However, there are several areas that need attention for production readiness. 🐛 Critical Issues1. Bug in insertImage function ( document.getElementsByClassName('option--image').appendChild(img);Should be: document.getElementsByClassName('option--image')[0].appendChild(img);
2. Missing error handling for FileReader
|
* feat: Set up Vite development environment for Chrome extension - Add comprehensive Vite setup plan document - Create package.json with necessary dependencies - Configure vite.config.js for Chrome extension development - Restructure project with src/ directory - Move all source files to new structure - Update .gitignore for build artifacts - Add instructions for manual icon copying 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Ryo Oshima <oshimaryo@users.noreply.github.com> * fix: Fix build errors and improve extension functionality - Add type="module" to script tags for Vite compatibility - Update vite.config.js to use proper root and output directories - Fix multiple face generation issue by adding duplicate prevention - Update to Manifest V3 to resolve deprecation warnings - Fix multi-tab support by properly handling content script instances - Add run_at: "document_idle" for proper script injection timing - Remove debugging console.log statements 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * docs: Update README.md and CLAUDE.md for Vite build system - Update README.md with modern development setup using Vite - Add detailed build instructions and project structure - Update CLAUDE.md to reflect current architecture with src/ directory - Document Manifest V3 migration and build configuration - Add development workflow and common tasks documentation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
- Add FileReader error handling with user-friendly messages - Implement 500KB file size limit validation - Remove code duplication in applySettings function - Add null checks for all DOM element operations - Replace Japanese text with English for internationalization - Add loading state during file processing - Clear file input on errors for better UX
|
Claude finished @oshimaryo's task —— View job PR Review Complete ✅Review Checklist:
📋 Review SummaryThis PR successfully adds local file upload functionality with good backward compatibility. The implementation includes nice UX touches like image previews and bilingual labels. However, there are several areas that need attention for production readiness. 🐛 Critical Issues1. Bug in insertImage function ( document.getElementsByClassName('option--image').appendChild(img);Should be: document.getElementsByClassName('option--image')[0].appendChild(img);
2. Missing error handling for FileReader
|
|
Claude finished @oshimaryo's task —— View job PR Review Complete ✅Review Checklist:
📋 Review SummaryThis PR successfully adds local file upload functionality for face images, with good backward compatibility and user experience improvements. The implementation includes proper file validation, error handling, and loading states. However, there are some areas that could be improved for production readiness. 🐛 Issues Found1. Unused Function with Bug ( const insertImage = (src) => {
const img = document.createElement('img');
img.src = src;
document.getElementsByClassName('option--image').appendChild(img); // ❌ Bug here
}The 2. Debug Code Left in Production ( console.log(e); // Line 46, 53
console.log(results); // Line 172
|
|
Claude finished @oshimaryo's task —— View job PR Review Complete ✅Review Checklist:
📋 Review SummaryThis PR successfully adds local file upload functionality for face images, with good backward compatibility and user experience improvements. The implementation includes proper file validation, error handling, and loading states. However, there are some areas that could be improved for production readiness. 🐛 Issues Found1. Unused Function with Bug ( const insertImage = (src) => {
const img = document.createElement('img');
img.src = src;
document.getElementsByClassName('option--image').appendChild(img); // ❌ Bug here
}The 2. Debug Code Left in Production ( console.log(e); // Line 46, 53
console.log(results); // Line 172
|
Closes #5
Adds local file selector functionality to allow users to upload and persist local face images.
Changes
Features
🤖 Generated with Claude Code