Skip to content

fix: avoid duplicate OTA update actions - #2807

Merged
Uri-Tauber merged 1 commit into
crosspoint-reader:developfrom
ed-fruty:fix/update-buttons
Jul 30, 2026
Merged

fix: avoid duplicate OTA update actions#2807
Uri-Tauber merged 1 commit into
crosspoint-reader:developfrom
ed-fruty:fix/update-buttons

Conversation

@ed-fruty

@ed-fruty ed-fruty commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • What is the goal of this PR?
    Fix duplicate Cancel and Update actions on the OTA update confirmation screen for devices without touch input.
  • What changes are included?
    • Render the large bottom-screen Cancel and Update action labels only when touch input is available.
    • Preserve the existing mapped physical-button hints on non-touch devices.
    • Preserve the existing touch hit areas and button input handling.

Scope Check

CrossPoint is intentionally narrow. See SCOPE.md and ROADMAP.md.
Please confirm:

  • I have read SCOPE.md and ROADMAP.md.
  • This PR is not a new built-in theme (themes are temporarily closed pending the move to SD-loaded themes).
  • This PR is not a new external network connector (sync engine, cloud storage, remote file access, etc.).
  • This PR is not an interactive app, writing tool, RSS/news/browser, media playback, or PDF feature.
  • The stock firmware does not already handle this well, and no other popular CrossPoint fork already does
    (or, if one does, I explain why CrossPoint still needs it below).
  • If this PR touches freeink-sdk/, lib/hal/, the bootloader, OTA, or recovery code, I have coordinated with
    the relevant maintainer.

Additional Context

This is a small UI regression fix for existing CrossPoint functionality rather than a new capability. The touch actions were added alongside the existing physical-button hints, causing both sets of labels to be rendered on non-touch devices.

On the OTA confirmation screen, the large Cancel and Update labels are intended to represent touch targets. The screen also renders mapped physical-button hints through drawButtonHints().

drawButtonHints() already suppresses physical-button hints on touch devices. This PR applies the complementary condition to the large touch labels, so each device type displays only its appropriate controls:

  • Touch devices: large tappable Cancel and Update actions.
  • Non-touch devices: mapped physical-button hints.

Input handling remains unchanged for both device types.

image

AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? **YES **

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The OTA update activity now renders the “Cancel” and “Update” action text only when the mapped input supports touch capability.

Changes

OTA touch rendering

Layer / File(s) Summary
Conditional OTA action rendering
src/activities/settings/OtaUpdateActivity.cpp
render() now conditionally calculates action text widths and draws the Cancel and Update labels when mappedInput.hasTouch() is true.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: itsthisjustin

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately summarizes the PR’s main change: preventing duplicate OTA update actions on non-touch devices.
Description check ✅ Passed The description matches the changeset and clearly explains the touch-only rendering fix.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Uri-Tauber
Uri-Tauber merged commit 74065f1 into crosspoint-reader:develop Jul 30, 2026
10 checks passed
antziko added a commit to antziko/crosspoint-companion that referenced this pull request Jul 31, 2026
Hand-ported 5 clean upstream/develop commits onto feat-touch:

- crosspoint-reader#2814: ParsedText words/rubyTexts -> std::deque (chunked ~512B nodes),
  eliminating the large contiguous vector realloc that abort()ed on
  fresh-open CJK under a fragmented heap. Removed feat's now-redundant
  growth-wall guard (heapExhausted_/atGrowthWall/canGrowWordVectors):
  the deque + word-count soft-flush + new(nothrow)/signalOutOfMemory +
  buildTickHeapGate floors already cover it. ParsedText logic now matches
  upstream; feat keeps its 384/160 flush thresholds and the SdDebugLog
  soft-flush/LAYOUT-OOM trace. SdCardFont/GfxRenderer signatures take
  const std::deque<std::string>& to match.
- crosspoint-reader#2806: persist text settings on discrete Confirm commits, since
  goHome/goToSleep use replaceActivity and bypass the pop resultHandler.
- crosspoint-reader#2807: guard OTA action-button drawing behind hasTouch().
- b215ed8: OptionPopup navigates via NavPrevious/NavNext.
- crosspoint-reader#2803: order language list by native language name (gen_i18n.py).

Build green (default env), 313/313 host tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
uxjulia pushed a commit to uxjulia/CrossInk that referenced this pull request Jul 31, 2026
donovan-yohan pushed a commit to donovan-yohan/crosspoint-reader that referenced this pull request Aug 1, 2026
Brings 16 upstream commits under the messenger line. No textual conflicts:
the messenger work is almost entirely new files plus additive edits to files
upstream did not touch this cycle. Every overlap was audited on the merits
rather than trusted to the auto-merge.

Notable integrations:
- perf: shared static bidi scratch buffer (~1.5 KB RAM) (crosspoint-reader#2554)
- perf: dictionary sidecar freshness checked once per open; index files
  opened once per lookup (crosspoint-reader#2733)
- fix: dictionary lookup OOM on .dict.dz definitions (crosspoint-reader#2791)
- fix: deque instead of vector for text token storage (crosspoint-reader#2814); this changed
  GfxRenderer::ensureSdCardFontReady's container type -- no messenger caller
  uses that overload
- fix: avoid duplicate OTA update actions (crosspoint-reader#2807)
- feat: OptionPopup is orientation-aware, now driven by NavPrevious/NavNext
  instead of Up|Left / Down|Right; no messenger surface constructs an
  OptionPopup, so the new nav semantics are inherited cleanly
- fix: orient dictionary navigation buttons (crosspoint-reader#2749)
- fix: properly power down SD power rails on x3 (crosspoint-reader#2808)
- fix: save text settings immediately on each change (crosspoint-reader#2806)
- fix: order languages by native name instead of code (crosspoint-reader#2803)
- fix: restrict CrossPoint position extension to official server (crosspoint-reader#2790)
- feat: access text settings from the epub reader (crosspoint-reader#2788)
- fix: clean image page after sync return (crosspoint-reader#2747)
- fix: restore spaces between CJK words (crosspoint-reader#2768)
- fix: derive file-transfer WebSocket port from HTTP (crosspoint-reader#2729)

Sole overlapping file: src/activities/settings/SettingsActivity.cpp.
Upstream dropped a redundant SETTINGS.saveToFile() from the text-settings
callback (TextSettingsActivity now saves on each change); our messenger
entries only added list rows above it. Both sides kept; upstream's line
landed on the callback it was written for.

WebSocket port contract (crosspoint-reader#2729) is browser-side JavaScript only. The
firmware still binds HTTP 80 and WebSocket 81 (CrossPointWebServer.h
wsPort = 81), and the UDP discovery beacon still advertises that port, so
the mobile app's hardcoded ws://<ip>:81 remains correct. No app change
required.

Messenger surfaces verified present after merge: MessageSync, BookSync,
PeerProbe, MailboxSyncActivity, SleepActivity note precedence and
display-once, main.cpp sleep/wake sync hooks, CrossPointState fields
(mailboxApPsk bounds, display-once note id), SettingsList messenger
entries including the mailboxApPsk DynamicString and settings-API
obfuscation, CrossPointWebServer upload guards, HttpDownloader Range and
deadline work, i18n strings.

Compile gate: pio run -e default SUCCESS (RAM 15.5%, Flash 84.7%).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

2 participants