Open
Conversation
paidabai
pushed a commit
to paidabai/MoonTV
that referenced
this pull request
Dec 1, 2025
* chore (optimize middleware.ts): defines cspHeader in module scope (samqin123#10) This prevents `cspHeader` array -> string creation & transformation from happening more than once. * Make submit button black when user enters text * added margin and padding to the main container (samqin123#15) * Make transcript manual mode when select text * Update ai-processing.ts * Update ai-processing.ts * Update ai-processing.ts * Propagate Gemini model error * Add initial schema migration * Add translation * Add multi-language translation feature with batched API calls Integrates language selector into Transcript tab dropdown, supporting 9 languages (EN, ZH-CN, ZH-TW, JA, KO, FR, DE, ES, PT) with translation batching to reduce API overhead and improve performance. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Fix critical translation feature bugs to prevent race conditions and memory leaks Resolved multiple critical issues identified in code review to ensure translation feature stability and reliability: - Added race condition guards in translation batcher to prevent stale translations during language switches - Implemented LRU-based cache eviction (500 entry limit) to prevent unbounded memory growth - Added translation error states with retry UI for better user experience - Enhanced server-side error logging with full context for debugging - Validated batch sizes (1-100) to prevent API failures - Removed debug logging from production code paths 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * commit translation * fix build * fix build * Split transcript into two hot areas * commit * test * test * Update auth-modal.tsx * add log * add logs * Update auth-modal.tsx * Update auth-modal.tsx * Update auth-modal.tsx * Update auth-modal.tsx * Update rate-limiter.ts * commit * smart sentence break * support unselect * break early punctuation * Refactor: Extract custom hooks (useTranslation, useSubscription, useTranscriptExport) Created three custom hooks to reduce page.tsx complexity: - lib/hooks/use-translation.ts: Translation state and batching logic - lib/hooks/use-subscription.ts: Subscription status management - lib/hooks/use-transcript-export.ts: Transcript export functionality Partially integrated into page.tsx (in progress - old handlers still need removal) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Fix syntax errors in use-transcript-export hook - Changed single quotes to double quotes for strings containing apostrophes - Fixed parsing errors on lines 93, 134, and 236 * Complete page.tsx refactoring - remove duplicate handlers - Removed duplicate translation handlers (now in useTranslation hook) - Removed duplicate export handlers (now in useTranscriptExport hook) - Removed duplicate subscription state management - Cleaned up translationBatcherRef cleanup (now handled by hook) - Reduced component complexity by ~250 lines All handler logic is now properly encapsulated in custom hooks. * remove debug logs * removed unneeded changes * Delete settings.local.json * more cleanup * simplified translation api * removed unrelated codes * undo * removed logs * remove unused codes * reduce supported langs * reduce supported langs --------- Co-authored-by: Santosh Venkatraman <santosh.venk@gmail.com> Co-authored-by: SamuelZ12 <zhangsamuel12@gmail.com> Co-authored-by: Josh Chen <josh.chen.jia@gmail.com> Co-authored-by: Claude <noreply@anthropic.com>
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.
更新config.json