super-productivity/e2e/tests
Johannes Millan f10d0e9d48
Android soft-keyboard: fix dark-theme white flash on resize (#7839)
* test(e2e): raise timeouts for two CI-flaky waits

Both timeouts repeatedly hit their limit on saturated scheduled runners
without indicating a real product regression:

- supersync.page.ts:781 — final sync-state icon waitFor went 10s → 30s.
  The race above it already consumed a 30s budget, so falling back to
  10s here is too tight when the runner is hot (e.g. SuperSync 5/6 in
  run 26514574130, "Client A can migrate multiple times" failure).
- repeat-task-day-change #6230 — post-midnight visibility went 30s → 60s.
  Even with the focus-event fallback added in 46ac873570, the 1s tick
  + debounce + sync chain can still exceed 30s under contention.

* fix(android): keep foreground services alive across task removal

The focus-mode and tracking foreground services overrode onTaskRemoved
to stop themselves when the app was swiped from recents, which defeats
the purpose of running them as foreground services. Remove the
overrides so the native countdown continues ticking and the notification
persists after task removal.

Refs #7818, #4513

* fix(theme): stabilize Android keyboard-height tracking

Per-event commits during the Android IME open animation sampled
partial keyboard amounts from `window.innerHeight - visualViewport.height`
(layout-viewport adjustResize and visual-viewport resize fire at slightly
different times), parking the global add-task bar mid-page. Debounce the
open path 200ms so only the final value lands; commit synchronously when
the value falls back to zero so the bar drops the moment the IME is gone.

* fix(theme): prevent white flash on Android keyboard resize

The Android WebView surface defaulted to white, so adjustResize keyboard
animations briefly exposed it before the page repainted at the new size —
jarring in dark theme. Paint the surface in the theme background: a
values/values-night color resource provides the cold-start default, and a
new NavigationBar.setWebViewBackgroundColor push keeps it in sync on live
theme switches (the activity is not recreated since uiMode is in
configChanges).

Also promote the full-viewport gradient backdrop to its own compositor
layer as a first-pass mitigation for resize choppiness, pending deeper work.

Not yet verified on-device.

* docs(android): plan to smooth soft-keyboard resize jank

Research + multi-reviewed plan for the remaining keyboard-resize choppiness
(the white-flash half is already fixed in 80b08f0e96). Root cause: adjustResize
resizes the WebView window per frame (WebView is excluded from Chrome 108's
visual-viewport fix). Recommends a KISS core — flip only CapacitorMainActivity
to adjustNothing + reuse the existing visualViewport/--keyboard-height model and
scroll-into-view — gated behind a baseline trace, with VirtualKeyboard API and
CSS containment kept as contingencies behind proven need.

* perf(theme): dedupe Android keyboard-visibility emissions

The native OnGlobalLayoutListener pushes isKeyboardShown$ on every layout pass
(every frame of the IME slide), so the subscriber rewrote <body> classes and
re-triggered change detection each frame. distinctUntilChanged collapses it to
actual show/hide transitions.

* docs(android): correct keyboard-resize plan for min-Chrome-107

Implementation review found MIN_CHROMIUM_VERSION=107, but WebView only
auto-resizes the visual viewport for the IME at ~Chrome 139. So a static
adjustNothing flip would leave Chrome 107-138 with no keyboard-height signal
(inputs silently covered). Corrected the plan: VirtualKeyboard API is required
(not optional), the switch must be runtime-gated via a native setSoftInputMode
method keeping adjustResize as the fallback, and the cheap containment route is
now Phase 1 (try first) with the bigger flip as Phase 2. distinctUntilChanged
win shipped (f486496b7b).

* style(theme): drop no-op keyboard backdrop compositing

The will-change/backface-visibility on body::before was added to reduce
keyboard-resize choppiness, but review showed it's a no-op: the backdrop
resizes every frame so it re-rasterizes regardless of layer promotion, while
the hint allocates an always-on compositor layer on every platform. The
white-flash fix (WebView background color) is unaffected.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-05-28 16:56:21 +02:00
..
add-task-bar refactor(e2e): extract ensureGlobalAddTaskBarOpen helper to reduce code duplication 2026-01-16 13:35:59 +01:00
app-features test(focus-mode): align e2e with mode-selector-hidden-during-session UX 2026-05-20 23:30:42 +02:00
autocomplete Merge branch 'master' into feat/operation-logs 2026-01-03 18:51:51 +01:00
boards test(e2e): tighten boards #7498 regression specs 2026-05-06 21:37:06 +02:00
break test(e2e): use correct route /#/tag/TODAY/tasks instead of /#/tag/TODAY 2026-03-15 18:48:00 +01:00
daily-summary - fix(archive): also normalize malformed timeTracking field (#7487) 2026-05-05 15:41:25 +02:00
focus-mode test: strengthen unit test assertions and revive disabled plugin specs (#7755) 2026-05-23 18:31:53 +02:00
import-export test(e2e): strengthen assertions across reviewed specs (#7747) 2026-05-23 13:40:17 +02:00
issue-provider-panel test(e2e): strengthen assertions across reviewed specs (#7747) 2026-05-23 13:40:17 +02:00
keyboard test(e2e): add comprehensive E2E test coverage for core features 2026-01-12 15:11:27 +01:00
menu chore: address code review feedback 2026-01-15 10:57:43 +01:00
migration Improve on sync (#7736) 2026-05-22 17:49:25 +02:00
navigation test(e2e): use correct route /#/tag/TODAY/tasks instead of /#/tag/TODAY 2026-03-15 18:48:00 +01:00
notes fix(note): linkify URLs in locked notes so markdown links stay clickable 2026-04-16 19:47:52 +02:00
performance test(e2e): disable failing for now 2025-09-21 00:59:11 +02:00
planner test(e2e): stabilize task visibility specs 2026-05-13 16:27:31 +02:00
plugins perf(plugins): skip no-op doc-mode saves + rename to doc-mode (#7825) 2026-05-27 17:30:38 +02:00
project test(e2e): fix done-toggle selector to use element instead of class 2026-03-24 16:25:42 +01:00
recurring Android soft-keyboard: fix dark-theme white flash on resize (#7839) 2026-05-28 16:56:21 +02:00
reminders fix(electron): retry Wayland idle helper startup (#7527) 2026-05-10 22:35:33 +02:00
schedule test(e2e): strengthen assertions across reviewed specs (#7747) 2026-05-23 13:40:17 +02:00
search improve E2E test reliability and add snapshotOpType interface param 2026-01-27 20:55:30 +01:00
settings test(e2e): strengthen assertions across reviewed specs (#7747) 2026-05-23 13:40:17 +02:00
short-syntax refactor(e2e): replace waitForTimeout with condition-based waits 2026-01-03 15:29:38 +01:00
sync test(e2e): add sync-stall recovery to flaky supersync setup and migration 2026-05-28 13:58:19 +02:00
tags test(e2e): add comprehensive E2E test coverage for core features 2026-01-12 15:11:27 +01:00
task-basic test(e2e): fix done-toggle selector to use element instead of class 2026-03-24 16:25:42 +01:00
task-detail test(e2e): update Show/hide task panel button label (#7260) 2026-04-17 22:19:22 +02:00
task-dragdrop test(e2e): fix done-toggle selector to use element instead of class 2026-03-24 16:25:42 +01:00
task-list-basic test(e2e): fix done-toggle selector to use element instead of class 2026-03-24 16:25:42 +01:00
work-view fix(tasks): restore ArrowRight focusing into detail panel 2026-05-14 15:24:53 +02:00
workflow test(e2e): add comprehensive E2E test coverage for core features 2026-01-12 15:11:27 +01:00
worklog test(e2e): add comprehensive E2E test coverage for core features 2026-01-12 15:11:27 +01:00
all-basic-routes-without-error.spec.ts refactor(e2e): replace waitForTimeout with condition-based waits 2026-01-03 15:29:38 +01:00