fix: resolve recursive loop in TaskCacheService causing app freeze after login#14
Merged
fix: resolve recursive loop in TaskCacheService causing app freeze after login#14
Conversation
…hat functionality
…eact-native-voice-processor - Added @picovoice/react-native-voice-processor for real-time audio streaming. - Updated useVoiceChat hook to reflect changes in audio processing method. - Refactored audioUtils to support new voice processor and removed resampling logic. - Implemented VAD based on RMS energy analysis instead of native VAD. - Adjusted AudioRecorder class to handle new audio processing and VAD logic.
…use binary frames
…ructure and tool call/output integration
…olWidget formats, and add collapsible tools section
… aggiunto alla chat vocale e che sostituira la pagina calendar normale
- Aggiunto Calendar20Modal per wrapper modale fullscreen - Creato ViewSelector component per selezione vista calendario - Migliorato stile di tutti i componenti Calendar20: * Aumentato padding e spacing per migliore leggibilità * Aggiornato border radius a 16px su task cards * Migliorato shadow e elevation per depth visivo * Regolato font sizes e weights per gerarchia visiva - Semplificato SearchOverlay riducendo codice ridondante - Ottimizzato MiniCalendar rimuovendo codice non necessario - Disabilitato sticky headers in AgendaView per UX più fluida Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…sk cliccando sul calendario, poi messo il calendario nellos screen con Calendar.tsx facendo scegliere all`utente che visualizzaione del calendario vuole avere
…CalendarView Sostituito il rendering custom dei task con il componente Task riutilizzabile, aggiungendo gli handler per completamento, modifica ed eliminazione. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ter login - Add isSaving flag to prevent concurrent recursive calls - Create _saveTasksDirect() method for direct cache writes without comparison - Create _getCachedTasksRaw() method to read cache without triggering deduplication - getCachedTasks() now uses _saveTasksDirect() for duplicate cleanup - saveTasks() now uses _getCachedTasksRaw() for comparison - Add finally block to always reset the saving flag This fixes the infinite loop that occurred when: 1. saveTasks() called getCachedTasks() to compare tasks 2. getCachedTasks() found duplicates and called saveTasks() to clean cache 3. This created an infinite recursive loop causing the app to freeze
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.
Summary
This PR fixes a critical bug that caused the app to freeze in an infinite loop after manual login.
Problem
There was a recursive infinite loop in
TaskCacheService:saveTasks()calledgetCachedTasks()to compare tasksgetCachedTasks()found duplicates and calledsaveTasks()to clean cacheSolution
isSavingflag to prevent concurrent recursive calls_saveTasksDirect()method for direct cache writes without comparison_getCachedTasksRaw()method to read cache without triggering deduplicationgetCachedTasks()now uses_saveTasksDirect()for duplicate cleanupsaveTasks()now uses_getCachedTasksRaw()for comparisonfinallyblock to always reset the saving flagTesting