212 Commits

Author SHA1 Message Date
318ee868e4 updated release notes 2025-12-12 13:19:34 +01:00
a227c275f3 feat: Implement extended font system and offline sync improvements
- Add 10 new fonts (Literata, Merriweather, Source Serif, Lato, Montserrat, Source Sans)
- Support Apple system fonts and Google Fonts (OFL 1.1 licensed)
- Extend FontFamily enum with new fonts and categories
- Update FontSettingsViewModel and WebView with font support
- Force WebView reload when font settings change
- Refactor OfflineSyncManager with protocol and improved error handling
- Add test mocks and OfflineSyncManagerTests with 9 test cases
- Add OpenSourceLicensesView and FontDebugView
- Bump build number
- Update localization strings
2025-12-10 21:25:39 +01:00
75200e472c refactor: Extract endpoint normalization to reusable EndpointValidator 2025-12-05 11:22:58 +01:00
ab88f2f83f fix: Wrap debugSettingsSection in #if DEBUG 2025-12-05 10:25:23 +01:00
e085153d92 Merge branch 'offline-sync' into develop 2025-12-05 09:23:18 +01:00
c5d804e3f7 feat: Add i18n support for offline reading feature 2025-12-05 09:19:04 +01:00
05e79d763e chore: Update file author credits to Ilyas Hallak 2025-12-01 22:10:41 +01:00
358037427c refactor: Remove unused stripHTMLSimple method from StringExtensions
- Remove stripHTMLSimple regex-based HTML stripping method
- Keep stripHTML with NSAttributedString-based implementation (used in codebase)
- Method was not used anywhere in the project
2025-12-01 22:06:52 +01:00
fcf6c3e441 feat: Add debug menu and image diagnostics, improve test coverage
- Add DebugMenuView with network simulation, offline cache management, and Core Data reset
- Add OfflineImageDebugView for diagnosing offline image loading issues
- Implement debug diagnostics for cached articles and hero image caching
- Add cache info display (size, article count) in debug menu
- Add shake gesture detection for debug menu access
- Fix LocalBookmarksSyncView callback syntax in PhoneTabView
- Clean up StringExtensionsTests by removing stripHTMLSimple tests and performance tests
- Remove SnapshotHelper import from readeckUITests.swift
- Remove snapshot testing code from readeckUITests
- Add comprehensive test cases for edge cases (malformed HTML, Unicode, newlines, lists)
2025-12-01 22:03:19 +01:00
8dc5f3000a feat: Add annotations, cache management, and offline feature improvements
- Add annotation creation to API and repository layer (AnnotationsRepository)
- Add DtoMapper for AnnotationDto to domain model conversion
- Extend PAnnotationsRepository protocol with createAnnotation method
- Add cache management to SettingsRepository (getCacheSize, getMaxCacheSize, updateMaxCacheSize, clearCache)
- Extend PSettingsRepository protocol with cache settings methods
- Use localized Highlight label in annotation overlay JavaScript for WebView and NativeWebView
- Improve API error handling with detailed logging for HTTP errors and response data
- Add LocalizedError extension for APIError with human-readable descriptions
- Update localization strings for German and English (Highlight, Synchronization, VPN warning)
- Update RELEASE_NOTES.md with version 2.0.0 offline reading feature details
2025-12-01 22:01:23 +01:00
4fd55ef5d0 Refactor settings to use Clean Architecture with ViewModels
- Add cache settings UseCases (get/update size, clear cache)
- Create CacheSettingsViewModel and OfflineSettingsViewModel
- Replace direct UserDefaults access with repository pattern
- Add CachedArticlesPreviewView for viewing offline articles
- Integrate offline settings into main SettingsContainerView
- Wire up new UseCases in factory pattern
2025-12-01 21:56:13 +01:00
d3e15c6352 Add unit tests for offline reading features 2025-12-01 21:50:42 +01:00
90ced9ba0c Add offline reading feature documentation 2025-12-01 21:48:58 +01:00
6fa262655f Rename documentation folder to docs and move FONT_SYSTEM_PLAN.md 2025-12-01 21:45:15 +01:00
39bb82ee3e Migrate offline settings from UserDefaults to CoreData
Move offline reading settings from JSON-based UserDefaults storage to CoreData SettingEntity for consistency with other app settings.

Changes:
- Add offline settings fields to SettingEntity (offlineEnabled, offlineMaxUnreadArticles, offlineSaveImages, offlineLastSyncDate)
- Update SettingsRepository to use CoreData instead of UserDefaults for offline settings
- Use consistent async/await pattern with withCheckedThrowingContinuation
- Remove JSON encoding/decoding in favor of direct CoreData properties

Benefits:
- Unified settings storage in CoreData
- Type-safe property access
- Automatic migration support
- No redundant UserDefaults entries
2025-12-01 21:43:29 +01:00
b9f8e11782 Refactor offline sync to enforce Clean Architecture
Refactorings:
- Extract HTMLImageEmbedder and HTMLImageExtractor utilities
- Create UseCases for cached data access (GetCachedBookmarksUseCase, GetCachedArticleUseCase)
- Create CreateAnnotationUseCase to remove API dependency from ViewModel
- Simplify CachedAsyncImage by extracting helper methods
- Fix Kingfisher API compatibility (Source types, Result handling)
- Add documentation to OfflineCacheSyncUseCase
- Remove unused TestView from production code

Enforces Clean Architecture:
- ViewModels now only use UseCases, no direct Repository or API access
- All data layer access goes through Domain layer
2025-11-30 19:12:51 +01:00
305b8f733e Implement offline hero image caching with custom cache keys
Major improvements to offline reading functionality:

**Hero Image Offline Support:**
- Add heroImageURL field to BookmarkEntity for persistent storage
- Implement ImageCache-based caching with custom keys (bookmark-{id}-hero)
- Update CachedAsyncImage to support offline loading via cache keys
- Hero images now work offline without URL dependency

**Offline Bookmark Loading:**
- Add proactive offline detection before API calls
- Implement automatic fallback to cached bookmarks when offline
- Fix network status initialization race condition
- Network monitor now checks status synchronously on init

**Core Data Enhancements:**
- Persist hero image URLs in BookmarkEntity.heroImageURL
- Reconstruct ImageResource from cached URLs on offline load
- Add extensive logging for debugging persistence issues

**UI Updates:**
- Update BookmarkDetailView2 to use cache keys for hero images
- Update BookmarkCardView (all 3 layouts) with cache key support
- Improve BookmarksView offline state handling with task-based loading
- Add 50ms delay for network status propagation

**Technical Details:**
- NetworkMonitorRepository: Fix initial status from hardcoded true to actual network check
- BookmarksViewModel: Inject AppSettings for offline detection
- OfflineCacheRepository: Add verification logging for save/load operations
- BookmarkEntityMapper: Sync heroImageURL on save, restore on load

This enables full offline reading with hero images visible in bookmark lists
and detail views, even after app restart.
2025-11-28 23:01:20 +01:00
c3ac7cc6a8 bumped version 2025-11-21 22:12:54 +01:00
59acfa79ac Remove extra blank lines in ReadingSettingsView 2025-11-21 22:10:44 +01:00
6de413376f Clean up documentation and remove debug settings
- Move documentation files from root to docs/ folder
- Remove DEBUG-only settings from ReadingSettingsView (Safari Reader Mode, Auto-mark as read)
2025-11-21 22:07:41 +01:00
d7fcacfd34 Update App Store screenshots for version 1.2.0 2025-11-21 22:05:50 +01:00
e4657aa281 Fix offline reading bugs and improve network monitoring (Phase 5)
Bugfixes:
- Add toggle for offline mode simulation (DEBUG only)
- Fix VPN false-positives with interface count check
- Add detailed error logging for download failures
- Fix last sync timestamp display
- Translate all strings to English

Network Monitoring:
- Add NetworkMonitorRepository with NWPathMonitor
- Check path.status AND availableInterfaces for reliability
- Add manual reportConnectionFailure/Success methods
- Auto-load cached bookmarks when offline
- Visual debug banner (green=online, red=offline)

Architecture:
- Clean architecture with Repository → UseCase → ViewModel
- Network status in AppSettings for global access
- Combine publishers for reactive updates
2025-11-21 21:37:24 +01:00
fdc6b3a6b6 Add offline reading UI and app integration (Phase 4 & 5)
Phase 4 - Settings UI:
- Add OfflineSettingsViewModel with reactive bindings
- Add OfflineSettingsView with toggle, slider, sync button
- Integrate into SettingsContainerView
- Extend factories with offline dependencies
- Add debug button to simulate offline mode (DEBUG only)

Phase 5 - App Integration:
- AppViewModel: Auto-sync on app start with 4h check
- BookmarksViewModel: Offline fallback loading cached articles
- BookmarksView: Offline banner when network unavailable
- BookmarkDetailViewModel: Cache-first article loading
- Fix concurrency issues with CurrentValueSubject

Features:
- Background sync on app start (non-blocking)
- Cached bookmarks shown when offline
- Instant article loading from cache
- Visual offline indicator banner
- Full offline reading experience

All features compile and build successfully.
2025-11-18 17:44:43 +01:00
f5dab38038 Add offline cache infrastructure with clean architecture
Create separate cache repository layer:
- Add POfflineCacheRepository protocol for cache operations
- Add OfflineCacheRepository with CoreData and Kingfisher
- Add OfflineCacheSyncUseCase to coordinate sync workflow
- Update PBookmarksRepository to focus on API calls only
- Extend BookmarkEntityMapper with toDomain() conversion

UseCase coordinates between cache, API, and settings repositories
following dependency inversion principle.
2025-11-17 23:53:44 +01:00
24dba33b39 Merge branch 'develop' into offline-sync 2025-11-17 18:20:24 +01:00
b98c71b8b3 Replace outdated CHANGELOG.md with RELEASE_NOTES.md references
- Remove outdated CHANGELOG.md file
- Update README.md links to point to the more current RELEASE_NOTES.md
- RELEASE_NOTES.md contains detailed version history and feature descriptions
2025-11-10 21:32:32 +01:00
a3b3863fa3 Refactor tag management system with improved search and real-time sync
- Add CreateLabelUseCase for consistent label creation across app and extension
- Implement TagRepository for Share Extension to persist new labels to Core Data
- Enhance CoreDataTagManagementView with real-time search functionality
- Add automatic tag synchronization on app startup and resume
- Improve Core Data context configuration for better extension support
- Unify label terminology across UI components (tags -> labels)
- Fix label persistence issues in Share Extension
- Add immediate Core Data persistence for newly created labels
- Bump version to 36
2025-11-10 21:29:38 +01:00
c4cd3a0dc3 Add foundation layer for offline article caching
Implement data layer infrastructure for Offline Reading feature (Stage 1):
- Add OfflineSettings model with 4-hour sync interval
- Extend BookmarkEntity with cache fields (htmlContent, cachedDate, imageURLs, etc.)
- Add offline cache methods to BookmarksRepository with Kingfisher image prefetching
- Extend SettingsRepository with offline settings persistence
- Add PSettingsRepository protocol with offline methods
- Implement FIFO cleanup for cached articles
2025-11-08 23:15:17 +01:00
e4121aa066 Add implementation tracking and planning documents
- Offline-Konzept.md: Multi-level offline strategy (3 stages)
- Offline-Stufe1-Implementierung.md: Detailed implementation plan for stage 1
- Offline-Stufe1-Implementation-Tracking.md: Day-by-day tracking with checkboxes

These documents will guide the offline sync implementation over multiple days
2025-11-08 23:15:17 +01:00
db0ce09b4c Add sync category to Logger
- Add LogCategory.sync for offline sync operations
- Add Logger.sync static property for easy access
2025-11-08 23:15:17 +01:00
4134b41be2 Fix tag scrolling and improve debug logging
- Fix duplicate ID warning in CoreDataTagManagementView by using objectID
- Enhance debug logging system with category filtering
2025-11-08 19:18:56 +01:00
e5d4e6d8a0 Fix tag scrolling and improve debug logging
- Fix duplicate ID warning in CoreDataTagManagementView by using objectID
- Enhance debug logging system with category filtering
2025-11-08 19:18:41 +01:00
4b788650b8 Redesign settings screen with native iOS style
- Move font settings to dedicated detail screen with larger preview
- Add inline explanations directly under each setting
- Reorganize sections: split General into Reading Settings and Sync Settings
- Combine Legal, Privacy and Support into single section
- Move "What's New" to combined Legal/Privacy/Support section
- Redesign app info footer with muted styling and center alignment
- Remove white backgrounds from font preview for better light/dark mode support
2025-11-08 19:12:08 +01:00
f3719fa9d4 Refactor tag management to use Core Data with configurable sorting
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
2025-11-08 13:46:40 +01:00
460b05ef34 Add delete annotation feature with swipe gesture
Implemented ability to delete annotations via swipe-to-delete gesture in the annotations list view. Added close button with X icon to dismiss the annotations sheet.

Changes:
- Added DeleteAnnotationUseCase with repository integration
- Extended API with DELETE endpoint for annotations
- Implemented swipe-to-delete in AnnotationsListView
- Added error handling and optimistic UI updates
- Updated toolbar with close button (X icon)
2025-11-01 14:03:39 +01:00
7338db5fab Improve debug logging system
- Redesign logging configuration UI with cleaner list-based navigation
- Replace segmented controls with detailed selection screens for better UX
- Add in-app debug log viewer with filtering and search capabilities
- Implement opt-in logging toggle to reduce device performance impact
- Add log storage system with 1000 entry limit
- Enable log export via share sheet
- Show warning banner when logging is disabled
2025-11-01 13:54:40 +01:00
4b93c605f1 Redesign settings screen with native iOS style
- 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
2025-10-31 23:39:59 +01:00
589fcdb2b4 Bump build version to 33 2025-10-30 22:39:38 +01:00
4e973751f4 Simplify release notes for regular users 2025-10-30 22:27:14 +01:00
571d61c8e5 Update release notes for markdown rendering improvement 2025-10-30 21:54:02 +01:00
05ae421a40 Add MarkdownUI package and cleanup project structure
- Add swift-markdown-ui package dependency (v2.4.1)
- Remove old Logger.swift (moved to Utils/Logger.swift)
- Remove RELEASE_NOTES.md from Resources (moved to UI/Resources)
- Update German localization strings for settings sections
- Bump build version to 32
2025-10-30 21:50:33 +01:00
85bad35788 Refactor release notes to use MarkdownUI library
- Create MarkdownContentView to encapsulate MarkdownUI rendering
- Replace custom AttributedString markdown parsing with MarkdownUI
- Simplify ReleaseNotesView by removing manual markdown styling
- Improve markdown rendering with proper support for lists, links, and formatting
- Make markdown rendering easily replaceable by keeping it in a dedicated view
2025-10-30 21:48:28 +01:00
db3cbf41d4 Fix URL label translation and formatting
- Add localization keys for "open_url" and "open_original_page" in EN/DE
- Create URLUtil.openUrlLabel() helper function for consistent formatting
- Replace incorrect string concatenation with proper localized labels
- Fix: "example.comopen" now displays as "Open example.com" (EN) or "example.com öffnen" (DE)
- Update BookmarkDetailLegacyView, BookmarkDetailView2, and BookmarkCardView
2025-10-30 21:14:40 +01:00
cdfa6dc4c5 Fix annotation navigation by scrolling outer ScrollView instead of WebView
The JavaScript was executing scrollIntoView() but the WebView itself cannot
scroll (isScrollEnabled = false). Fixed by calculating the annotation's Y
position in the WebView and scrolling the outer ScrollView to the correct
position instead.

Changes:
- WebView.swift: Added onScrollToPosition callback and scrollToPosition
  message handler. JavaScript now calculates and sends annotation position
  to Swift instead of using scrollIntoView().
- NativeWebView.swift: Same changes for iOS 26+ with polling mechanism for
  window.__pendingScrollPosition.
- BookmarkDetailLegacyView.swift: Implemented onScrollToPosition callback
  that calculates final scroll position (header height + annotation position)
  and scrolls the outer ScrollView.
- BookmarkDetailView2.swift: Same implementation as BookmarkDetailLegacyView.
2025-10-30 21:07:13 +01:00
87464943ac bumped build version and version 2025-10-29 22:12:02 +01:00
2dec340c85 Merge branch 'develop' of https://github.com/ilyas-hallak/readeck-ios into develop 2025-10-29 22:10:06 +01:00
9edf984be1 Merge branch 'main' into develop 2025-10-29 22:09:10 +01:00
c610fda731 bumped build version to 30 2025-10-29 22:08:52 +01:00
293ac87b7c Merge branch 'main' into develop 2025-10-29 22:05:16 +01:00
e6a884b160 bumped build version to 30 2025-10-29 22:04:04 +01:00