Skip to content

Commit 83dcafa

Browse files
Windows ga (#358)
* Enhance Cloud TTS with navigation controls and shared UI overlay in desktop app * Refactor Cloud TTS voice settings and remove standalone settings overlay on desktop app * Persist reader window state and improve slider interaction in desktop app * Improve PDF page transitions and refine focus management in desktop app * Refactor scrollbar interaction and adjust desktop modal focus handling * Improve PDF sidecar synchronization and cross-platform metadata compatibility * Refactor PDF annotation comment logic to shared module and implement Desktop UI * Refactor reader screen to use tap-to-toggle and full-width styling in desktop app * Refactor reader workspace layout and chrome-panel interactions * Implement global search keyboard shortcuts and focusable chrome layers * Implement flavor-specific legal links and update the About UI * Refactor reader UI controls on desktop app * Enhance desktop folder sync with background metadata extraction and improved error handling * Refactor Library UI and remove redundant Home tab in desktop app * Add custom tooltips to reader icon buttons in desktop app * Integrate app theme controls into reader interfaces on desktop * Add right-to-left pagination support and improve focus restoration on desktop app * Improve EPUB pagination geometry and diagnostic logging for layout cutoffs on desktop app * Update desktop reader defaults and implement settings migration * Implement block-based position tracking in ReaderLocator * Enhance EPUB highlighting reliability in desktop app * Add support for custom reader themes and update highlight palette logic in desktop app * Replace the Tools panel with a "More" dropdown menu and refactor account UI * Implement account profile header in desktop sidebar * Implement cloud sync reliability improvements and sidebar toggle on desktop app * Improve EPUB annotation synchronization and highlight mapping accuracy in desktop app * Integrate WebView2 for EPUB vertical rendering on Windows * Refactor reader layout logic and enhance WebView2 diagnostics * Improve vertical reading layout and WebView2 resizing on Desktop * Refine vertical reading mode layout and margin handling * Enhance reader locator precision and Desktop mode-switching reliability * Implement chapter-level caching and warm-start pagination in desktop app * Replace bundled KCEF with native system webviews via SWT * Refactor EPUB page info bar visibility and layout logic * Improve PDF toolbar persistence and fix tab reactivation logic * Enable multi-selection and bulk operations for custom fonts * Refactor instrumentation tests * Add EPUB UI test fixture and initial instrumentation tests * Expand EpubReader UI tests and improve accessibility * Add instrumentation tests and test tags for library and reader screens * Enhance OPDS parser logic and catalog integration * Add support for toggling local synchronization on a per-folder basis. * Implement tri-state sizing for the TTS overlay * Persist TTS overlay size across sessions * Refactor reader brightness control and add incremental step buttons * Improve CSS support, pagination control, and style-aware semantic caching * Improve link handling, interaction, and diagnostics in the paginated reader * crash fixes * Implement persistent pending removal for external files * Implement book-specific word replacements * Add native vertical reading mode with custom renderer * Implement text selection and navigation improvements for the native vertical reader * Implement locator-based navigation and improved vertical scrolling in native vertical mode in epub * Implement lazy loading and chapter prefetching for native vertical reader * Improve window lifecycle and disposal handling on Desktop * Optimize vertical reading performance in desktop app * Enhance TTS start accuracy and diagnostic logging on desktop * Refactor AI settings visibility on desktop * Improve pagination height measurement and enhance cutoff diagnostics * Implement lifecycle management and improve justified text splitting for pagination * Refine AI usage tracking and force AI feature visibility on Desktop * Add descriptive context comments and usage examples to string and plural resources. * Optimize performance and memory usage in search and state mapping * Replace reader page sliders with minimal slider and navigation controls * Add support for CBT comic archives * Harden file path validation and XML parsing to prevent security vulnerabilities * Implement local account profile caching and optimize desktop performance * Improve desktop persistence reliability and add Linux secure storage support * Improved PDF zoom stability and layout prediction during zoom commits * Improved PDF spread layout prediction, reader focus restoration, and account profile caching * Enhance highlight precision and scoping using block-local offsets and CFIs * Enhance cloud book content synchronization and background downloads * Implement granular timestamp tracking for reading positions and PDF annotations * Restrict diagnostic logging and stack traces to debug builds * Refine PDF page gaps and reader chrome interaction logic * Refactor PDF highlight rendering and overhaul Desktop sidebar UI * Implement a new interaction dock and undo/redo history for PDF annotations in desktop * Enhance PDF color picker and improve navigation scroll restoration * Add highlight palette customization and improve selection menu UI in desktop app epub reader * Enhance desktop shelf management and library organization
1 parent 5971eaa commit 83dcafa

444 files changed

Lines changed: 47188 additions & 8005 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ google-services.json
2121
.gradle/
2222
third_party/pdfium/
2323
*.tgz
24-
kcef-bundle/
25-
kcef-bundle-linux-x64/
2624
cache/
2725
worker/
28-
output/
26+
output/
27+
policies/

.idea/androidTestResultsUserPreferences.xml

Lines changed: 40 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
alias(libs.plugins.android.application)
1010
alias(libs.plugins.kotlin.android)
1111
alias(libs.plugins.kotlin.compose)
12-
id("org.jetbrains.kotlin.plugin.serialization") version "2.1.20"
12+
alias(libs.plugins.kotlin.serialization)
1313
alias(libs.plugins.kotlin.ksp)
1414
id("com.diffplug.spotless") version "8.2.1"
1515
alias(libs.plugins.kover)
@@ -243,8 +243,6 @@ dependencies {
243243

244244
ksp(libs.androidx.room.compiler)
245245

246-
implementation("androidx.compose.material:material-icons-extended:1.7.8")
247-
248246
implementation("androidx.appcompat:appcompat:1.7.1")
249247

250248
//noinspection GradleDependency (Updating these might cause the custom toolbox in pagination to break)
4.6 KB
Binary file not shown.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# EPUB UI Test Fixture
2+
3+
`reader_test_book.epub` is a deterministic EPUB fixture for Android instrumentation and UI tests.
4+
5+
Use it for reader flows that need stable EPUB content:
6+
7+
- open/import EPUB through a `content://` URI
8+
- restore reading position
9+
- navigate with chapter anchors
10+
- create or verify bookmarks
11+
- search unique fixture markers
12+
- exercise highlight and CFI-related flows
13+
14+
The generated EPUB is stored at:
15+
16+
`app/src/androidTest/assets/epub/reader_test_book.epub`
17+
18+
The source files live in:
19+
20+
`app/src/androidTest/fixtures/epub/reader_test_book`
21+
22+
Regenerate the EPUB after editing the source:
23+
24+
```powershell
25+
python app/src/androidTest/fixtures/epub/build_reader_test_book.py
26+
```
27+
28+
Tests should copy the asset from the instrumentation context, not the target app context:
29+
30+
```kotlin
31+
val testContext = InstrumentationRegistry.getInstrumentation().context
32+
testContext.assets.open("epub/reader_test_book.epub")
33+
```
34+
35+
Current basic UI coverage using this fixture lives in:
36+
37+
`app/src/androidTest/java/com/aryan/reader/epubreader/EpubReaderScreenTest.kt`
38+
39+
Stable markers intentionally embedded in the book:
40+
41+
- `POSITION_TARGET_ALPHA`
42+
- `HIGHLIGHT_TARGET_BRAVO`
43+
- `CFI_TARGET_CHARLIE`
44+
- `SEARCH_TARGET_DELTA`
45+
- `BOOKMARK_TARGET_ECHO`
46+
- `POSITION_TARGET_FOXTROT`
47+
- `ANNOTATION_TARGET_GOLF`
48+
- `CFI_TARGET_HOTEL`
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
from __future__ import annotations
2+
3+
from pathlib import Path
4+
from zipfile import ZIP_DEFLATED, ZIP_STORED, ZipFile, ZipInfo
5+
6+
7+
ROOT = Path(__file__).resolve().parent
8+
SOURCE_DIR = ROOT / "reader_test_book"
9+
OUTPUT = ROOT.parents[1] / "assets" / "epub" / "reader_test_book.epub"
10+
FIXED_TIMESTAMP = (2026, 1, 1, 0, 0, 0)
11+
12+
13+
def add_file(epub: ZipFile, source: Path, archive_name: str, compression: int) -> None:
14+
info = ZipInfo(archive_name, FIXED_TIMESTAMP)
15+
info.compress_type = compression
16+
info.external_attr = 0o644 << 16
17+
epub.writestr(info, source.read_bytes())
18+
19+
20+
def main() -> None:
21+
OUTPUT.parent.mkdir(parents=True, exist_ok=True)
22+
23+
with ZipFile(OUTPUT, "w") as epub:
24+
info = ZipInfo("mimetype", FIXED_TIMESTAMP)
25+
info.compress_type = ZIP_STORED
26+
info.external_attr = 0o644 << 16
27+
epub.writestr(info, b"application/epub+zip")
28+
29+
for source in sorted(SOURCE_DIR.rglob("*")):
30+
if not source.is_file() or source.name == "mimetype":
31+
continue
32+
archive_name = source.relative_to(SOURCE_DIR).as_posix()
33+
add_file(epub, source, archive_name, ZIP_DEFLATED)
34+
35+
print(f"Wrote {OUTPUT}")
36+
37+
38+
if __name__ == "__main__":
39+
main()
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
3+
<rootfiles>
4+
<rootfile full-path="OEBPS/package.opf" media-type="application/oebps-package+xml"/>
5+
</rootfiles>
6+
</container>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE html>
3+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
4+
<head>
5+
<title>Chapter One</title>
6+
<link rel="stylesheet" type="text/css" href="../styles/reader-test.css"/>
7+
</head>
8+
<body>
9+
<section id="chapter-one">
10+
<h1 id="chapter-one-heading">Chapter One: Stable Opening</h1>
11+
<p id="opening-paragraph">This EPUB is intentionally plain so Android UI tests can rely on stable text, stable IDs, and stable chapter order.</p>
12+
<p id="position-target-alpha"><span class="target">POSITION_TARGET_ALPHA</span> appears near the start of chapter one. Use this marker for first-position and restore-position checks.</p>
13+
<p id="highlight-target-bravo"><span class="target">HIGHLIGHT_TARGET_BRAVO</span> is a short highlight target. It is surrounded by ordinary words so selection handles have context.</p>
14+
<p id="cfi-target-charlie"><span class="target">CFI_TARGET_CHARLIE</span> sits inside a paragraph with a fixed element id. It can be used for CFI and locator assertions.</p>
15+
<p id="chapter-one-filler-01">Chapter one filler paragraph 01 keeps the document tall enough for scroll and pagination tests.</p>
16+
<p id="chapter-one-filler-02">Chapter one filler paragraph 02 keeps the document tall enough for scroll and pagination tests.</p>
17+
<p id="chapter-one-filler-03">Chapter one filler paragraph 03 keeps the document tall enough for scroll and pagination tests.</p>
18+
<p id="chapter-one-filler-04">Chapter one filler paragraph 04 keeps the document tall enough for scroll and pagination tests.</p>
19+
<p id="chapter-one-filler-05">Chapter one filler paragraph 05 keeps the document tall enough for scroll and pagination tests.</p>
20+
<p id="chapter-one-filler-06">Chapter one filler paragraph 06 keeps the document tall enough for scroll and pagination tests.</p>
21+
<p id="chapter-one-filler-07">Chapter one filler paragraph 07 keeps the document tall enough for scroll and pagination tests.</p>
22+
<p id="chapter-one-filler-08">Chapter one filler paragraph 08 keeps the document tall enough for scroll and pagination tests.</p>
23+
<p id="chapter-one-end">END_OF_CHAPTER_ONE_MARKER</p>
24+
</section>
25+
</body>
26+
</html>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE html>
3+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
4+
<head>
5+
<title>Chapter Two</title>
6+
<link rel="stylesheet" type="text/css" href="../styles/reader-test.css"/>
7+
</head>
8+
<body>
9+
<section id="chapter-two">
10+
<h1 id="chapter-two-heading">Chapter Two: Search And Bookmarks</h1>
11+
<p id="search-target-delta"><span class="target">SEARCH_TARGET_DELTA</span> appears exactly once in the book. Use it for search result navigation.</p>
12+
<p id="bookmark-target-echo"><span class="target">BOOKMARK_TARGET_ECHO</span> is positioned near the top of chapter two for bookmark add, list, and return flows.</p>
13+
<p id="position-target-foxtrot"><span class="target">POSITION_TARGET_FOXTROT</span> is lower in chapter two and is useful for persistence tests after a chapter change.</p>
14+
<p id="chapter-two-filler-01">Chapter two filler paragraph 01 provides enough height for gesture based navigation.</p>
15+
<p id="chapter-two-filler-02">Chapter two filler paragraph 02 provides enough height for gesture based navigation.</p>
16+
<p id="chapter-two-filler-03">Chapter two filler paragraph 03 provides enough height for gesture based navigation.</p>
17+
<p id="chapter-two-filler-04">Chapter two filler paragraph 04 provides enough height for gesture based navigation.</p>
18+
<p id="chapter-two-filler-05">Chapter two filler paragraph 05 provides enough height for gesture based navigation.</p>
19+
<p id="chapter-two-filler-06">Chapter two filler paragraph 06 provides enough height for gesture based navigation.</p>
20+
<p id="chapter-two-filler-07">Chapter two filler paragraph 07 provides enough height for gesture based navigation.</p>
21+
<p id="chapter-two-filler-08">Chapter two filler paragraph 08 provides enough height for gesture based navigation.</p>
22+
<p id="chapter-two-end">END_OF_CHAPTER_TWO_MARKER</p>
23+
</section>
24+
</body>
25+
</html>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE html>
3+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
4+
<head>
5+
<title>Chapter Three</title>
6+
<link rel="stylesheet" type="text/css" href="../styles/reader-test.css"/>
7+
</head>
8+
<body>
9+
<section id="chapter-three">
10+
<h1 id="chapter-three-heading">Chapter Three: Annotation Targets</h1>
11+
<p id="annotation-target-golf"><span class="target">ANNOTATION_TARGET_GOLF</span> is reserved for tests that verify highlight or note persistence across app restarts.</p>
12+
<p id="cfi-target-hotel"><span class="target">CFI_TARGET_HOTEL</span> is a second fixed CFI target in a later chapter.</p>
13+
<p id="inline-image-note" class="fixture-note">The following SVG is local to the EPUB and can be used later for image rendering checks.</p>
14+
<figure id="fixture-diagram">
15+
<img src="../images/fixture-diagram.svg" alt="Fixture diagram"/>
16+
<figcaption>Local SVG image for EPUB resource resolution.</figcaption>
17+
</figure>
18+
<p id="chapter-three-filler-01">Chapter three filler paragraph 01 rounds out the fixture.</p>
19+
<p id="chapter-three-filler-02">Chapter three filler paragraph 02 rounds out the fixture.</p>
20+
<p id="chapter-three-filler-03">Chapter three filler paragraph 03 rounds out the fixture.</p>
21+
<p id="chapter-three-end">END_OF_CHAPTER_THREE_MARKER</p>
22+
</section>
23+
</body>
24+
</html>

0 commit comments

Comments
 (0)