Files
crosspoint-reader-mod/chat-summaries/2026-02-20_22-30-summary.md
cottongin dfbc931c14 mod: Phase 1 - bring forward mod-exclusive files with ActivityManager migration
Brings ~55 mod-exclusive files to the upstream-based mod/master-resync branch:

Activities (migrated to new ActivityManager pattern):
- Clock/Time: SetTimeActivity, SetTimezoneOffsetActivity, NtpSyncActivity
- Dictionary: DictionaryDefinitionActivity, DictionarySuggestionsActivity,
  DictionaryWordSelectActivity, LookedUpWordsActivity
- Bookmark: EpubReaderBookmarkSelectionActivity
- Book management: BookManageMenuActivity, EndOfBookMenuActivity
- OPDS: OpdsServerListActivity, OpdsSettingsActivity
- Utility: DirectoryPickerActivity, NumericStepperActivity

Utilities (unchanged):
- BookManager, BookSettings, BookmarkStore, BootNtpSync
- Dictionary, LookupHistory, TimeSync, OpdsServerStore

Libraries: PlaceholderCover, TableData, ChapterXPathIndexer
Scripts: inject_mod_version, generate_book_icon, preview_placeholder_cover
Docs: KOReader sync XPath mapping

Migration changes:
- ActivityWithSubactivity -> Activity base class
- Callback constructors -> finish()/setResult() pattern
- enterNewActivity() -> startActivityForResult()
- Activity::RenderLock&& -> RenderLock&&

These files won't compile yet - they reference mod settings and I18n
strings that will be added in subsequent phases.

Made-with: Cursor
2026-03-07 15:10:00 -05:00

2.6 KiB

Port Upstream 1.1.0 RC Commits to mod/master

Task Description

Audited all 11 commits from upstream PR #992 (1.1.0 Release Candidate) and ported the remaining unported/partially-ported ones to mod/master.

Commit Audit Results

Already Fully Ported (no changes needed)

Already Effectively Present

  • 8db3542 (#1017) - Cover outlines for Lyra themes (mod's LyraTheme.cpp already draws outlines unconditionally; Lyra3CoversTheme.cpp doesn't exist in mod)

Ported in This Session

1. Aligned #1002 + Ported #1018 (CSS cache invalidation)

Files: CssParser.h, CssParser.cpp, Epub.cpp, ChapterHtmlSlimParser.cpp

  • Added tryInterpretLength() (bool return + out-param) to properly skip non-length CSS values like auto, inherit
  • Added deleteCache() method to CssParser
  • Moved CSS_CACHE_VERSION to static class member
  • Added stale cache file removal in loadFromCache() on version mismatch
  • Added "both CSS width and height set" branch in image sizing logic
  • Refactored parseCssFiles() to early-return when cache exists
  • Refactored load() to call loadFromCache() and invalidate sections on stale cache

2. Ported #1014 (Strip unused CSS rules)

File: CssParser.cpp

  • Added selector filtering in processRuleBlockWithStyle to skip +, >, [, :, #, ~, *, and whitespace selectors
  • Fixed normalized() trailing whitespace to use while loop and also strip \n
  • Added TODO comments for multi-class selector support

3. Ported #990 (Continue reading card classic theme)

Files: BaseTheme.h, BaseTheme.cpp

  • Changed homeTopPadding from 20 to 40
  • Computed bookWidth from cover BMP aspect ratio (clamped to 90% screen width, fallback to half-width)
  • Fixed centering: added rect.x offset to bookX, boxX, and continueBoxX
  • Simplified cover drawing (removed scaling/centering math since bookWidth now matches aspect ratio)

Build Status

All changes compile successfully (0 errors, 0 warnings in modified files).

Follow-up Items

  • Test on device to verify CSS cache invalidation works correctly (books with stale caches should auto-rebuild)
  • Test classic theme continue reading card with various cover aspect ratios
  • Test image sizing with EPUBs that specify both CSS width and height on images