iOS: presses are felt (#430)

The page asks the app for a haptic ({t:"haptic", kind}) and the app
plays the phone's own. A light tap for play, pause, flag and pull to
refresh; the system's success for marking read, one item or all; its
warning with an error toast. A browser has no host to ask, and an
older app ignores the message, so there is nothing to gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ray Slakinski
2026-11-08 16:57:51 -05:00
parent 2e031763fa
commit cf0dad7380
12 changed files with 40 additions and 9 deletions

View File

@@ -170,6 +170,11 @@ since();
vm.runInContext('sleepIn(0)', ctx);
ok(last('sleep')?.secs === 0, 'turning the timer off did not reach the app');
// Haptics (#430): the page asks, the phone does.
since();
vm.runInContext('toast("Unable to play", true)', ctx);
ok(last('haptic')?.kind === 'warn', 'an error was not felt');
if (failed) { console.error(`\n${failed} failed`); process.exit(1); }
console.log('OK: native-bridge: the host takes playback, keeping and the sleep timer, and the page follows it');
console.log('OK: native-bridge: the host takes playback, keeping, the sleep timer and haptics, and the page follows it');
process.exit(0);