Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'sha256-e2g5HkZP+fghbsY1m7moq4GopOo7zRRaAHNyQ2Q7oSI=' 'sha256-IXrNMFsbjAXC+sX1T0IOFqUecOh3LhlgUUWZ9hH5IFw=' 'sha256-QSGzxNSepdjMBRwnovEOJlbbTDp+rqYlcPfhcB+fgnQ=' 'sha256-yDk9g0p1zFFAzRAKzvh9BO3odtKg96amzKsWG0jpax4='; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; base-uri 'none'; form-action 'none'">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'sha256-e2g5HkZP+fghbsY1m7moq4GopOo7zRRaAHNyQ2Q7oSI=' 'sha256-NgUcRWqgRxmvoXsdf9DJT4dQ5AOna/qzI6dDicudC9k=' 'sha256-QSGzxNSepdjMBRwnovEOJlbbTDp+rqYlcPfhcB+fgnQ=' 'sha256-yDk9g0p1zFFAzRAKzvh9BO3odtKg96amzKsWG0jpax4='; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; base-uri 'none'; form-action 'none'">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>Hive Commons</title>
<meta name="description" content="Hive Commons supports Hive: governed AI-agent fleets with Jira Data Center work sources, The Commons, swarms, Claude Code, GitHub Copilot, vLLM, llm-d and more.">
Expand Down Expand Up @@ -817,7 +817,12 @@ <h2 id="infra-thanks-title">Thanks to the organizations that power Hive Commons<
pointerStartX = e.clientX;
pointerStartY = e.clientY;
}, { passive: true });
root.addEventListener('pointercancel', function () {
pointerStartX = null;
pointerStartY = null;
}, { passive: true });
root.addEventListener('pointerup', function (e) {
if (e.pointerType === 'mouse') return;
if (pointerStartX === null || pointerStartY === null) return;
var dx = e.clientX - pointerStartX;
var dy = e.clientY - pointerStartY;
Expand Down
15 changes: 15 additions & 0 deletions scripts/carousels.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,21 @@ test("hero swipe: touch swipe past threshold navigates; mouse drags, short and v
assertHeroSlide(t, 0);
});

test("hero swipe: pointercancel clears the swipe start; mouse pointerup never completes a touch gesture", () => {
const t = bootHero();
t.root.dispatch("pointerdown", { pointerType: "touch", clientX: 300, clientY: 100 });
t.root.dispatch("pointercancel", { pointerType: "touch" });
t.root.dispatch("pointerup", { pointerType: "mouse", clientX: -500, clientY: 100 });
assertHeroSlide(t, 0, "mouse pointerup after a cancelled touch is not a swipe");
t.root.dispatch("pointerdown", { pointerType: "touch", clientX: 300, clientY: 100 });
t.root.dispatch("pointercancel", { pointerType: "touch" });
t.root.dispatch("pointerup", { pointerType: "touch", clientX: 300 - HERO_SWIPE_PX, clientY: 100 });
assertHeroSlide(t, 0, "cancelled gesture does not complete");
t.root.dispatch("pointerdown", { pointerType: "touch", clientX: 300, clientY: 100 });
t.root.dispatch("pointerup", { pointerType: "mouse", clientX: 300 - HERO_SWIPE_PX, clientY: 100 });
assertHeroSlide(t, 0, "mouse pointerup beyond threshold is ignored");
});

test("hero deep link: location.hash selects the initial slide; unknown hash falls back to the first", () => {
const t = bootHero({ hash: "#" + HERO_IDS[2] });
assertHeroSlide(t, 2);
Expand Down
Loading