Skip to content

Commit 633d3e2

Browse files
authored
Merge develop into main: release v1.8.0
Release v1.8.0
2 parents 0ec642c + ef8f846 commit 633d3e2

97 files changed

Lines changed: 12269 additions & 2595 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.

.claude/skills/verify/SKILL.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: verify
3+
description: Verify reader features end-to-end by importing a synthetic volume through the real upload modal and driving the reader with Playwright. Use when a change needs runtime observation in the actual app (not unit tests).
4+
---
5+
6+
# Verifying mokuro-reader changes end-to-end
7+
8+
## Launch
9+
10+
```bash
11+
npm run dev -- --port 5199 --strictPort # dedicated port; NEVER bare 5173 (other worktrees own it)
12+
```
13+
14+
Browser: Playwright from `node_modules`, executablePath
15+
`~/.cache/ms-playwright/chromium-1208/chrome-linux64/chrome` (note `chrome-linux64`, not `chrome-linux`).
16+
Headless is fine. Don't drive the user's Chrome (stale service worker, port collisions, hidden-window rAF freeze).
17+
18+
## Synthetic volume fixture
19+
20+
The import needs a `.mokuro` + matching `.cbz` (same basename):
21+
22+
- Pages: ImageMagick solid-color portraits with page numbers:
23+
`magick -size 1400x2000 xc:"#d8f0ff" -bordercolor black -border 8 -resize 1400x2000\! -gravity center -pointsize 400 -annotate 0 "1" 001.png`
24+
- `vol1.cbz`: `zip -j vol1.cbz *.png`
25+
- `vol1.mokuro` (all fields required): `{version, title, title_uuid, volume, volume_uuid, chars, pages: [{version, img_width, img_height, blocks: [], img_path}]}`
26+
27+
## Import through the real UI
28+
29+
1. Navbar icon cluster: `div.flex.gap-5 > button` — nth(2) is the upload icon → opens the Import modal (`<dialog>`).
30+
2. **Gotcha:** `getByRole()` fails to match buttons inside the flowbite modal `<dialog>` — use CSS locators (`page.locator('dialog button', { hasText: ... })`) or `page.evaluate` with `textContent.trim()` matching.
31+
3. `waitForEvent('filechooser')` + click the `choose files` button, `setFiles([vol1.mokuro, vol1.cbz])`, then click the exact-text `Import` button.
32+
4. Wait for `text=GapTest` in the catalog, click series → volume → reader (`#/reader/<title>/<uuid>`).
33+
34+
## Driving the reader
35+
36+
- RTL default: `ArrowLeft` = forward. Auto view mode pairs pages (cover shows alone first).
37+
- Page elements: `#manga-panel [data-page-index]` — measure `getBoundingClientRect()` for gap/scale/pan assertions (natural page width 1400 → scale = rect.width/1400).
38+
- Wheel with modifiers: `page.keyboard.down('Control'/'Shift')` + `page.mouse.wheel(0, ±100)` — Playwright applies held modifiers to the wheel event. CDP does NOT swap deltaY→deltaX under shift the way real input does; handlers reading `deltaY || deltaX` cover both.
39+
- Reader toast: search text nodes for the notification string.
40+
- Reader settings drawer: `button.reader-hud.right-3` (there are 3 `.reader-hud` buttons; `.first()` is the page-counter). Toggle labels (e.g. "Continuous scroll") are clickable once the drawer opens; close by clicking far from the drawer.
41+
- Persisted settings check: `JSON.parse(localStorage.getItem('profiles'))[currentProfile]`.
42+
43+
## Known noise
44+
45+
- `[pageerror] Unexpected token '<'` on first dev-server load — pre-existing dev artifact, unrelated to features.

.env.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Google Drive sync (optional — omit to disable)
2+
VITE_GDRIVE_CLIENT_ID=
3+
VITE_GDRIVE_API_KEY=
4+
5+
# OneDrive sync (optional — omit to hide the OneDrive option)
6+
# Azure AD app registration with the deploy origin as an SPA redirect URI.
7+
VITE_ONEDRIVE_CLIENT_ID=

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Changelog
22

3+
## [1.8.0] - 2026-07-05
4+
5+
### Added
6+
7+
- New Local Folder provider: Chromium-only bulk export, or direct access to sync-only files (#250)
8+
- OneDrive added as a cloud sync provider (#250)
9+
- Paged mode pages can now have a gap between them (#234)
10+
- Ctrl/Cmd+Shift+Scroll live-adjusts the page gap (#234)
11+
12+
### Fixed
13+
14+
- Quick Actions button's solid background restored (#249)
15+
- Fixed a bug where reconnecting Google Drive could revert synced progress
16+
- File type matching on Drive and MEGA is now case-insensitive
17+
- Fixed overlapping text lines in auto mode
18+
19+
### Changed
20+
21+
- Expired Google Drive sessions now show a Reconnect button
22+
- Google Drive reconnect works reliably everywhere now, no popup setup needed
23+
- WebDAV now mentions Mokuro-Bunko server compatibility
24+
325
## [1.7.5] - 2026-07-05
426

527
### Added

CLAUDE.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,21 @@ Night mode applies a CSS `filter` to `<dialog>` elements (see `app.html`). The `
250250

251251
## Environment Variables
252252

253-
Create a `.env.local` file for Google Drive integration:
253+
Create a `.env.local` file for cloud provider integration:
254254

255255
```
256256
VITE_GDRIVE_CLIENT_ID=your_client_id
257257
VITE_GDRIVE_API_KEY=your_api_key
258+
VITE_ONEDRIVE_CLIENT_ID=your_azure_app_client_id
258259
```
259260

260-
These are only required for Google Drive sync. MEGA and WebDAV don't require env vars.
261+
- `VITE_GDRIVE_*`: required only for Google Drive sync.
262+
- `VITE_ONEDRIVE_CLIENT_ID`: required only for OneDrive sync. Register an
263+
Azure AD app (any Microsoft account tenant, "common" authority) and add the
264+
deploy origin as a **Single-page application** redirect URI. Scopes used:
265+
`Files.ReadWrite`, `offline_access`, `User.Read`. When unset, the OneDrive
266+
option is hidden from the cloud screen.
267+
- MEGA, WebDAV, and Local Folder require no env vars.
261268

262269
## Testing
263270

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,18 @@ npm test
183183

184184
### Environment Variables
185185

186-
For Google Drive integration, create a `.env` file:
186+
For Google Drive and/or OneDrive integration, create a `.env` file:
187187

188188
```env
189189
VITE_GDRIVE_CLIENT_ID=your_client_id
190190
VITE_GDRIVE_API_KEY=your_api_key
191+
VITE_ONEDRIVE_CLIENT_ID=your_azure_app_client_id
191192
```
192193

194+
For OneDrive, register an Azure AD app ("common" authority) and add your deploy
195+
origin as a **Single-page application** redirect URI. When unset, the OneDrive
196+
option is hidden. MEGA, WebDAV, and Local Folder need no configuration.
197+
193198
## 💬 Community
194199

195200
Wanna chat with the devs? Share your hopes, dreams, and issues (with Mokuro Reader specifically)? Come join the [Mokuro Reader Discord](https://discord.gg/AU5pjjSQBw)!

docs/INPUT-CONTRACTS.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,14 @@ Zoom settles carry a `SettleReason` (`zoom-controller.ts`): only
112112
| Pinch survivor | keeps panning | ignored until fresh press |
113113
| Tap commit | immediate | deferred (300 ms) |
114114
| Swipe-to-flip | yes (mobile setting, edge-gated) | no (panning is the scroll) |
115-
| Wheel | zoom or camera glide | zoom or (native/strip) scroll |
115+
| Wheel | zoom, gap, or camera glide | zoom, gap, or (native/strip) scroll |
116+
117+
Ctrl/meta+shift+wheel is the page-gap adjustment chord on every surface
118+
(paged writes `pagedGap`; scroll readers write `scrollGap` and sync
119+
`pageDividers`), checked before the zoom intent. Binding rule: wheel combos
120+
with a native browser meaning keep that meaning tuned for the reader
121+
(ctrl+wheel zooms, shift+wheel stays a horizontal pan); the gap chord is
122+
deliberately one no browser binds.
116123

117124
## Testing
118125

0 commit comments

Comments
 (0)