This commit introduces a comprehensive refactoring of the tag management
system, replacing the previous API-based approach with a Core Data-first
strategy for improved performance and offline support.
Major Changes:
Tag Management Architecture:
- Add CoreDataTagManagementView using @FetchRequest for reactive updates
- Implement cache-first sync strategy in LabelsRepository
- Create SyncTagsUseCase following Clean Architecture principles
- Add TagSortOrder enum for configurable tag sorting (by count/alphabetically)
- Mark LegacyTagManagementView as deprecated
Share Extension Improvements:
- Replace API-based tag loading with Core Data queries
- Display top 150 tags sorted by usage count
- Remove unnecessary label fetching logic
- Add "Most used tags" localized title
- Improve offline bookmark tag management
Main App Enhancements:
- Add tag sync triggers in AddBookmarkView and BookmarkLabelsView
- Implement user-configurable tag sorting in settings
- Add sort order indicator labels with localization
- Automatic UI updates via SwiftUI @FetchRequest reactivity
Settings & Configuration:
- Add TagSortOrder setting with persistence
- Refactor Settings model structure
- Add FontFamily and FontSize domain models
- Improve settings repository with tag sort order support
Use Case Layer:
- Add SyncTagsUseCase for background tag synchronization
- Update UseCaseFactory with tag sync support
- Add mock implementations for testing
Localization:
- Add German and English translations for:
- "Most used tags"
- "Sorted by usage count"
- "Sorted alphabetically"
Technical Improvements:
- Batch tag updates with conflict detection
- Background sync with silent failure handling
- Reduced server load through local caching
- Better separation of concerns following Clean Architecture
- Refactor all settings views to use List with .insetGrouped style
- Create reusable SettingsRow components for consistent UI
- Separate onboarding flow into dedicated OnboardingServerView
- Consolidate font, theme, and card layout into unified Appearance section
- Add visual card layout previews in dedicated selection screen
- Move "Open links in" option to Appearance with descriptive footer
- Improve settings organization and native iOS feel
- Move server check from init to onAppResume() in AppViewModel
- Add scenePhase observer in readeckApp
- Check only when app becomes active (.active phase)
- Respects 30s cache - won't call API if recently checked
- Replace ServerConnectivity with CheckServerReachabilityUseCase
- Add InfoApiClient for /api/info endpoint
- Implement ServerInfoRepository with 30s cache TTL and 5s rate limiting
- Update ShareBookmarkViewModel to use ShareExtensionServerCheck manager
- Add server reachability check in AppViewModel on app start
- Update OfflineSyncManager to use new UseCase
- Extend SimpleAPI with checkServerReachability for Share Extension
- Add AppViewModel to manage app-level state and handle 401 responses
- Implement automatic logout when API returns 401 Unauthorized
- Add persistent logout state using existing hasFinishedSetup flag
- Move NavigationStack outside TabView to enable automatic TabBar hiding
- Update API classes to send UnauthorizedAPIResponse notifications
- TabBar now hides automatically when navigating to detail views
Add comprehensive offline bookmark support with sync capabilities:
- Implement offline bookmark storage using Core Data with App Group sharing
- Add Share Extension support for saving bookmarks when server unavailable
- Create LocalBookmarksSyncView for managing offline bookmark queue
- Add OfflineSyncManager for automatic and manual sync operations
- Implement ServerConnectivity monitoring and status handling
- Add badge notifications on More tab for pending offline bookmarks
- Fix tag pagination in Share Extension with unique IDs for proper rendering
- Update PhoneTabView with event-based badge count updates
- Add App Group entitlements for data sharing between main app and extension
The offline system provides seamless bookmark saving when disconnected,
with automatic sync when connection is restored and manual sync options.
- Added search functionality to BookmarkLabelsView with real-time filtering
- Implemented custom tag creation with smart suggestions
- Unified search and tag selection in ShareBookmarkView
- Added keyboard toolbar with 'Done' button for extensions
- Implemented notification-based keyboard dismissal for extensions
- Added pagination logic to ShareBookmarkViewModel
- Created selected tags section with remove functionality
- Improved UX with consistent tag management across views
- Added proper keyboard handling for iOS extensions
- Implemented a toggle for the 'Read Aloud' (TTS) feature in the general settings.
- Refactored AppSettings and PlayerUIState to support TTS enable/disable.
- Updated BookmarkDetailView, PadSidebarView, PhoneTabView, and GlobalPlayerContainerView to respect the TTS setting.
- Added new RButton component for consistent button styling.
- Improved LabelsView to support tag selection on iPad and iPhone.
- Updated SettingsGeneralView and SettingsGeneralViewModel for new TTS logic and removed unused app info code.
- Added app info section to SettingsContainerView.
- Updated SettingsServerView to use English labels and messages.
- Refactored SpeechPlayerViewModel to only initialize TTS when enabled.
- Updated Core Data model to include enableTTS in SettingEntity.
- Removed obsolete files (PersistenceController.swift, old PlayerUIState).
- Various bugfixes, code cleanups, and UI improvements.
- Move and replace utility files (SafariUtil, SpeechQueue, StringExtensions, TTSManager, VoiceManager)
- Refactor and extend SpeechPlayer components (UI, progress, volume, queue)
- Improved state and EnvironmentObject management (PlayerUIState)
- UI and logic optimizations in menu and tab views
- Remove obsolete and duplicate files
- General code and UX improvements
- Split TabView and Sidebar logic into PhoneTabView, PadSidebarView, SidebarTab, and BookmarkState for better device adaptation
- Remove old SettingsViewModel, introduce SettingsGeneralViewModel and SettingsServerViewModel for modular settings
- Update BookmarksView and BookmarksViewModel for new paginated and filtered data model
- Clean up and modularize settings UI (SettingsGeneralView, SettingsServerView, FontSettingsView)
- Remove obsolete files (old TabView, File.swift, SettingsViewModel, etc.)
- Add BookmarksPageDto and update related data flow
- Various UI/UX improvements and code cleanup
BREAKING: Settings and navigation structure refactored, old settings logic removed
- Add ShareViewController with complete URL extraction logic
- Support URL sharing from Safari, Chrome and other apps
- Extract URLs from different content types (URL, plain text, property list)
- Implement direct API call to create bookmarks from share extension
- Add Core Data integration to fetch authentication token
- Include proper error handling and user feedback with alerts
- Support title extraction and user text input for bookmark creation
Technical implementation:
- Handle UTType.url, UTType.plainText, and UTType.propertyList
- Async/await pattern for API requests
- NSDataDetector for URL extraction from text
- Property list parsing for Safari-style sharing
- Loading and success/error alerts for better UX
- Add BookmarkState enum with unread, favorite, and archived states
- Extend API layer with query parameter filtering for bookmark states
- Update Bookmark domain model to match complete API response schema
- Implement BookmarkListView with card-based UI and preview images
- Add BookmarkListViewModel with state management and error handling
- Enhance BookmarkDetailView with meta information and WebView rendering
- Create comprehensive DTO mapping for all bookmark fields
- Add TabView with state-based bookmark filtering
- Implement date formatting utilities for ISO8601 timestamps
- Add progress indicators and pull-to-refresh functionality
- API-Klasse mit allen CRUD-Operationen für Bookmarks
- Login/Authentifizierung mit Bearer Token
- Bookmarks abrufen (Liste und Details)
- Artikel-Inhalt abrufen
- DTO-Strukturen in separate Dateien aufgeteilt
- UserDto für Authentifizierung
- BookmarkDto für Bookmark-Listen
- BookmarkDetailDto mit vollständigen Metadaten
- MVVM-Architektur mit @Observable
- SettingsViewModel für Anmeldung
- BookmarksViewModel für Bookmark-Verwaltung
- SwiftUI Views mit modernem Design
- SettingsView mit Eingabefeldern und Validierung
- BookmarksView mit Pull-to-Refresh und Leerzustand
- MainTabView als Navigation
- Use Case Pattern implementiert
- LoginUseCase für Authentifizierung
- GetBookmarksUseCase für Datenabfrage
- DefaultUseCaseFactory für Dependency Injection
- Fehlerbehandlung und Loading States
- Protocol-basierte Architektur für bessere Testbarkeit