# BookStax – Development Changelog ## Session 1 ### Architecture & Foundation - Full app architecture planned and implemented from scratch - Target: iOS 26.2, Xcode 26, Swift 6, `SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor` - Models: `BookStackError`, all API DTOs (`ShelfDTO`, `BookDTO`, `ChapterDTO`, `PageDTO`, etc.), SwiftData cache models - Services: `KeychainService` (actor), `ConnectivityMonitor` (@Observable), `BookStackAPI` (actor), `SyncService` - ViewModels: `OnboardingViewModel`, `LibraryViewModel`, `SearchViewModel`, `PageEditorViewModel` - Views: Full onboarding flow, library hierarchy, page reader (WebPage/WebView iOS 26), editor, search, settings, main tab view - Localisation: English, German, Spanish (`Localizable.strings`) - SwiftData model container, onboarding gate, Keychain credential loading wired in `bookstaxApp.swift` --- ## Session 2 ### Bug Fixes - **BookStackAPI filter syntax**: Fixed `book_id=X` → `filter[book_id]=X` for chapters and pages endpoints (BookStack API requirement) - **Color picker in Settings not responding**: Added `.buttonStyle(.plain)` to swatch buttons inside `Form` (SwiftUI list button style conflict) ### Localisation - **Search section fully translated**: Replaced all hardcoded English strings in `SearchView.swift` with `L()` keys - **`ContentType.displayName`**: Changed from hardcoded English to `NSLocalizedString` (required because `nonisolated` structs can't call `@MainActor`-isolated `L()`) - New localisation keys added to en/de/es: `search.loading`, `search.empty.title`, `search.empty.message`, `search.filter.all`, `search.type.page/book/chapter/shelf` ### Breadcrumb Navigation (Library) - Added `BookInShelf` wrapper struct (Hashable) to carry shelf context through `NavigationStack` - Added `Crumb` struct and `BreadcrumbBar` view (scrollable, tappable ancestor crumbs) - Breadcrumbs embedded as first `Section` in `List` (prevents large title collapse that occurred with `.safeAreaInset`) - `BooksInShelfView`: shows Library → Shelf crumbs, dismiss action on Library crumb - `BookDetailView`: shows Library → Shelf → Book crumbs, new `shelfName: String?` parameter - New `navigationDestination(for: BookInShelf.self)` in `LibraryView` --- ## Session 3 ### App Icon - Created three 1024×1024 app icon variants (light, dark, tinted) using provided artwork - **Light** (`AppIcon.png`): isometric purple BookStax books on white background - **Dark** (`AppIcon-dark.png`): same books on dark navy background (user-provided AI-generated image) - **Tinted** (`AppIcon-tinted.png`): greyscale version of dark icon for iOS tinted icon mode - `Contents.json` references all three variants with correct `luminosity` appearance entries - Icon files also saved as standalone copies in `bookstax/bookstax/` ### Build Fix - Fixed stray `t` character at top of `PageEditorView.swift` causing compile errors (`timport SwiftUI` → `import SwiftUI`)