diff --git a/.planning/STATE.md b/.planning/STATE.md index a241801..be9f4e4 100644 --- a/.planning/STATE.md +++ b/.planning/STATE.md @@ -3,7 +3,7 @@ gsd_state_version: 1.0 milestone: v0.5 milestone_name: GitHub Operator Setup status: Ready for Review -last_updated: "2026-09-05T10:10:16.085Z" +last_updated: "2026-09-05T10:59:12.430Z" last_activity: 2026-09-05 progress: total_phases: 1 @@ -27,7 +27,7 @@ See: .planning/PROJECT.md (updated 2026-07-03) Phase: 19 of 19 complete Plan: 19.1 — Hardened GitHub Actions Setup Status: Ready for review in PR #9 -Last activity: 2026-09-05 - completed quick task 260905-fld: default platform installer and homepage tabs +Last activity: 2026-09-05 - completed quick task 260905-hia: minimal landing identity and GSAP reactions, PR #40 ## Blockers / Concerns @@ -91,6 +91,7 @@ Last activity: 2026-09-05 - completed quick task 260905-fld: default platform in |---|-------------|------|--------|-----------| | 260902-tfw | Fail docs deployment when Bunny configuration is absent | 2026-09-02 | 2d1e697 | [260902-tfw-make-docs-deployment-fail-when-bunny-con](./quick/260902-tfw-make-docs-deployment-fail-when-bunny-con/) | | 260905-fld | Default platform installer and homepage tabs; native install/reinstall proof | 2026-09-05 | c415386 | [260905-fld-homepage-platform-installer](./quick/260905-fld-homepage-platform-installer/) | +| 260905-hia | Minimal landing identity, GSAP reactions and screenshot proofs in PR #40 | 2026-09-05 | 6e84a9a | [260905-hia-landing-identity](./quick/260905-hia-landing-identity/) | ## Accumulated Context diff --git a/.planning/quick/260905-hia-landing-identity/260905-hia-PLAN.md b/.planning/quick/260905-hia-landing-identity/260905-hia-PLAN.md new file mode 100644 index 0000000..7d8e219 --- /dev/null +++ b/.planning/quick/260905-hia-landing-identity/260905-hia-PLAN.md @@ -0,0 +1,31 @@ +--- +status: complete +--- + +# A compact signal-path identity for Loopwire + +## Intent and design + +Create an editorial, minimal landing page using warm mineral backgrounds, dark ink, geometric Sora typography, +plain text controls and fine routed lines. Integrate the existing product screenshot into the hero grid without +an enclosing panel. Remove the capability cards, stacked card shells, pills, glows, shadows and ornamental labels. +Use an original loop-path mark with a tightly spaced wordmark for a coherent audio-routing identity. + +## Execution and cleanup plan + +1. Lock the merged #38 install interactions with the existing browser suite. Keep commands unchanged. +2. Replace the root layout and styles; self-host a licensed variable font and retain attribution. GSAP 3.15.0 is + explicitly requested, checked against the registry (released April 13, 2026), and pinned with the lockfile. +3. Add a bounded signal-field canvas driven by GSAP. Pointer motion deforms paths, clicks send a subtle pulse, + install-tab selection transitions the background palette, and successful copying triggers a distinct response. + Reduced-motion users get immediate color changes with static linework. Pause/clean up animation offscreen. +4. Verify keyboard/copy/no-JS behavior, motion states, responsive layout, metadata, docs and builds. Review screenshots + against the user constraints; persist visual verdicts before each further visual edit. +5. Update design/testing/release docs, commit, push and open a PR with screenshot proofs embedded in its body. + +## Boundaries and proof + +Website and documentation only; no installer/audio/package behavior changes. No new dependencies beyond requested +GSAP; the font is a licensed local asset. Screenshot proofs will be committed under this quick-task directory and +embedded using immutable GitHub raw URLs so reviewers can inspect them without local files or CI artifact access. +Desktop/mobile proofs plus alternate-tab and copy-reaction states are required before completion. diff --git a/.planning/quick/260905-hia-landing-identity/260905-hia-SUMMARY.md b/.planning/quick/260905-hia-landing-identity/260905-hia-SUMMARY.md new file mode 100644 index 0000000..27f6b5b --- /dev/null +++ b/.planning/quick/260905-hia-landing-identity/260905-hia-SUMMARY.md @@ -0,0 +1,66 @@ +--- +status: complete +--- + +# Loopwire landing-page identity + +Issue: [#39](https://github.com/sandwichfarm/loopwire/issues/39) +PR: [#40](https://github.com/sandwichfarm/loopwire/pull/40) +Implementation and screenshot commit: `6e84a9a` +Base: merged #38, `4c1fc48` + +## Result + +The root page now uses a flat Sora wordmark, an original interlocking loop-path mark, dark ink and nine mineral +palettes. The existing product screenshot is integrated into the hero without added framing; the crop emphasizes +routing and links to the full image. Capability cards, stacked panels, pills, shadows, glow, and redundant hero copy +were removed. Installation requirements use a disclosure control while all nine commands stay directly accessible. + +GSAP responds to pointer movement and clicks, transitions the palette when an install tab is selected, and gives +successful copying a distinct finite pulse. Pointer/click/copy motion stops under reduced motion; palettes change +immediately. Idle canvas draw counts stay stable. The visibility boundary stops drawing and restores interactions. +The implementation bounds paths, samples and pixel density and removes listeners/tweens on teardown. + +The PR body embeds desktop, mobile, Ubuntu palette and copy-response screenshot proofs using immutable raw GitHub +URLs. Each embedded URL was fetched successfully and its PNG bytes matched the committed local proof. + +## Changed files and simplifications + +- `apps/site/src/pages/index.astro`: compact composition, integrated preview, plain accessible controls and animation hooks. +- `apps/site/src/layouts/SiteLayout.astro`: lean mineral/color/type rules; removed decorative backgrounds and panel tokens. +- `apps/site/src/lib/signalField.ts`: bounded, event-driven GSAP field and palette lifecycle. +- `apps/site/public/loopwire-mark.svg`, `apps/site/public/fonts/`: original loop mark and locally served Sora with its OFL license. +- `apps/site/package.json`, `pnpm-lock.yaml`: exactly pinned GSAP 3.15.0, explicitly requested and version/age checked. +- `scripts/e2e-site-install.mjs`: installation regressions, animation pixel/color/draw checks, accessibility and reproducible proof capture. +- `scripts/verify-static-site.mjs`: current identity/background contract instead of removed capability-card content. +- `apps/docs/docs/developer/landing-page.md`, `apps/docs/docs/developer/e2e.md`, + `apps/docs/docs/release-notes/unreleased.md`: design decisions, dependency tradeoff, font attribution and test instructions. +- This plan, summary, `proofs/`, and `.planning/STATE.md`: durable acceptance and review evidence. + +No installer, audio/backend, desktop app, package recipe, or original screenshot changes. + +## Validation + +- The existing #38 browser suite passed before the redesign. The new static identity gate failed against the old page. +- `pnpm lint`: workspace typechecks passed; Svelte reported zero errors and warnings. +- `pnpm test`: all 295 TypeScript tests passed. +- `pnpm build`: production builds for the workspaces and combined static site passed. +- `pnpm verify:docs`, `pnpm verify:site`, `node --check scripts/e2e-site-install.mjs`, and `git diff --check` passed. +- `pnpm e2e:site --screenshots ...` passed on Chromium: all commands still match the install guide; all nine palettes + are distinct; keyboard focus, copying/failure recovery, no-JavaScript and unavailable-canvas fallbacks work. +- Browser checks confirmed Sora actually loaded and the key layout/control elements have no borders, corner radii, + shadows or filters. All tab views fit 320, 390, 768 and 1440px widths without page overflow. +- Motion tests compare actual canvas pixels, computed background colors and intercepted real draw calls. Pointer, + click, copy, palette interpolation, idle draw stability and live reduced-motion behavior passed. Visibility was + simulated at the document boundary; drawing stopped and resumed correctly. +- Removing the successful-copy hook from the built test artifact made the canvas regression fail. Restoring the + original artifact returned all checks to green; the combined bundle matches the unmodified build output. +- Independent visual/code review passed. Final visual verdict: 96/100 against the user constraints. +- PR #40 is open and all four embedded screenshot URLs serve the exact committed PNGs. + +## Remaining limits + +Automated browser execution used Chromium. Other browser engines and physical mobile devices were not exercised. +No live audio, installer or native-package tests were repeated because those paths did not change. Screenshots show +individual animation frames; pixel/color tests supply the interactive evidence. No production deployment or merge +was performed. diff --git a/.planning/quick/260905-hia-landing-identity/proofs/README.md b/.planning/quick/260905-hia-landing-identity/proofs/README.md new file mode 100644 index 0000000..83ee282 --- /dev/null +++ b/.planning/quick/260905-hia-landing-identity/proofs/README.md @@ -0,0 +1,20 @@ +# Landing-page review proofs + +Generated from the combined production web build with: + +```sh +pnpm build:web +PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium pnpm e2e:site --screenshots .planning/quick/260905-hia-landing-identity/proofs +``` + +| Image | Viewport | State | +| --- | --- | --- | +| `desktop.png` | 1440 × 1000 | Automatic tab, idle signal field | +| `mobile.png` | 390 × 844 | Automatic tab; full-page capture | +| `ubuntu-palette.png` | 1440 × 1000 | Ubuntu selected; completed mineral/terracotta transition; full-page capture | +| `copy-response.png` | 1440 × 1000 | Automatic command copied through the real Clipboard API; finite pulse in progress | + +These are actual Chromium screenshots, without compositing or post-processing. The copy pulse is captured during +animation, so its exact line positions can vary between runs. The product preview uses the existing application +screenshot and links to its full version. Automated pixel/color tests cover the interactions that still images +cannot demonstrate, including motion reduction, idle stability and a visibility-boundary simulation. diff --git a/.planning/quick/260905-hia-landing-identity/proofs/copy-response.png b/.planning/quick/260905-hia-landing-identity/proofs/copy-response.png new file mode 100644 index 0000000..0db6a14 Binary files /dev/null and b/.planning/quick/260905-hia-landing-identity/proofs/copy-response.png differ diff --git a/.planning/quick/260905-hia-landing-identity/proofs/desktop.png b/.planning/quick/260905-hia-landing-identity/proofs/desktop.png new file mode 100644 index 0000000..797e597 Binary files /dev/null and b/.planning/quick/260905-hia-landing-identity/proofs/desktop.png differ diff --git a/.planning/quick/260905-hia-landing-identity/proofs/mobile.png b/.planning/quick/260905-hia-landing-identity/proofs/mobile.png new file mode 100644 index 0000000..93f28b9 Binary files /dev/null and b/.planning/quick/260905-hia-landing-identity/proofs/mobile.png differ diff --git a/.planning/quick/260905-hia-landing-identity/proofs/ubuntu-palette.png b/.planning/quick/260905-hia-landing-identity/proofs/ubuntu-palette.png new file mode 100644 index 0000000..7094961 Binary files /dev/null and b/.planning/quick/260905-hia-landing-identity/proofs/ubuntu-palette.png differ diff --git a/apps/docs/docs/developer/e2e.md b/apps/docs/docs/developer/e2e.md index d9006e7..f82eb6f 100644 --- a/apps/docs/docs/developer/e2e.md +++ b/apps/docs/docs/developer/e2e.md @@ -88,3 +88,7 @@ Checks cover the automatic default, every platform tab, keyboard navigation/focu mobile overflow, shell command syntax, agreement with the install guide, and the no-JavaScript fallback. It also rejects the obsolete pre-release deployment notice. This browser check does not execute installation commands or modify host packages/audio. Run `pnpm verify:install` for isolated signed-installer and package-manager fixtures. + +The root page also checks its [signal-path design and GSAP reactions](./landing-page.md), including real canvas +pixel changes, tab palettes, idle stability, reduced-motion preferences and unavailable-canvas fallback. To capture +review proofs, run `pnpm e2e:site --screenshots ` after the combined web build. diff --git a/apps/docs/docs/developer/landing-page.md b/apps/docs/docs/developer/landing-page.md new file mode 100644 index 0000000..9af7298 --- /dev/null +++ b/apps/docs/docs/developer/landing-page.md @@ -0,0 +1,53 @@ +# Landing-page design + +The root page uses a signal-path identity: a geometric wordmark, two intersecting loops, dark ink on mineral +colors, and fine routed lines. Sora is the shared wordmark and interface typeface. The product preview belongs to +the hero composition; it has no added frame, shadow, or rounded shell. It is cropped to emphasize routing and links +to the full application screenshot. + +## Design rules + +- Use typography and spacing to establish hierarchy. Avoid ornamental panels, pills, glows and shadows. +- Reserve strokes for the original loop mark, background paths, selected-tab indicator and keyboard focus. +- Keep installation commands visible. Put extended requirements behind the native disclosure control. +- Keep the automatic installer and all platform/source commands from the install guide in sync. +- Keep metadata and no-JavaScript installation access intact. + +## Motion + +`apps/site/src/lib/signalField.ts` owns the decorative canvas and palette. GSAP animates plain state objects; +rendering is coalesced through a requested animation frame. There are 24 paths with 72 samples each, and backing +resolution is capped at 1.5 device pixels per CSS pixel. There is no idle drawing loop. + +Pointer movement bends nearby paths. A click sends a brief traveling displacement. Successful clipboard completion +sends a separate, slightly stronger pulse; a delayed or failed copy cannot acknowledge the wrong selected tab. +Each installation tab selects a distinct mineral background and ink accent through a short color transition. +The pattern remains static for reduced motion, while palette changes happen immediately. Preference changes are +handled live. Hidden documents stop their motion, and unload removes listeners and tweens. Animation is local and +does not need a network service. + +GSAP **3.15.0** is pinned in the site package and lockfile. It was explicitly requested for this design, verified +against the registry on September 5, 2026, and had been published on April 13, 2026. The tradeoff is an additional +client bundle in return for reusable pointer tweens, coordinated color/pulse motion and interruption control. +See the official [quickTo documentation](https://gsap.com/docs/v3/GSAP/gsap.quickTo()/) for the reusable tween API. + +## Font asset + +`apps/site/public/fonts/sora-latin-variable.woff2` is the locally served Sora Latin variable font, weights 100–800. +It comes from the [Google Fonts Sora distribution](https://fonts.google.com/specimen/Sora), v17, with the original +SIL Open Font License retained in `OFL-Sora.txt`. Source font URL: +[versioned WOFF2](https://fonts.gstatic.com/s/sora/v17/xMQbuFFYT72XzQUpDg.woff2). +The build never fetches fonts, and the page makes no external font requests. + +## Verification and screenshot proofs + +Run `pnpm build:web`, `pnpm verify:site`, and `pnpm e2e:site` with the existing system Playwright setup described in +[the browser-test guide](./e2e.md). The suite checks actual canvas pixels and computed background colors, including +pointer/click/copy responses, transitions, idle stability, live reduced-motion changes and an unavailable canvas. +It also checks the loaded font, absence of decorative framing, command copying, keyboard focus, no-JavaScript +fallback, and layouts from 320px to 1440px. + +Use `pnpm e2e:site --screenshots ` to produce desktop, mobile, Ubuntu palette and successful-copy +proofs. Screenshots use the real page and clipboard API. The copy screenshot captures the finite pulse in progress, +so its line positions vary slightly between runs. Commit review proofs with the task record and embed their raw +GitHub URLs in the PR body. A static screenshot alone does not prove interactive motion; retain the test results too. diff --git a/apps/docs/docs/release-notes/unreleased.md b/apps/docs/docs/release-notes/unreleased.md index 3f2bb24..3e1a9c2 100644 --- a/apps/docs/docs/release-notes/unreleased.md +++ b/apps/docs/docs/release-notes/unreleased.md @@ -7,6 +7,13 @@ These notes describe source-tree progress. They are not a public release announc - The signed installer is now live at `https://loopwire.app/install.sh`; AppImage, deb, and RPM artifacts are available from the `v0.1.0` GitHub Release, with native files documented as direct downloads rather than distro repositories. +## Landing page + +- The root page now uses a flat Sora wordmark and signal-path identity, with the product screenshot integrated into + the main composition. Decorative panels, capability cards, pill controls, shadows and glow have been removed. +- A GSAP background responds to pointer movement, clicks, platform tabs and successful copying. Reduced motion + keeps the linework static and changes palettes immediately. Existing installation commands remain unchanged. + ## Installation - The homepage defaults to a one-command installer with accessible platform tabs, selected-command copying, and diff --git a/apps/site/package.json b/apps/site/package.json index 24410cd..1a288a3 100644 --- a/apps/site/package.json +++ b/apps/site/package.json @@ -12,5 +12,8 @@ "devDependencies": { "astro": "7.2.9", "typescript": "6.0.3" + }, + "dependencies": { + "gsap": "3.15.0" } } diff --git a/apps/site/public/fonts/OFL-Sora.txt b/apps/site/public/fonts/OFL-Sora.txt new file mode 100644 index 0000000..936a84e --- /dev/null +++ b/apps/site/public/fonts/OFL-Sora.txt @@ -0,0 +1,93 @@ +Copyright 2019 The Sora Project Authors (https://github.com/sora-xor/sora-font) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: https://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/apps/site/public/fonts/sora-latin-variable.woff2 b/apps/site/public/fonts/sora-latin-variable.woff2 new file mode 100644 index 0000000..3dbf56e Binary files /dev/null and b/apps/site/public/fonts/sora-latin-variable.woff2 differ diff --git a/apps/site/public/loopwire-mark.svg b/apps/site/public/loopwire-mark.svg index 44dc8c5..812ba33 100644 --- a/apps/site/public/loopwire-mark.svg +++ b/apps/site/public/loopwire-mark.svg @@ -1,8 +1,8 @@ - - Loopwire mark - - - - - + + Loopwire signal paths + + + + + diff --git a/apps/site/src/layouts/SiteLayout.astro b/apps/site/src/layouts/SiteLayout.astro index 73fcc92..7125e57 100644 --- a/apps/site/src/layouts/SiteLayout.astro +++ b/apps/site/src/layouts/SiteLayout.astro @@ -18,8 +18,9 @@ const { title, description, canonical, ogImage } = Astro.props; - - + + + @@ -37,109 +38,33 @@ const { title, description, canonical, ogImage } = Astro.props; diff --git a/apps/site/src/lib/signalField.ts b/apps/site/src/lib/signalField.ts new file mode 100644 index 0000000..f425d00 --- /dev/null +++ b/apps/site/src/lib/signalField.ts @@ -0,0 +1,198 @@ +import { gsap } from "gsap"; + +const palettes: Record = { + automatic: { background: "#efece4", accent: "#176653" }, + arch: { background: "#e6edf0", accent: "#24617c" }, + ubuntu: { background: "#f0e7df", accent: "#974831" }, + debian: { background: "#eee5e5", accent: "#913f56" }, + fedora: { background: "#e5eaf1", accent: "#365c90" }, + opensuse: { background: "#e8ece1", accent: "#4b673b" }, + nix: { background: "#e7eded", accent: "#3d6771" }, + portable: { background: "#f0eadc", accent: "#7b6031" }, + source: { background: "#ece8ef", accent: "#695184" }, +}; + +interface FieldState { + width: number; + height: number; + pointer: { x: number; y: number; strength: number }; + pulse: { progress: number; origin: number; copy: boolean }; +} + +function drawField(context: CanvasRenderingContext2D, state: FieldState, accent: string) { + const { width, height, pointer, pulse } = state; + const envelope = Math.sin(pulse.progress * Math.PI); + const radius = Math.min(width * 0.34, 320); + context.clearRect(0, 0, width, height); + context.lineWidth = 0.85; + + for (let line = 0; line < 24; line += 1) { + const lane = (line % 12) - 5.5; + const braid = line < 12 ? 1 : -1; + context.strokeStyle = line % 4 === 0 ? "#283b34" : accent; + context.globalAlpha = 0.12 + (line % 3) * 0.025 + (pulse.copy ? envelope * 0.08 : 0); + context.beginPath(); + + for (let point = 0; point < 72; point += 1) { + const t = point / 71; + let x = width * (-0.06 + t * 1.14); + let y = height * (1.12 - 0.62 * t - 0.1 * Math.sin(t * Math.PI * 2)); + y += braid * height * 0.095 * Math.sin(t * Math.PI * 1.65); + y += lane * Math.min(6, height * 0.006) * (0.45 + 0.7 * Math.sin(t * Math.PI)); + y += Math.sin(t * 18 + line * 0.25) * 2.4; + + const dx = pointer.x - x; + const dy = pointer.y - y; + const attraction = Math.exp(-(dx * dx + dy * dy) / (radius * radius)) * pointer.strength; + x += dx * attraction * 0.045; + y += dy * attraction * 0.075; + const distance = pulse.copy ? t - pulse.progress : Math.abs(t - pulse.origin) - pulse.progress; + y += Math.exp(-distance * distance * 110) * envelope * (pulse.copy ? 28 : 17) * braid; + + if (point === 0) context.moveTo(x, y); + else context.lineTo(x, y); + } + context.stroke(); + } + context.globalAlpha = 1; +} + +/** Owns decorative canvas motion and the selected install palette; never intercepts input. */ +export function createSignalField(canvas: HTMLCanvasElement) { + const context = canvas.getContext("2d"); + const root = document.documentElement; + const preference = window.matchMedia("(prefers-reduced-motion: reduce)"); + const originalBackground = root.style.getPropertyValue("--page-bg"); + const originalAccent = root.style.getPropertyValue("--accent"); + const colors = { ...palettes.automatic }; + const state: FieldState = { + width: window.innerWidth, + height: window.innerHeight, + pointer: { x: window.innerWidth * 0.7, y: window.innerHeight * 0.7, strength: 0 }, + pulse: { progress: 1, origin: 0.5, copy: false }, + }; + let selected = "automatic"; + let destroyed = false; + let resizePending = true; + let frame = 0; + let pointerTweens: ReturnType[] = []; + const canAnimate = () => !destroyed && !preference.matches && !document.hidden; + + function requestDraw() { + if (destroyed || document.hidden || frame || !context) return; + frame = window.requestAnimationFrame(() => { + frame = 0; + if (resizePending) { + state.width = window.innerWidth; + state.height = window.innerHeight; + const ratio = Math.min(window.devicePixelRatio || 1, 1.5); + canvas.width = Math.round(state.width * ratio); + canvas.height = Math.round(state.height * ratio); + context.setTransform(ratio, 0, 0, ratio, 0, 0); + resizePending = false; + } + drawField(context, state, colors.accent); + }); + } + + function paintPalette() { + root.style.setProperty("--page-bg", colors.background); + root.style.setProperty("--accent", colors.accent); + requestDraw(); + } + + function select(id: string) { + if (destroyed) return; + selected = Object.hasOwn(palettes, id) ? id : "automatic"; + canvas.dataset.palette = selected; + gsap.killTweensOf(colors); + if (canAnimate()) { + gsap.to(colors, { ...palettes[selected], duration: 0.8, ease: "power2.inOut", onUpdate: paintPalette }); + } else { + Object.assign(colors, palettes[selected]); + paintPalette(); + } + } + + function stopMotion() { + pointerTweens.forEach((move) => move.tween.kill()); + pointerTweens = []; + gsap.killTweensOf(state.pulse); + state.pointer.strength = 0; + state.pulse.progress = 1; + if (frame) window.cancelAnimationFrame(frame); + frame = 0; + } + + function refreshMotion() { + stopMotion(); + gsap.killTweensOf(colors); + Object.assign(colors, palettes[selected]); + canvas.dataset.motion = preference.matches ? "reduced" : document.hidden ? "paused" : "interactive"; + if (canAnimate() && context) { + pointerTweens = ["x", "y", "strength"].map((property) => + gsap.quickTo(state.pointer, property, { duration: 0.7, ease: "power3.out", onUpdate: requestDraw })); + } + paintPalette(); + } + + function pointerMove(event: PointerEvent) { + if (!canAnimate() || event.pointerType === "touch") return; + pointerTweens[0]?.(event.clientX); + pointerTweens[1]?.(event.clientY); + pointerTweens[2]?.(1); + } + + function pointerLeave() { + if (canAnimate()) pointerTweens[2]?.(0); + } + + function pulse(copy: boolean, origin = 0.5) { + if (!canAnimate() || !context) return; + gsap.killTweensOf(state.pulse); + Object.assign(state.pulse, { progress: 0, origin, copy }); + gsap.to(state.pulse, { progress: 1, duration: copy ? 1.15 : 0.85, ease: "none", onUpdate: requestDraw }); + } + + function click(event: MouseEvent) { + pulse(false, event.detail === 0 ? 0.5 : event.clientX / Math.max(state.width, 1)); + } + + function resize() { + resizePending = true; + requestDraw(); + } + + window.addEventListener("pointermove", pointerMove, { passive: true }); + document.documentElement.addEventListener("pointerleave", pointerLeave); + window.addEventListener("blur", pointerLeave); + window.addEventListener("click", click, { passive: true, capture: true }); + window.addEventListener("resize", resize, { passive: true }); + document.addEventListener("visibilitychange", refreshMotion); + preference.addEventListener("change", refreshMotion); + canvas.dataset.palette = selected; + refreshMotion(); + + return { + select, + copied: () => pulse(true), + destroy() { + if (destroyed) return; + destroyed = true; + stopMotion(); + gsap.killTweensOf(colors); + window.removeEventListener("pointermove", pointerMove); + document.documentElement.removeEventListener("pointerleave", pointerLeave); + window.removeEventListener("blur", pointerLeave); + window.removeEventListener("click", click, true); + window.removeEventListener("resize", resize); + document.removeEventListener("visibilitychange", refreshMotion); + preference.removeEventListener("change", refreshMotion); + root.style.setProperty("--page-bg", originalBackground); + root.style.setProperty("--accent", originalAccent); + context?.clearRect(0, 0, state.width, state.height); + delete canvas.dataset.palette; + delete canvas.dataset.motion; + }, + }; +} diff --git a/apps/site/src/pages/index.astro b/apps/site/src/pages/index.astro index 027849a..0dcbc56 100644 --- a/apps/site/src/pages/index.astro +++ b/apps/site/src/pages/index.astro @@ -99,12 +99,6 @@ const installOptions = [ href: "/docs/developer/architecture.html", link: "Developer guide" } ]; -const capabilities = [ - ["PipeWire", "First-class routing path"], - ["PulseAudio", "Compatibility adapter"], - ["JACK", "Existing-port bridge"], - ["ALSA", "Diagnostics and hardware discovery"] -]; const applicationJsonLd = { "@context": "https://schema.org", "@type": "SoftwareApplication", @@ -128,81 +122,90 @@ const applicationJsonLd = { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fbf9a1c..b09e6c8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -65,6 +65,10 @@ importers: version: 4.1.9(@types/node@26.1.0)(vite@8.1.3(@types/node@26.1.0)(esbuild@0.28.2)) apps/site: + dependencies: + gsap: + specifier: 3.15.0 + version: 3.15.0 devDependencies: astro: specifier: 7.2.9 @@ -1704,6 +1708,9 @@ packages: github-slugger@2.0.0: resolution: {integrity: sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==} + gsap@3.15.0: + resolution: {integrity: sha512-dMW4CWBTUK1AEEDeZc1g4xpPGIrSf9fJF960qbTZmN/QwZIWY5wgliS6JWl9/25fpTGJrMRtSjGtOmPnfjZB+A==} + h3@1.15.11: resolution: {integrity: sha512-L3THSe2MPeBwgIZVSH5zLdBBU90TOxarvhK9d04IDY2AmVS8j2Jz2LIWtwsGOU3lu2I5jCN7FNvVfY2+XyF+mg==} @@ -3851,6 +3858,8 @@ snapshots: github-slugger@2.0.0: {} + gsap@3.15.0: {} + h3@1.15.11: dependencies: cookie-es: 1.2.3 diff --git a/scripts/e2e-site-install.mjs b/scripts/e2e-site-install.mjs index 70ab458..d1b827a 100644 --- a/scripts/e2e-site-install.mjs +++ b/scripts/e2e-site-install.mjs @@ -2,7 +2,7 @@ /** Built homepage interaction checks. Uses an existing Playwright installation, like e2e-desktop-ui.mjs. */ import assert from "node:assert/strict"; import { execFileSync } from "node:child_process"; -import { readFileSync } from "node:fs"; +import { mkdirSync, readFileSync } from "node:fs"; import { createServer } from "node:http"; import { createRequire } from "node:module"; import { extname, resolve, sep } from "node:path"; @@ -11,7 +11,11 @@ const root = resolve("dist/site"); const guide = readFileSync("apps/docs/docs/guide/install.md", "utf8"); const platforms = ["automatic", "arch", "ubuntu", "debian", "fedora", "opensuse", "nix", "portable", "source"]; const automatic = "curl -fsSL https://loopwire.app/install.sh | bash"; -const mime = { ".html": "text/html", ".js": "text/javascript", ".css": "text/css", ".png": "image/png", ".svg": "image/svg+xml" }; +const proofIndex = process.argv.indexOf("--screenshots"); +const proofDir = proofIndex < 0 ? undefined : process.argv[proofIndex + 1]; +assert.ok(proofIndex < 0 || proofDir, "--screenshots requires an output directory"); +const mime = { ".html": "text/html", ".js": "text/javascript", ".css": "text/css", ".png": "image/png", + ".svg": "image/svg+xml", ".woff2": "font/woff2" }; let playwright; for (const base of [import.meta.url, "file:///usr/lib/e2e-resolver.js"]) { try { playwright = createRequire(base)("playwright"); break; } catch { /* Try the existing system installation. */ } @@ -43,12 +47,26 @@ try { assert.equal(await page.locator('[role="tab"]').count(), platforms.length); assert.equal(await page.locator('[role="tabpanel"]:visible code').textContent(), automatic); assert.doesNotMatch(await page.locator("body").innerText(), /Pre-release today|Bunny deploy|VM proof pass/); + assert.equal(await page.locator(".capability-row, .install-card, .shot").count(), 0); + assert.equal(await page.getByRole("link", { name: "Loopwire home" }).count(), 1); + assert.ok(await page.locator(".hero .product-preview img").isVisible()); + await page.evaluate(() => document.fonts.ready); + assert.ok(await page.evaluate(() => [...document.fonts].some((font) => font.family === "Sora" && font.status === "loaded"))); + const framing = await page.locator(".hero, .install, .install-controls, .product-preview, button, .wordmark").evaluateAll( + (elements) => elements.map((element) => { + const style = getComputedStyle(element); + return [style.borderRadius, style.boxShadow, style.textShadow, style.filter, style.borderTopWidth]; + }) + ); + for (const style of framing) assert.deepEqual(style, ["0px", "none", "none", "none", "0px"]); console.log("PASS: automatic default and obsolete notice removed"); + const paletteColors = new Set(); for (const platform of platforms) { await page.locator(`#install-tab-${platform}`).click(); assert.equal(await page.locator('[role="tab"][aria-selected="true"]').count(), 1); assert.equal(await page.locator('[role="tabpanel"]:visible').getAttribute("id"), `install-panel-${platform}`); + paletteColors.add(await page.evaluate(() => getComputedStyle(document.documentElement).backgroundColor)); const command = await page.locator('[role="tabpanel"]:visible code').textContent(); execFileSync("bash", ["-n"], { input: command }); assert.ok(guide.includes(command), `${platform} instructions must match the install guide`); @@ -56,6 +74,7 @@ try { await page.waitForFunction(() => document.querySelector("[data-copy-install]").textContent === "Copied"); assert.equal(await page.evaluate(() => navigator.clipboard.readText()), command); } + assert.equal(paletteColors.size, platforms.length, "every tab selects a distinct background palette"); console.log("PASS: all nine panels, shell command syntax, guide parity and selected-command clipboard"); await page.locator("#install-tab-source").focus(); @@ -92,6 +111,135 @@ try { assert.equal(await plain.locator("[data-copy-install]").isVisible(), false); assert.ok(await plain.getByRole("link", { name: "all platform instructions" }).isVisible()); console.log("PASS: no-JavaScript installer and platform-guide fallback"); + + const motionContext = await browser.newContext({ + permissions: ["clipboard-read", "clipboard-write"], reducedMotion: "no-preference", viewport: { width: 1440, height: 1000 } + }); + const motion = await motionContext.newPage(); + await motion.addInitScript(() => { + const clear = CanvasRenderingContext2D.prototype.clearRect; + window.signalDraws = 0; + CanvasRenderingContext2D.prototype.clearRect = function (...args) { + window.signalDraws += 1; + return clear.apply(this, args); + }; + }); + motion.on("pageerror", (error) => errors.push(error.message)); + await motion.goto(url); + await motion.locator('#signal-field[data-motion="interactive"]').waitFor(); + await motion.evaluate(() => new Promise((done) => requestAnimationFrame(() => requestAnimationFrame(done)))); + const pixels = () => motion.locator("#signal-field").evaluate((canvas) => canvas.toDataURL()); + const changedPixels = (previous) => motion.waitForFunction( + (before) => document.querySelector("#signal-field").toDataURL() !== before, previous, { timeout: 3500 } + ); + let before = await pixels(); + const idleDraws = await motion.evaluate(() => window.signalDraws); + await motion.waitForTimeout(180); + assert.equal(await pixels(), before, "background does not run an idle drawing loop"); + assert.equal(await motion.evaluate(() => window.signalDraws), idleDraws, "idle canvas is not repeatedly redrawn"); + await motion.mouse.move(1100, 770); + await changedPixels(before); + await motion.waitForTimeout(800); + before = await pixels(); + await motion.mouse.click(1200, 900); + await changedPixels(before); + await motion.waitForTimeout(1000); + + const startingColor = await motion.evaluate(() => getComputedStyle(document.documentElement).backgroundColor); + await motion.locator("#install-tab-ubuntu").click(); + await motion.waitForFunction((start) => getComputedStyle(document.documentElement).backgroundColor !== start, startingColor); + const intermediateColor = await motion.evaluate(() => getComputedStyle(document.documentElement).backgroundColor); + await motion.waitForTimeout(750); + const finalColor = await motion.evaluate(() => getComputedStyle(document.documentElement).backgroundColor); + assert.notEqual(intermediateColor, startingColor, "GSAP begins the palette transition"); + assert.notEqual(intermediateColor, finalColor, "palette changes over time, not just in one CSS assignment"); + + // Delay clipboard completion so its distinct success pulse is measured after the generic click has settled. + await motion.evaluate(() => { + navigator.clipboard.writeText = () => new Promise((resolve) => { window.finishCopy = resolve; }); + }); + await motion.locator("[data-copy-install]").click(); + await motion.waitForTimeout(1000); + before = await pixels(); + await motion.evaluate(() => window.finishCopy()); + await motion.waitForFunction(() => document.querySelector("[data-copy-install]").textContent === "Copied"); + await changedPixels(before); + await motion.waitForTimeout(1300); + console.log("PASS: real canvas pointer/click/copy reactions, finite motion, and animated palette transitions"); + + await motion.emulateMedia({ reducedMotion: "reduce" }); + await motion.locator('#signal-field[data-motion="reduced"]').waitFor(); + await motion.waitForTimeout(80); + before = await pixels(); + await motion.mouse.move(600, 800); + await motion.mouse.click(1200, 900); + await motion.waitForTimeout(250); + assert.equal(await pixels(), before, "reduced motion suppresses pointer/click animation"); + await motion.locator("[data-copy-install]").click(); + await motion.evaluate(() => window.finishCopy()); + await motion.waitForTimeout(120); + assert.equal(await pixels(), before, "reduced motion suppresses successful-copy animation"); + await motion.locator("#install-tab-fedora").click(); + assert.notEqual(await motion.evaluate(() => getComputedStyle(document.documentElement).backgroundColor), finalColor); + await motion.waitForTimeout(80); + before = await pixels(); + await motion.waitForTimeout(200); + assert.equal(await pixels(), before, "reduced-motion palette changes settle immediately"); + console.log("PASS: live reduced-motion preference suppresses animation while retaining palette/copy behavior"); + + // Simulate the visibility boundary and count actual canvas draws, rather than trusting the debug attribute alone. + await motion.emulateMedia({ reducedMotion: "no-preference" }); + await motion.mouse.move(900, 700); + await motion.evaluate(() => { + Object.defineProperty(document, "hidden", { configurable: true, value: true }); + document.dispatchEvent(new Event("visibilitychange")); + }); + const hiddenDraws = await motion.evaluate(() => window.signalDraws); + await motion.mouse.move(1100, 820); + await motion.waitForTimeout(200); + assert.equal(await motion.evaluate(() => window.signalDraws), hiddenDraws, "hidden document stops drawing"); + await motion.evaluate(() => { + delete document.hidden; + document.dispatchEvent(new Event("visibilitychange")); + }); + await motion.waitForTimeout(80); + before = await pixels(); + await motion.mouse.move(850, 720); + await changedPixels(before); + console.log("PASS: visibility-boundary simulation stops drawing and restores interactions"); + + const noCanvas = await browser.newPage(); + await noCanvas.addInitScript(() => { HTMLCanvasElement.prototype.getContext = () => null; }); + await noCanvas.goto(url); + await noCanvas.locator("#install-tab-arch").click(); + assert.equal(await noCanvas.locator('[role="tabpanel"]:visible').getAttribute("id"), "install-panel-arch"); + assert.deepEqual(errors, []); + console.log("PASS: unavailable canvas does not break platform selection"); + + if (proofDir) { + mkdirSync(proofDir, { recursive: true }); + const proof = await motionContext.newPage(); + await proof.goto(url); + await proof.locator('#signal-field[data-motion="interactive"]').waitFor(); + await proof.evaluate(() => document.fonts.ready); + await proof.screenshot({ path: resolve(proofDir, "desktop.png"), fullPage: true }); + await proof.locator("#install-tab-ubuntu").click(); + await proof.waitForTimeout(1000); + await proof.screenshot({ path: resolve(proofDir, "ubuntu-palette.png"), fullPage: true }); + await proof.locator("#install-tab-automatic").click(); + await proof.waitForTimeout(1000); + await proof.locator("[data-copy-install]").click(); + await proof.waitForFunction(() => document.querySelector("[data-copy-install]").textContent === "Copied"); + await proof.waitForTimeout(260); + await proof.screenshot({ path: resolve(proofDir, "copy-response.png"), fullPage: true, animations: "allow" }); + const mobile = await motionContext.newPage(); + await mobile.setViewportSize({ width: 390, height: 844 }); + await mobile.goto(url); + await mobile.locator('#signal-field[data-motion="interactive"]').waitFor(); + await mobile.evaluate(() => document.fonts.ready); + await mobile.screenshot({ path: resolve(proofDir, "mobile.png"), fullPage: true }); + console.log(`Screenshot proofs written to ${proofDir}`); + } } finally { await browser?.close(); await new Promise((done) => server.close(done)); diff --git a/scripts/verify-static-site.mjs b/scripts/verify-static-site.mjs index 050bc88..3c9d2ee 100644 --- a/scripts/verify-static-site.mjs +++ b/scripts/verify-static-site.mjs @@ -15,7 +15,8 @@ const robots = readRequired("robots.txt"); const sitemap = readRequired("sitemap.xml"); const installer = readRequired("install.sh"); -assertContains(homepage, ">Loopwire", "homepage h1"); +assertContains(homepage, "Sound,", "homepage headline"); +assertContains(homepage, 'aria-label="Loopwire home"', "homepage wordmark"); assertContains(homepage, "", "homepage canonical"); assertContains(homepage, "\"@type\":\"SoftwareApplication\"", "JSON-LD software type"); assertContains(homepage, "PipeWire-first virtual audio routing", "homepage description"); @@ -32,7 +33,8 @@ assertContains(homepage, "href=\"/docs/\"", "docs primary link"); assertContains(homepage, "https://github.com/sandwichfarm/loopwire", "GitHub link"); assertContains(homepage, "https://github.com/sandwichfarm/loopwire/releases", "releases link"); assertContains(homepage, "Loopwire desktop shell showing one saved device", "homepage screenshot alt"); -assertContains(homepage, "Diagnostics and hardware discovery", "ALSA capability label"); +assertContains(homepage, 'id="signal-field"', "interactive signal background"); +if (homepage.includes('class="capability-row"')) fail("obsolete capability cards remain on the homepage"); assertContains(docsIndex, "Loopwire Docs", "docs title"); assertContains(docsIndex, "/docs/guide/install.html", "docs install link");