-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Discipline and source selections are stored in the session, which expires after 120 minutes of inactivity. Returning users must re-select everything. Persist selections to a local JSON file so they survive across sessions.
Context
The app already uses JSON file persistence for saved papers (SavedPapersRepository writes to storage/app/saved-papers.json). The same pattern can be applied to user selections.
What to do
- Create a
UserPreferencesRepositoryservice (similar pattern toSavedPapersRepository) - Store to
storage/app/user-preferences.json - Save: enabled disciplines + enabled sources per discipline
- Load preferences on app boot (or on mount of DisciplinePicker/SourcePicker)
- Keep session as the primary store during a session, but sync to JSON on save
- On session expiry, restore from JSON file
Files to modify/create
app/Services/UserPreferencesRepository.php(new)app/Livewire/DisciplinePicker.php(load/save)app/Livewire/SourcePicker.php(load/save)tests/Unit/UserPreferencesRepositoryTest.php(new)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request