fix(KAN-71): use interactive WebKit navigation gestures
CI/CD / preconditions (pull_request) Successful in 1s
Native JavaScript checks / Native launcher and release tests (pull_request) Successful in 1m13s
macOS checks / Native Rust tests and unsigned build (pull_request) Successful in 1m44s
CI/CD / test_and_check_app (pull_request) Successful in 7m4s
CI/CD / Publish immutable image (pull_request) Skipped

This commit is contained in:
2026-09-29 08:02:10 +02:00
parent 386b25858b
commit 1cf7524a7b
16 changed files with 110 additions and 499 deletions
+3 -21
View File
@@ -125,27 +125,9 @@ fn main() {
input.id = 'kan52-unsaved'; input.value = 'unsaved input'; document.body.append(input);
document.cookie = 'kan52_fixture=isolated; Path=/; Secure; SameSite=Lax';
localStorage.setItem('kan52_fixture', 'isolated');
const initialHistory = history.length;
const initialPath = location.pathname;
const navigation = window.__kanbanNavigation;
if (!navigation || getComputedStyle(document.documentElement).overscrollBehaviorY !== 'none' || getComputedStyle(document.documentElement).overscrollBehaviorX !== 'auto') throw new Error('Scroll boundary policy missing');
const traverse = direction => new Promise(resolve => {
addEventListener('popstate', resolve, { once: true });
navigation.step(direction);
});
for (const hash of ['#board', '#ticket', '#settings']) history.pushState({ page: { url: hash } }, '', hash);
await traverse(-1);
if (location.hash !== '#ticket') throw new Error('Back skipped an SPA entry');
await traverse(-1);
if (location.hash !== '#board') throw new Error('Back skipped a second SPA entry');
await traverse(1);
if (location.hash !== '#ticket' || history.length !== initialHistory + 3) throw new Error('Forward history was lost');
const dialog = document.createElement('dialog');
dialog.textContent = 'Navigation overlay'; document.body.append(dialog); dialog.showModal();
if (navigation.canSwipe(1, 1)) throw new Error('Overlay must own navigation');
dialog.close(); dialog.remove();
if (input.value !== 'unsaved input') throw new Error('History discarded form state');
const ok = rendered && denied && typeof window.__TAURI__ === 'undefined' && initialPath === '/login' && initialHistory === 1;
if (typeof window.__kanbanNavigation !== 'undefined') throw new Error('Custom gesture bridge must be removed');
if (getComputedStyle(document.documentElement).overscrollBehaviorY !== 'none' || getComputedStyle(document.documentElement).overscrollBehaviorX !== 'auto') throw new Error('Scroll boundary policy missing');
const ok = rendered && denied && typeof window.__TAURI__ === 'undefined' && location.pathname === '/login' && history.length === 1;
location.href = '/__native_smoke_result?stage=loaded&passed=' + ok;
})();
"#).unwrap();