Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
6550a78
docs(merge): independent review of upstream analysis + applied correc…
bizzkoot Aug 4, 2026
f352ec1
fix(native-file): harden file operations against crashes
bizzkoot Aug 4, 2026
ce69ec0
fix(service): correct notification throttle and sanitize epub filenames
bizzkoot Aug 4, 2026
a7eb69d
fix(reader): prevent table overflow, restore chip contrast, fade bott…
bizzkoot Aug 4, 2026
261b379
fix(tts): strip leading and trailing quotes from normalized text
bizzkoot Aug 4, 2026
45bd7b0
fix(reader): prevent white drawer seam on chapter screen
bizzkoot Aug 4, 2026
341cf16
fix(ui): align bottom nav with M3, stabilize browse tab bar, cap moda…
bizzkoot Aug 4, 2026
9a4110d
fix(tracker): null-safe chapter progress in set-track dialog
bizzkoot Aug 4, 2026
7d0d0a1
chore: gitignore tsconfig build cache
bizzkoot Aug 4, 2026
c2a10f0
fix(settings): normalize repository screen back navigation
bizzkoot Aug 4, 2026
95f7962
fix(db): order chapter pages numerically
bizzkoot Aug 4, 2026
f4f8def
fix(db): order epub chapters across paginated pages
bizzkoot Aug 4, 2026
153038d
fix(categories): stable key for drag reordering
bizzkoot Aug 4, 2026
da8b1b3
fix(db): preserve default category after reordering
bizzkoot Aug 4, 2026
969f088
fix(db): use exclusive transactions and await runAsync
bizzkoot Aug 4, 2026
edfdbae
fix(db): scope download deletion and fix read-chapter folder
bizzkoot Aug 4, 2026
91c10cf
fix(novel): prevent genre rendering crashes
bizzkoot Aug 4, 2026
cf5b592
fix(db): date-correct library updates and sorting
bizzkoot Aug 4, 2026
b0b32fe
fix(reader): restore saved chapter progress from db
bizzkoot Aug 4, 2026
ac1cb91
fix(tracker): handle missing client IDs
bizzkoot Aug 4, 2026
ac92f34
feat(novel): add more statuses and icons
bizzkoot Aug 4, 2026
ca92613
test(db): type-safe fixtures for download deletion tests
bizzkoot Aug 4, 2026
d612280
fix(tracker): restore search requests on submit using event text
bizzkoot Aug 4, 2026
f0fb479
docs(merge): record Batch A completion (29/29 fixes ported)
bizzkoot Aug 4, 2026
a1d23a0
feat(updates): run library updates in parallel across sources
bizzkoot Aug 4, 2026
f7c4b65
feat(tracker): add Kitsu tracker support
bizzkoot Aug 4, 2026
0c6a6dc
feat(novel): jump to first unread chapter in read button and fab
bizzkoot Aug 4, 2026
62091cb
fix(novel): load unloaded chapters in jump modal and drawer
bizzkoot Aug 4, 2026
032723b
feat(epub): add chapter numbers to epub chapter titles
bizzkoot Aug 4, 2026
7ecb98a
feat(updates): add skip-version to update notifications
bizzkoot Aug 4, 2026
398ecb9
feat(downloads): make chapter download cooldown configurable
bizzkoot Aug 4, 2026
275c106
docs(merge): record Batch B completion (7/7 core features ported)
bizzkoot Aug 4, 2026
7b47bb6
docs(merge): correct stale dev TTS note (already merged via PR #18)
bizzkoot Aug 4, 2026
b07e701
refactor(theme): context-based theme provider with id migration
bizzkoot Aug 4, 2026
0f0dd62
feat(theme): dynamic material you colors
bizzkoot Aug 4, 2026
b1b08f7
feat(ui): replace community slider with md3 slider
bizzkoot Aug 4, 2026
2f27e8e
fix(ui): prevent slider flicker after release
bizzkoot Aug 4, 2026
d7f25f9
feat(ui): material 3 top tab indicators
bizzkoot Aug 4, 2026
a8e6a24
refactor(ui): standardize bottom sheet ux and styling
bizzkoot Aug 4, 2026
54d5d75
fix(ui): modernize menu styling and outside-tap dismissal
bizzkoot Aug 4, 2026
84a59e9
docs(merge): record Batch C completion (7/7 core items ported)
bizzkoot Aug 4, 2026
494ad97
build: patch expo-material3-theme to use gradle namespace (fixes AGP …
bizzkoot Aug 4, 2026
2e5b119
docs(merge): fix fork metadata and update modification registry
bizzkoot Aug 4, 2026
fa5e10b
fix(db): run exclusive-transaction statements on txn object
bizzkoot Aug 5, 2026
131179d
docs(merge): record post-port audit of batches A/B/C + exclusive-tran…
bizzkoot Aug 5, 2026
ebea3c7
fix(epub,ui): quick-fix batch — range export, toggle staleness, error…
bizzkoot Aug 5, 2026
2eca9c1
docs(merge): record quick-fix batch implementation (items 1,3,4,5)
bizzkoot Aug 5, 2026
b6b367d
fix(db): migration 004 — recreate julianday triggers on all installs
bizzkoot Aug 5, 2026
4bdc18b
docs(merge): record Batch D PR #1 (item #2) implementation
bizzkoot Aug 5, 2026
f716159
build: fix abortOnError deprecation in expo-material3-theme patch
bizzkoot Aug 5, 2026
1f48330
feat(tts): unify visible text and TTS cleanup rulesets (issue #19)
bizzkoot Aug 5, 2026
9d0751e
docs(readme): update feature list and changelog
bizzkoot Aug 5, 2026
e9198c4
fix: resolve 9 audit findings from 52-commit merge verification
bizzkoot Aug 6, 2026
cee9d4a
docs: collapse large readme sections
bizzkoot Aug 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .agents/fix-batch-1-9-handoff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Fix Batch #1–#9 — Handoff Record (COMPLETED 2026-08-06)

**Date**: 2026-08-06 (all groups implemented + verified)
**Branch**: `merge/original-sync-batch-c` (HEAD `9d0751ecf`, 52 commits ahead of origin/master)
**Goal**: Implement the 9 audit findings, then advance `origin/dev` to this branch.

## ✅ ALL 9 ITEMS IMPLEMENTED + VERIFIED (2026-08-06)

Final gates: type-check ✅ · lint 0 errors (7 pre-existing warnings) ✅ · format ✅ · **full suite 86 suites / 1435 tests** (baseline 84/1349 → +2 suites / +86 tests) · TTS wake-cycle 7/7 ✅ · TTS refill ✅. Working tree: 20 modified + 3 new files, **UNCOMMITTED** (commit decision pending user).

- Group 1 (#1,#2,#4,#5): duplicate "Applies to" row removed; setVisibleCleanup re-inject (prop/per-novel/MMKV effects) + core.js restore-pristine on toggle-off; no-op write-back skipped; resolveTtsCleanupTarget strict gating.
- Group 2 (#3): Slider claims only horizontal-dominant gestures (`shouldClaimPanResponder`, 6px threshold), Pressable tap-to-jump kept, flicker fix intact, 9 new tests (16 total).
- Group 3 (#6): Menu fontSize/lineHeight uiScale-scaled (scaleDimension(16/20, uiScale) — pre-change value restored); setBarColor dead code removed + doc comment (upstream #1076 rationale); buildPaperTheme extracted, ErrorFallbackPaperProvider (no auto-backup hook, safe pre-DB).
- Group 4a (#7,#8): README deprecation overstatements corrected (2 spots); getNovelChaptersByNumber prefers chapterNumber with position fallback (+4 tests); JumpToChapterModal scrolls via findIndex (loadedChaptersRef) with clamped fallback; ReadButton/FAB fall back to chapters[0] when novel fully read.
- Group 4b (#9): useGithubUpdateChecker tests — first-launch check, 24h skip, ignoreVersion (6 new, 4 existing kept); transformThemeId exported + full 1-21→100-108 map pinned for light/dark in new useTheme.test.ts.

Remaining: user decision on commit grouping, then advance `origin/dev` (clean fast-forward — 0 commits on origin/dev missing from HEAD).

---

## Audit context

Full verification report in the chat session (2026-08-05). Source of the 9 findings:
- POV-1 (TTS unify commit `1f4833064`) → items #1, #2, #4, #5
- POV-3 (Batch C UI) → items #3, #6
- POV-4 (Features/docs) → items #7, #8, #9
- Gates baseline at start: type-check ✅ / lint 0 errors (7 pre-existing warnings) / format ✅ / **84 suites, 1349 tests** / TTS wake-cycle 7/7.

## ✅ DONE — Group 1 (TTS pipeline): items #1, #2, #4, #5

**Uncommitted working-tree changes (6 files, +220/−41)** — implemented by worker subagent, diff reviewed + verified by main agent, quick gates pass (type-check ✅, lint 0 errors ✅, format ✅). Worker reported **116 targeted tests passing** before it was interrupted; **full suite NOT re-run yet** (pending — run before commit).

| File | Change |
|---|---|
| `src/screens/settings/SettingsReaderScreen/Modals/TtsTextCleanupModal.tsx` | **#1** removed the duplicate "Applies to" Pressable row (the second, byte-identical block) — exactly one row remains |
| `android/app/src/main/assets/js/core.js` | **#2** `setVisibleCleanup(false)` now restores pristine text from `dataset.originalText` + deletes snapshots (toggle-off reverts DOM immediately). **#4** `applyVisibleCleanup` skips elements whose text is unchanged (never flattens `<span>/<em>/<ruby>` on no-op) |
| `src/screens/reader/components/WebViewReader.tsx` | **#2** added `webViewLoadedRef`, `lastVisibleCleanupInjectedRef`, `injectVisibleCleanupState()` callback; wired into prop effect (~L332), per-novel effect (~L427), MMKV listener (~L540). onLoadEnd (L1526-1533) sets `webViewLoadedRef = true` + seeds `lastVisibleCleanupInjectedRef` so no double-inject. **#4** `visible-cleanup` handler bails when `!shouldCleanVisibleText(settings)` or when cleaned === input (no change) |
| `src/utils/htmlParagraphExtractor.ts` | **#5** new `resolveTtsCleanupTarget(settings)` helper (valid: 'visible'/'both', anything else → 'tts'); used in `cleanTtsText`, `applyTtsTextCleanup`, `shouldCleanVisibleText` — all sites now agree on garbage values |
| `src/utils/__tests__/ttsTextCleanup.test.ts` (+44) | tests for resolveTtsCleanupTarget garbage-value matrix + 'both'/'visible' behavior |
| `src/screens/reader/components/__tests__/WebViewReader.integration.test.tsx` (+59) | tests for re-inject + no-op write-back skip |

**Verification status**: 116 targeted tests pass (worker). Full suite pending. TTS wake-cycle/refill pending.

## ✅ DONE — Group 2 (item #3): Slider vertical-scroll swallow

**Evidence**: `src/components/Slider/Slider.tsx:176-177` — `onStartShouldSetPanResponder: () => !disabled`, `onMoveShouldSetPanResponder: () => !disabled` claim ALL touches → vertical swipes starting on the slider are swallowed, blocking scroll-through in ReaderTTSTab bottom sheet, AccessibilityTab, SettingsAppearanceScreen, Onboarding.
**Required behavior**: vertical drag on slider must scroll the parent; horizontal drag adjusts value; tap still jumps the handle.
**Approach (verified standard pattern)**: `onStartShouldSetPanResponder: () => false`; `onMoveShouldSetPanResponder: (_, g) => !disabled && Math.abs(g.dx) > threshold && Math.abs(g.dx) > Math.abs(g.dy)` (horizontal-dominant only; parent vertical ScrollView wins vertical gestures since child never claims at start). Preserve tap-to-jump (wrap root in Pressable with onPress → updateFromPosition(locationX), or equivalent — keep `updateFromPosition` reuse). Keep flicker fix (dragValue until controlled value catches up) and add/extend `Slider.test.tsx` (e.g. responder decision helper extracted as pure function: vertical → false, horizontal → true, tap path still works).

## ✅ DONE — Group 3 (item #6): UI polish

- **Menu text not uiScale-scaled**: `src/components/Menu/index.tsx:253` `menuItemText fontSize: 14` hardcoded → make uiScale-scaled (pre-change value was `scaleDimension(16, uiScale)`; `uiScale` already available in the component, styles memo depends on it).
- **Nav-bar background no longer set**: `src/theme/utils/setBarColor.ts:19` `//NavigationBar.setBackgroundColorAsync(color);` commented out (function name misleading). Decide: restore the call (check git history `git log -p -- src/theme/utils/setBarColor.ts` for why it was removed — if M3/edge-to-edge intentional, instead remove the dead call + rename or document; prefer restoring behavior to match the name unless there is a hard reason).
- **dbError ErrorFallback button not app-themed**: `App.tsx:109-115` dbError path renders `<ThemeProvider><ErrorFallback/></ThemeProvider>` with no PaperProvider → PaperButton falls back to paper defaults. Wrap with the same `ThemedPaperProvider` used in the main tree (ThemeProvider is MMKV-only, ThemedPaperProvider is pure UI — safe during dbError; verify `ThemedPaperProvider` doesn't touch DB).

## ✅ DONE — Group 4a (items #7, #8a, #8b, #8c): docs + edge cases

**Uncommitted (alongside Groups 1–3). Full suite: 85 suites / 1365 tests passing.**
- **#7 README**: both overclaims corrected (`README.md:55`, `:379`) — API-35 targeting true, third-party patches via pnpm, remaining in-app Kotlin deprecation warnings tracked in plan.md.
- **#8a `getNovelChaptersByNumber`** (`ChapterQueries.ts:441-457`): now async — tries `WHERE chapterNumber = ? ORDER BY position ASC` for valid positive finite numbers, falls back to legacy `position = chapterNumber - 1` when no chapterNumber match. New test file `ChapterQueries.byNumber.test.ts` (4 tests).
- **#8b JumpToChapterModal**: added `loadedChaptersRef` mirror + re-resolve scroll target by chapter id after `loadUpToBatch` (was raw `chap.position`), clamped fallback when still absent; empty-list guard. ChapterDrawer already findIndex-based (no change needed).
- **#8c ReadButton + FAB**: `ReadButton` gets `chapters?: ChapterInfo[]` prop; `targetChapter = lastRead ?? firstUnreadChapter ?? chapters[0]` (`ReadButton.tsx:26`); `NovelScreenList` FAB `continueReadingChapter = lastRead ?? firstUnreadChapter ?? chapters[0]` (`:249`). `NovelInfoHeader` passes `chapters` through.
- Gates: type-check ✅, lint 0 errors (7 pre-existing warnings) ✅, format ✅, full suite ✅.

## ✅ DONE — Group 4b (items #9a, #9b): tests
- **#9a** `src/hooks/common/__tests__/useGithubUpdateChecker.test.ts` — add tests for `ignoreVersion`/IGNORED_UPDATE_VERSION + first-launch `shouldCheckForUpdate()` returning true when `!lastCheckTime`.
- **#9b** new/extended `useTheme` test pinning `transformThemeId` map (1-21 → 100-108, light/dark). `transformThemeId` currently NOT exported from `src/hooks/persisted/useTheme.ts:103` — may need a pure-helper export or test via ThemeProvider.

## Final steps (after Group 4b)

1. Sequential subagent per group (repo precedent: main agent reviews diff + runs gates between groups). One writer at a time.
2. Full gates: `pnpm run type-check`, `pnpm run lint` (0 errors), `pnpm run format:check`, `pnpm run test` (expect ≥ 84 suites / 1349 tests + new ones), TTS wake-cycle 7/7, `pnpm run test:tts-refill`.
3. `pnpm run format && git add .` then commit (repo workflow: format before commit). Ask user about commit grouping (one commit per group vs single batch) before committing.
4. Then advance `origin/dev` → this branch (currently `git rev-list --count HEAD..origin/dev` = 0, clean fast-forward) and push — confirm with user first.

## Notes

- Working tree currently has the Group 1-3 + 4a changes, UNCOMMITTED. Do NOT reset.
- `origin/dev` fully contained in HEAD (0 commits on origin/dev not on HEAD) — advancing is a clean fast-forward once fixes are committed.
Loading
Loading