- LibraryDetailPage source list: Route.materialDetail → Route.materialReader
- KnowledgeSource: add fileId field for COS download
- MaterialReaderView: add COS download fallback in .task
- MaterialReaderView: add resolvedPath for downloaded file
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- MaterialDetailView: remove 阅读原文件, 问这份资料, 开始学习 buttons
- MaterialReaderView: add 开始学习 toolbar button
- MaterialDetailView now serves as info page accessible from reader
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
KnowledgeItem is AI-generated artifact, should be read-only.
Removes: AI对话, 学习, 编辑, 加入复习, 收藏 from toolbar Menu.
Keeps: 笔记, 预览 (reading functions).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Use uploadDataWithKey to get fileId + objectKey
- Call KnowledgeSourceService.add() instead of DocumentImportService.create()
- Creates both KnowledgeSource and DocumentImport in one call
- Add missing fields to AddSourceRequest and KnowledgeSourceService.add()
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Set isLoadingSources = true initially to show spinner
- Load KnowledgeBase detail in appear() for header
- Prevents blank screen before data loads
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Set detailTab default to 1 (sources view)
- Load sources on appear via .task
- Refreshable reloads sources
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Knowledge items are AI-generated artifacts from source parsing, not
manually created entries. Route to ImportPage instead of AddKnowledgePage.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Wraps each KnowledgeSource row in NavigationLink to MaterialDetailView.
Previously sources were display-only with no tap action.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Blue gradient button at bottom of plain text content view.
Writes content to temp .md file and navigates to MaterialReaderView,
which triggers reading event collection.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Protocol conformance: list→listAll with extension defaults
- ContinueLearningResponse has no lastPosition→use nil
- LearningSession has no readingTargetType/materialId→use defaults
- Color.zxBlue→Color.blue, Color.zxIndigo→Color.indigo
- Shadowed max parameter→Swift.max
- ForEach Identifiable→explicit id: \.id
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- ReadingRuntimeAdapter: clearExportedEvents is void, return count separately
- ActivityViewModel: FocusItemServicing.list→listAll, add days/type? params
- ActivityViewModelTests: update mocks to match new protocol signatures
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- en.lproj/Localizable.strings: English translations
- ja.lproj/Localizable.strings: Japanese translations
- Covers common, navigation, reader, progress, analysis, study, AI
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add 5 service protocols (ActivityServicing, FocusItemServicing,
ReadingContinueServicing, LearningStatusServicing)
- ViewModel init supports DI with defaults to .shared
- Mock services for all 10 parallel calls in loadAll/refresh
- 20 tests: initial state, summary/focus/heatmap/streak/trends/recos,
learningSummary/readingTrend/continueReading/recentRecords,
errorMessage on nil summary, refresh clears error
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add resolveKnowledgeSource path test (knowledge_sources/<id>/)
- Add empty knowledge_sources directory test
- Add .txt→text and .epub→epub type inference
- Add .png/.jpg/.jpeg/.webp→image inference
- Remove misleading test that only asserted nil
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add test_markRetry_works_with_queue_item_id (uses queue UUID not eventId)
- Update test_markDead_after_max_retries to use queue item id from batch
- Fixes review finding: tests previously only used eventId, not queue UUID
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add ReadingContextRegistry for SessionManager→Pipeline context sharing
- Wire registry into SessionManager (register on open, unregister on close)
- Fix Pipeline to auto-pull from registry when contexts not provided
- Fix ScenePhase to not pass empty contexts
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>