crosspoint-reader/ef-CHANGELOG.md
cottongin 5464d9de3a
fix: webserver stability, memory leaks, epub underlining, flash screen
Webserver:
- Remove MD5 hash computation from file listings (caused EAGAIN errors)
- Implement JSON batching (2KB) with pacing for file listings
- Simplify sendContentSafe() flow control

Memory:
- Cache QR codes on server start instead of regenerating per render
- Optimize WiFi scan: vector deduplication, 20 network limit, early scanDelete()
- Fix 48KB cover buffer leak when navigating Home -> File Transfer

EPUB Reader:
- Fix errant underlining by flushing partWordBuffer before style changes
- Text before styled inline elements (e.g., <a> with CSS underline) no longer
  incorrectly receives the element's styling

Flash Screen:
- Fix version string buffer overflow (30 -> 50 char limit)
- Use half refresh for cleaner display
- Adjust pre_flash.py timing for half refresh completion
2026-01-30 22:00:15 -05:00

8.1 KiB

crosspoint-ef Changelog

All notable changes to the crosspoint-ef fork are documented here.

Base: CrossPoint Reader 0.15.0


ef-1.0.5

Stability & Memory Improvements

Bug Fixes - Webserver

  • File Transfer Stability: Removed blocking MD5 hash computation from file listings that caused EAGAIN errors and connection stalls
  • JSON Batching: Implemented 2KB batch streaming for file listings with pacing to prevent TCP buffer overflow
  • Simplified Flow Control: Removed unnecessary yield/delay logic from content streaming

Bug Fixes - Memory

  • QR Code Caching: Generate QR codes once on server start instead of regenerating on each screen render
  • WiFi Scan Optimization: Replaced memory-heavy std::map deduplication with in-place vector search, limited results to 20 networks, earlier WiFi.scanDelete() for faster memory recovery
  • Cover Buffer Leak: Fixed 48KB memory leak when navigating from Home to File Transfer (cover buffer now explicitly freed)

Bug Fixes - EPUB Reader

  • Errant Underlining: Fixed words before styled inline elements (like <a> tags with CSS underline) incorrectly receiving the element's style by flushing the text buffer before style changes

Bug Fixes - Flashing Screen

  • Version String Overflow: Fixed flash notification parsing failing on longer version strings (buffer limit increased from 30 to 50 characters)
  • Display Quality: Changed flashing screen to half refresh for cleaner appearance
  • Timing: Adjusted pre-flash script timing for half refresh completion

Files Changed

  • src/main.cpp - flash screen fixes, cover buffer free on File Transfer entry
  • scripts/pre_flash.py - timing adjustments for full refresh
  • src/network/CrossPointWebServer.cpp - JSON batching, removed MD5 from listings
  • src/network/CrossPointWebServer.h - removed md5 from FileInfo, simplified sendContentSafe
  • src/activities/network/CrossPointWebServerActivity.cpp - QR code caching
  • src/activities/network/CrossPointWebServerActivity.h - QR code cache members
  • src/activities/network/WifiSelectionActivity.cpp - WiFi scan memory optimization
  • lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp - flush buffer before style changes

ef-1.0.4

EPUB Rendering & Stability

New Features

  • End-of-Book "Start Over": Press next at end of book to wrap to first page

EPUB Rendering Improvements

  • CSS margin-left/padding-left parsing for block indentation
  • Vertical bar and italic styling for blockquotes
  • Left margin indentation for list items (<ol>/<ul>)
  • Fixed ordered lists showing bullets instead of numbers
  • Fixed nested <p> inside <li> causing marker on separate line

Bug Fixes

  • Webserver: Fixed file listing disconnection issues with flow control
  • Webserver: Memory optimization for File Transfer mode (frees heap before starting)
  • Dictionary: Fixed zip dictionary allocation order for better memory allocation success

ef-1.0.3

Maintenance Release

Bug Fixes

  • Fixed cppcheck CI failure: removed unused screenWidth variable in word selection activity

ef-1.0.2

Quick Menu Enhancements

New Features

  • Screen Rotation Toggle: Quick toggle between Portrait and Landscape CCW directly from the quick menu
    • Automatically reindexes content for new screen dimensions
    • Preserves reading position via content offset restoration
  • Customizable Menu Order: Reorder quick menu items to your preference
    • New "Edit List Order" option at bottom of menu
    • Pick-and-place reordering: select item, navigate to destination, place
    • Order persists across sessions

UI Improvements

  • Added navigation button hints to quick menu (prev/next on front buttons, up/down on side buttons)
  • Fixed orientation-aware margins for button hint areas in landscape modes
  • New default menu order: Bookmark, Dictionary, Rotate Screen, Settings, Clear Cache

ef-1.0.1

Dictionary Stability & UX Improvements

Bug Fixes - Stability

  • Fixed dictionary crashes caused by heap fragmentation from repeated page navigation
  • Refactored TextBlock/ParsedText from std::list to std::vector, reducing heap allocations by ~12x per TextBlock
    • Affects EPUB reader page rendering, dictionary definition display, and word selection
    • Contiguous memory improves cache locality during text layout and reduces heap fragmentation on the memory-constrained ESP32
  • Added uncompressed dictionary (.dict) support to avoid decompression memory issues with large dictzip chunks (58KB chunks -> direct read)
  • Implemented chunked on-demand HTML parsing for large definitions, parsing pages as user navigates rather than all at once
  • Limited cached pages to 4 with re-parse capability for backward navigation beyond cache window
  • Fixed double-button press bug when loading new dictionary chunks

Bug Fixes - UI/Layout

  • Restored proper orientation-aware button hint spacing (front: 45px, side: 50px)
  • Added side button hints to definition screen with "<" / ">" labels for page navigation
  • Added side button hints to word selection screen ("UP"/"DOWN" labels, borderless, small font)
  • Added side button hints to dictionary menu ("< Prev", "Next >")
  • Moved page indicator up to avoid bezel cutoff in landscape orientations

ef-1.0.0

First Official Release (previously ef-0.15.99)

First milestone release of the crosspoint-ef fork, building on CrossPoint Reader 0.15.0 with 14+ major new features and enhancements.

New Features

  • Dictionary Support: Offline StarDict dictionary with word selection from reader, fast prefix-indexed search, rich HTML formatting, and multi-page pagination
  • Bookmark System: Per-book bookmarks with visual folded-corner indicators, dedicated management interface, and auto-generated bookmark names
  • Quick Menu: In-reader quick access menu for common actions (Dictionary, Bookmark, Clear Cache, Settings) via short power button press
  • Library Search: Search across all books by title, author, or filename with dynamic character picker and weighted relevance scoring
  • CSS Support: Parse and apply CSS styles from EPUB stylesheets (text-align, font-style, font-weight, text-decoration, margins, padding)
  • Inline Image Support: PNG and Baseline JPEG rendering within EPUB content with 2-bit grayscale dithering and caching
  • Custom Fonts: Atkinson Hyperlegible Next (low-vision readers) and Fern Micro (small screens)
  • Enhanced Web Server: File management (upload, download, delete, rename, copy, move, mkdir), companion app API, WebSocket uploads, mDNS discovery at crosspoint.local
  • Reading Lists: Create, manage, and pin custom book lists with web API support (CSV format)
  • Enhanced Tab Bar: Unified tab bar with horizontal scrolling and overflow indicators (Recent, Lists, Bookmarks, Search, Files)
  • Progress Bar Status: Additional status bar option showing visual reading progress
  • OPDS Browser Enhancements: Navigation history, page skipping (hold Up/Down), error retry, HTTP Basic Auth support

Display Enhancements

  • High Contrast Mode: System-wide contrast adjustment
  • Bezel Compensation: Configurable margin (0-10px) for physical screen edge defects
  • Sleep Screen Improvements: Edge-aware color filling for seamless letterbox appearance

Bug Fixes

  • Fixed device hanging when booted without USB connected (Serial.available()/Serial.read() called without Serial.begin())
  • Fixed grayscale state corruption causing ghosting artifacts when anti-aliasing enabled under memory pressure
  • Memory optimization with graceful degradation when memory is low

Development Tools

  • pre_flash.py: Displays "Flashing firmware..." screen during upload
  • debugging_monitor.py: Enhanced serial monitor with memory graphs
  • pio_helper.py: Interactive PlatformIO workflow helper

Differences from Upstream 0.16.0

This fork is based on upstream 0.15.0. The following 0.16.0 features are not included:

  • KOReader sync support
  • Non-English hyphenation patterns (Spanish, German, French, Russian)
  • XTC/XTCH file format support

See crosspoint-ef-features.md for complete feature documentation.