-
Notifications
You must be signed in to change notification settings - Fork 3
Development Tasks
Use this page when the task is phrased as "I want to change X" and you need the likely files and checks.
Start with:
mac-app/PDFReaderView.swiftmac-app/PDFPagingPolicy.swiftmac-app/ReaderContentBackend.swiftmac-app/ReaderWindowController+Navigation.swift
Run:
./scripts/check.sh --no-buildWatch for:
- Duplicate page turns after one scroll gesture.
- Losing native PDFKit scroll or rubber-band behavior.
- Thresholds that work for short pages but fail on long technical books.
- Bypassing the typed reader backend from shared navigation or zoom commands.
Start with:
mac-app/PDFDocumentTextSnapshot.swiftmac-app/PDFDocumentAgentIndex.swiftmac-app/ReaderWindowController+PDFTextSnapshot.swiftmac-app/ReaderWindowController+VocabularyHighlights.swiftmac-app/TextQuoteAnchor.swiftmac-app/WordRecordSQLiteRowMapper.swiftmac-app/WordRecordSQLiteStore.swift
Run:
./tests/run.sh
./scripts/check.sh --no-build
./scripts/build_app.shWatch for:
- Materializing annotations for every PDF page instead of only visible pages.
- Letting a stale annotation batch or text snapshot mutate a replacement document.
- Reusing cached PDF text after source bytes change while path, timestamp, or size stay unchanged.
- Continuing background PDF extraction or indexing during active scrolling, zooming, or page turns.
- Changing the text normalization used by an anchor without a versioned compatibility policy.
- Adding SQLite anchor fields without keeping select columns, decode indexes, insert columns, and bindings aligned.
- Dropping the stored-rectangle fallback required by vocabulary records created before semantic anchors existed.
Start with:
mac-app/DocumentLoading.swiftmac-app/DocumentLoading+Archive.swiftmac-app/DocumentLoading+DOCXStreaming.swiftmac-app/DocumentLoading+DOCXCache.swiftmac-app/DOCXPreparedCache.swiftmac-app/ReaderWindowController+DocumentLoading.swiftmac-app/Resources/reader-web-text.jsmac-app/Resources/reader-web-marks.jsmac-app/Resources/reader-web-search.js
Run:
./tests/run.sh
./scripts/check.sh --no-build
./scripts/build_app.shWatch for:
- A superseded EPUB or DOCX load mutating the current document or leaving temporary resources behind.
- Reusing prepared DOCX output after the source bytes change, even when path, size, or timestamp are unchanged.
- Publishing an incomplete DOCX cache entry after cancellation or extraction failure.
- Extracting unrelated DOCX package entries or letting prepared cache data exceed its byte quota.
- Letting concurrent DOCX builders replace a complete cache entry with partial output.
- Forgetting to invalidate normalized Web text indexes after a DOM text mutation.
- Relying on CSS Custom Highlight without retaining the DOM-span fallback required by older WebKit versions.
- Starting PDF table-of-contents, cover, or persisted-mark restoration before the first visible reader update.
Start with:
mac-app/AIChatPanel+Actions.swiftmac-app/AIChatPanel+Requests.swiftmac-app/AIResponseTextFormatter.swiftmac-app/AIPromptStore.swiftmac-app/AIPrompts.json
Run:
./scripts/check.sh --no-buildWatch for:
- Streaming text being rendered before hidden reasoning text is stripped.
- Long selected text producing oversized bubble titles.
- Translation chunks losing paragraph spacing or indentation.
Start with the local surface that owns the controls, then check the shared theme helpers:
mac-app/ReaderTheme.swiftmac-app/ReaderTheme+Palette.swiftmac-app/ReaderWindowController+Theme.swiftmac-app/AIChatPanel+BubbleStyling.swiftmac-app/ReadingNotePanelController+Theme.swiftmac-app/ReadingNotesPanelController.swiftmac-app/AISettingsPanelController+Theme.swiftmac-app/ExportPanelSupport.swift
Run:
./scripts/check.sh --no-build
./scripts/check_ui_theme.sh --warnings-as-errors
./scripts/check_ui_accessibility.sh
./scripts/build_app.shbuild_app.sh defaults to --debug --arm64 for faster daily iteration. Use ./scripts/build_app.sh --release --universal only when checking release-style architecture output.
UI rule:
- Every new visible control must define or inherit colors for all reader modes: original, eyeCare, and dark.
- Icon-only buttons must set
contentTintColorfrom the active theme, not a fixed system color. - Icon-only buttons must pass localized text into both the symbol accessibility description and the control accessibility label.
- Controls created after startup must use the current theme at creation time and must also be updated by the surface's theme refresh path.
- If a control is inside a dynamic row, bubble, note, or popup accessory view, theme refresh must walk existing subviews and update it.
- Save panels and other macOS accessory views should hide irrelevant system fields, such as tags, when they are not part of the app workflow.
-
./scripts/check_ui_theme.shfails high-confidence icon tint misses by default; fixedNSColor(...)usage is reported as warning unless--warnings-as-errorsis passed.
Watch for:
- Adding a button that looks correct on first render but does not change after switching to eyeCare or dark mode.
- Updating text colors but missing SF Symbol tint, border color, hover/background color, or disabled state.
- Styling only the app-level toolbar while leaving AI bubbles, reading notes, settings, or export panels on their previous colors.
- Introducing a new themed control without adding it to the relevant
setTheme,applyTheme, orrestyle...traversal.
Start with:
mac-app/ReaderWindowController+Embedding*.swiftmac-app/PDFDocumentAgentIndex.swiftmac-app/PDFEmbeddingStore.swiftmac-app/EmbeddingClient.swiftmac-app/AISettingsPanelController+ModelEmbedding.swift
Run:
./scripts/check.sh --no-buildWatch for:
- Re-indexing too eagerly when cached chunks are still valid.
- UI status becoming stale after pause, cancel, failure, or theme change.
- Retrieval returning incomplete evidence without warning the user.
Start with:
mac-app/ReaderWindowController+VocabularyReviewUI.swiftmac-app/ReaderWindowController+VocabularyReviewSRS.swiftmac-app/ReaderWindowController+VocabularyReviewQueue.swiftmac-app/VocabularySRS.swiftmac-app/WordRecordSQLiteStore.swift
Run:
./scripts/check.sh --no-buildWatch for:
- Accidentally deleting user vocabulary data.
- Review queue order changing without updating SRS tests.
- PDF and EPUB/DOCX records diverging.
Start with:
mac-app/SpeechPlaybackCoordinator.swiftmac-app/SpeechRuntimeResourceManager.swiftmac-app/AISettingsPanelController+Speech.swiftmac-app/AISettingsPanelController+Build.swiftmac-app/ReaderWindowController+ReadAloud.swiftmac-app/ReaderWindowController+ReadAloudProgress.swift
Current model/runtime notes:
- Piper is the macOS 12+ local read-aloud runtime.
- Kokoro can be downloaded on older systems, but requires macOS 14+ to run.
- See
docs/wiki/tts.mdfor the full TTS code map, runtime rules, and release packaging notes.
Run:
./tests/run.sh
./scripts/build_app.sh --release --universal
./scripts/audit_app_bundle.shWatch for:
- Letting users select a model that is downloaded but has no runnable backend.
- Reintroducing Python/MLX dependencies into the app bundle.
- Keeping more than one local TTS model loaded in memory.
- Breaking EPUB/PDF temporary read-aloud highlighting.
Start with:
mac-app/RecentDocumentsPanelController.swiftmac-app/RecentDocumentsPanelController+Actions.swiftmac-app/RecentDocumentsPanelController+Cards.swiftmac-app/RecentDocumentsStore.swiftmac-app/ReaderWindowController+DocumentShelf.swift
Run:
./scripts/check.sh --no-buildWatch for:
- Moved files losing stable identity.
- Replacement content inheriting state because identity uses only path, size, or modification time.
- Sorting or import behavior changing without test coverage.
- Shelf actions clearing the wrong document data.
Start with:
mac-app/UserDataBackupModels.swiftmac-app/UserDataBackupService.swiftmac-app/UserDataBackupService+Restore.swiftmac-app/AppDelegate+UserDataBackup.swiftmac-app/LocalEncryptedStore.swiftmac-app/EmbeddingClient.swift
Run:
./tests/run.sh
./scripts/check.sh --no-build
./scripts/check_ui_theme.sh --warnings-as-errors
./scripts/build_app.shWatch for:
- Including API keys, legacy credential preference fields, caches, model downloads, or document text caches in a backup.
- Restoring SQLite files after store singletons have opened them; restore must run during cold startup.
- Accepting undeclared files, symbolic links, escaping paths, excessive entry counts, oversized payloads, checksum mismatches, or failed SQLite integrity checks.
- Applying only part of a restore without retaining a durable rollback journal.
- Deleting current-machine credentials while applying preferences from another backup.
- Reading Keychain merely because the reader opened a document, selected text, or scheduled automatic background work.
Start with:
docs/wiki/release-checklist.mddocs/wiki/release-runbook.mdscripts/release_pkg.shscripts/publish_release.shdocs/appcast.xmldocs/index.html
Run:
./scripts/check.sh
./scripts/update_wiki.sh --pushWatch for:
- Version references disagreeing between
Info.plist,README.md, website, and appcast. - Package signing or notarization failures.
- Pushing an appcast before the referenced GitHub Release asset is public and checksum-verified.
- Leaving a draft release or remote tag behind after a pre-publication failure.
- Sparkle update check failing after publishing.
Related: Home · Feature Map · Development Tasks · Code Map · Type Index
Maintained by ./scripts/update_wiki.sh.