Skip to content

chore: merge 4 clean upstream commits (skip #2288)#8

Merged
mtskf merged 4 commits into
masterfrom
chore/merge-4-clean-upstream-commits
Jun 18, 2026
Merged

chore: merge 4 clean upstream commits (skip #2288)#8
mtskf merged 4 commits into
masterfrom
chore/merge-4-clean-upstream-commits

Conversation

@mtskf

@mtskf mtskf commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Summary

Cherry-picks 4 clean upstream commits into master, deliberately skipping the conflicting #2288 (Korean line breaks) which collides with our Japanese CJK line-breaking work (#4/#5/#6) and is handled separately in a follow-up reconcile task.

Commit PR Change
cecedbd4 crosspoint-reader#2357 fix: enable Shift key for URL keyboard input
09faf43e crosspoint-reader#2290 feat: drag-and-drop upload modal (FilesPage.html + image)
6356643a crosspoint-reader#1808 feat: long-press Confirm → KOReader sync
22b22bb8 crosspoint-reader#2368 fix: submodule pointer

Why cherry-pick (not range merge)

Upstream order places the conflicting #2288 (22f35750) between the clean commits, with #2368 after it:

f66220a2 #2357  ← take
54d5a788 #2290  ← take
d4069aea #1808  ← take
22f35750 #2288  ← SKIP (conflicts with our CJK layer)
7d639cf8 #2368  ← take

A range merge would drag in #2288. Cherry-picking the 4 clean commits in upstream order keeps them isolated.

Submodule (open-x4-sdk)

Net pointer is unchanged: #1808 bumps it to 344c479b, #2368 restores it to 26648d64 — which is exactly master's current state. Final tree pointer: 26648d64.

Verification

  • ✅ All 4 cherry-picks applied with zero conflicts
  • ✅ Diff touches only upstream-owned files — no overlap with our CJK/font work (ParsedText, Utf8, render layer untouched)
  • #2288 content confirmed absent from the diff
  • ⚠️ Local pio run not available in this checkout (no toolchain, submodule not checked out) — relying on CI Build Check for compile verification

Follow-ups (tracked separately)

  • #1808 adds 3 keys to english.yaml → need Japanese translations in japanese.yaml
  • #2288 Korean reconcile (keep-ours + port kinsoku)

nnnkit and others added 4 commits June 18, 2026 17:01
…-reader#1808)

## Summary
- Hold the menu (Confirm) button for ≥1s while reading an EPUB to launch
the existing `KOReaderSyncActivity` directly — replaces the three-step
path (open reader menu → scroll to Sync → confirm) with a single
gesture.
- Reuses `ReaderUtils::GO_HOME_MS` (same 1s threshold used by long-press
Back) and the existing `KOREADER_STORE.hasCredentials()` guard.
- Adds a Controls picker **"Long-press Menu"** (`longPressMenuFunction`,
default **Bookmark**) that **cycles through the available functions**
bound to the long-press gesture: `KOSync → Disabled → Bookmark`. The
field name and `LONG_PRESS_MENU_FUNCTION` enum are intentionally general
so future actions (dictionary lookup, table of contents, etc.) can be
appended without another schema migration. The setting is **not** a
binary toggle.
- Existing menu Sync entry still works — both call sites share one
extracted helper (`launchKOReaderSync`); no logic duplication.
- Short-press Confirm release is gated on duration so the reader menu
does not also open after a long press that *acts*, mirroring the
existing long-press Back pattern.
- **No-credentials fall-through:** `launchKOReaderSync()` now returns
whether it acted. When the function is set to KOSync but no KOReader
credentials are stored, the long-press is a no-op that **falls through
to open the reader menu** — so the menu stays reachable instead of the
hold silently swallowing the gesture. The release is only suppressed
when sync actually launched or surfaced a save error.

## Test plan
- [x] `pio run` succeeds clean for the `default` ESP32-C3 environment.
- [x] On-device, value **KOSync**, valid KOReader credentials:
long-press Confirm ≥1s → sync screen launches; get + update progress
return HTTP 200; release does **not** also open the reader menu; returns
to the same page.
- [x] On-device, value **KOSync**, **no** credentials: long-press
Confirm falls through and **opens the reader menu** (regression fix);
short-press also opens the menu.
- [x] On-device: menu → Sync still launches the same screen (shared
helper) and syncs (200/200).
- [x] On-device, value **Bookmark**: long-press drops a bookmark and
does **not** also open the menu.
- [x] On-device, value **Disabled**: long-press Confirm opens the menu
on release; no sync, no bookmark.
- [x] On-device: long-press Back still goes to the file browser
(unchanged path).
- [x] Heap: epub is released before the TLS handshake (frees ~16 KB);
min free heap stayed ~84 KB during sync, well above the safe floor. No
panics/OOM across the session.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mtskf mtskf merged commit 3116668 into master Jun 18, 2026
7 checks passed
@mtskf mtskf deleted the chore/merge-4-clean-upstream-commits branch June 18, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants