Skip to content

fix: resolve recursive loop in TaskCacheService causing app freeze after login#14

Merged
Gabry848 merged 29 commits intomasterfrom
fatures/refined_voice_chat
Feb 9, 2026
Merged

fix: resolve recursive loop in TaskCacheService causing app freeze after login#14
Gabry848 merged 29 commits intomasterfrom
fatures/refined_voice_chat

Conversation

@Gabry848
Copy link
Copy Markdown
Collaborator

@Gabry848 Gabry848 commented Feb 9, 2026

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:

  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

Solution

  • Added isSaving flag to prevent concurrent recursive calls
  • Created _saveTasksDirect() method for direct cache writes without comparison
  • Created _getCachedTasksRaw() method to read cache without triggering deduplication
  • getCachedTasks() now uses _saveTasksDirect() for duplicate cleanup
  • saveTasks() now uses _getCachedTasksRaw() for comparison
  • Added finally block to always reset the saving flag

Testing

  • Login manually via the login page
  • Verify the app does not freeze
  • Verify tasks are loaded correctly

Gabry848 and others added 29 commits January 30, 2026 10:41
…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.
…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
@Gabry848 Gabry848 merged commit 22d6dba into master Feb 9, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant