diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..3a30968 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,94 @@ +# Changelog + +All notable changes to SoftHarbor. The site is continuously deployed; a +version marks a release announced in the repository (docs/13). Dates are +UTC. + +## [1.1.0] — 2026-10-21 + +A full review of the site after launch: security advisories closed, real +production bugs fixed, a new look, and two Cloudflare services added with a +privacy policy rewritten to match. + +### Privacy — read this if you read nothing else + +v1.0 said "no analytics". That changed, deliberately and narrowly: + +- **Cloudflare Web Analytics** (cookieless, nothing stored in your browser) + now counts page views. It does **not load at all** if your browser sends + **Global Privacy Control**, and never on preview or local hosts. +- **Cloudflare Turnstile** runs once in the legal gate, **only after** you + accept the terms, to tell people from bots. It usually needs no click. A + pass is remembered for 48 hours. If it cannot run — blocked, offline, or our + endpoint down — you are let in anyway. +- The [Privacy Policy](https://softharbor.net/legal/privacy) was rewritten to + say exactly what each of these sees and what we keep (nothing identifying), + and the legal version was bumped, so everyone is asked to accept once more. + +### Added + +- **A new look ("Harbor")**: cool chart-paper light theme and a navy night + theme, hairline rules, soft shadows, a frosted header, a home page with a + live "manifest" of the catalogue and a category grid, redesigned app cards + and detail pages, a five-column footer, and Lucide icons that move a little + on hover or focus — and not at all if you ask for reduced motion. +- **Display menu**: theme (system/light/dark), scrollbar (default, thin or + hidden — scrolling still works), and motion (system or reduced). Applied + before the first paint, so nothing flashes. +- **Contact page** (`/contact`, `/vi/contact`) with one address per purpose: + security, privacy, legal, copyright (DMCA), listing takedowns, licensing, + Code of Conduct, press and collaboration — all `@poli0981.dev`. +- **Shareable search**: the query, filters and sort are kept in the URL; a + "Best match" order while searching; Vietnamese searches ignore diacritics. +- **Installable app**: the PWA manifest is linked, with proper icons; the + offline page now comes with its styles. +- **Third-party notices** now list every package the site is built from, + generated at build time. +- **More "in this category"** on every app page, and a panel explaining what + the security status does and does not mean. + +### Fixed + +- Hashed assets were served with two contradictory `Cache-Control` values, + so browsers revalidated them on every visit; the JSON feeds were never + cached. Each now gets exactly one. +- The legal gate could be dismissed with Esc in Chromium; its exemptions + missed the real 404 and offline pages; its links looked like plain text. +- Search: a late result could filter the grid after the box was cleared; + "Clear all" left the search text in place; a Czech-locale browser sorted 81 + of the 326 apps differently; the page announced the count twice per key. +- Small type (14 px and 12.5 px) was rendering at 16 px across the site. +- The language switcher marked English as current on Vietnamese pages and + linked VI to the home page; its accessible name now keeps the visible code. +- Theme flicker on navigation, a growing pile of CSP tags and a sort menu that + disagreed with the grid — all from the old soft-navigation router, now + replaced by native page transitions. +- Pages no longer overflow sideways on phones. +- Error, 404 and offline pages are bilingual; "1 apps" is "1 app". + +### Security & maintenance + +- Every open Dependabot advisory closed (including a critical Astro RCE); + dependencies refreshed; GitHub Actions pinned to commit SHAs; Dependabot + configured (Renovate had never run). +- A tiny Worker (`worker/`, `POST /api/verify`) is the only server code; every + page is still served as a static asset. +- The CSP now covers every script in the page head, and the build fails on + anything the policy would silently refuse. +- Data rules enforced at build time: official links only (download portals, + tracking parameters, look-alike hosts and invisible characters rejected), + real dates, evidence required for a security status. +- Tests: 340+ unit, component, build-script and Worker tests (≈95 % coverage of + shipped code, enforced), plus a Playwright + axe suite that loads every page + type in both languages and both themes on desktop and mobile, and fails on + any console error, CSP violation, accessibility violation or sideways + overflow. + +## [1.0.0] — 2026-07-30 + +First public release: 326 apps in 12 categories, English and Vietnamese, +official links only, dated security statuses with their scans linked. See the +[release notes](https://github.com/poli0981/softharbor/releases/tag/v1.0.0). + +[1.1.0]: https://github.com/poli0981/softharbor/releases/tag/v1.1.0 +[1.0.0]: https://github.com/poli0981/softharbor/releases/tag/v1.0.0 diff --git a/CLAUDE.md b/CLAUDE.md index 14b0a5c..67c8b4e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,7 +2,7 @@ > Root instruction file for AI-assisted development (Claude Code). > Read this first. Detailed specs live in `docs/00–16`. -> Suite version: 1.2 (2026-07-27) · Author: poli0981 / SkullMute +> Suite version: 1.3 (2026-10-21, site v1.1) · Author: poli0981 / SkullMute ## What this project is diff --git a/README.md b/README.md index 7caa5a4..6b4874a 100644 --- a/README.md +++ b/README.md @@ -28,11 +28,18 @@ explaining it away. The scan is linked either way — judge it yourself. ## How it is built -Fully static. No server, no database, no backend, no tracking, and no -third-party request at runtime — fonts, icons and scripts are all self-hosted. +Static. No database, no accounts, no cookies; fonts, icons and scripts are +self-hosted. The exceptions are deliberate and small: one tiny Worker endpoint +that checks the legal gate's Cloudflare Turnstile token (`worker/`, and the +gate lets you in even if the check cannot run), and cookieless Cloudflare Web +Analytics, which does not load at all when your browser sends Global Privacy +Control. The [Privacy Policy](https://softharbor.net/legal/privacy) has the +details. Astro 7 (static) · Svelte 5 islands · Tailwind CSS 4 · TypeScript strict · -Node 24 · pnpm 10 · deployed to Cloudflare Workers Static Assets. +Node 24 · pnpm 11 · Cloudflare Workers Static Assets (+ one Worker route). +Tested with Vitest (unit, islands, build scripts, the Worker) and Playwright + +axe on the built site. ```bash pnpm install diff --git a/e2e/fixtures.ts b/e2e/fixtures.ts index bf8c993..329850f 100644 --- a/e2e/fixtures.ts +++ b/e2e/fixtures.ts @@ -81,6 +81,23 @@ export async function waitForIsland(page: Page, name: string): Promise { }, name); } +/** + * Resolves once every finite animation on the page has finished. The pages + * rise into place on load (global.css `sh-rise`); axe measures colour + * contrast with the element's CURRENT opacity, so scanning mid-fade reports + * contrast failures that no settled page has. + */ +export async function settled(page: Page): Promise { + await page.evaluate(() => + Promise.all( + document + .getAnimations() + .filter((a) => a.effect?.getComputedTiming().iterations !== Infinity) + .map((a) => a.finished.catch(() => undefined)), + ), + ); +} + /** * Pre-accept the legal gate (the current version) AND its human check, before * the page loads — for tests about something other than the gate. diff --git a/e2e/smoke.spec.ts b/e2e/smoke.spec.ts index 926d979..377949f 100644 --- a/e2e/smoke.spec.ts +++ b/e2e/smoke.spec.ts @@ -5,7 +5,7 @@ // errors, no CSP violations (fixture), and no serious/critical axe findings. import AxeBuilder from '@axe-core/playwright'; -import { acceptGate, expect, test } from './fixtures'; +import { acceptGate, expect, settled, test } from './fixtures'; const PAGES = [ '/', @@ -21,6 +21,8 @@ const PAGES = [ '/vi/categories/security-privacy', '/vi/legal/disclaimer', '/offline', + '/contact', + '/vi/contact', ]; for (const path of PAGES) { @@ -31,6 +33,13 @@ for (const path of PAGES) { await expect(page.locator('h1').first()).toBeVisible(); // The pre-paint script ran: a theme is always resolved. await expect(page.locator('html')).toHaveAttribute('data-theme', /^(light|dark)$/); + // Nothing pokes past the right edge. On a phone that is not a scrollbar + // but a zoomed-out page (the layout viewport widens to fit), and it + // happened twice in v1.1 — a grid sized by min-content, then decoration. + const overflow = await page.evaluate( + () => document.documentElement.scrollWidth - document.documentElement.clientWidth, + ); + expect(overflow, 'horizontal overflow in px').toBeLessThanOrEqual(0); }); } @@ -52,6 +61,7 @@ for (const scheme of ['light', 'dark'] as const) { await page.emulateMedia({ colorScheme: scheme }); await acceptGate(page); await page.goto(path); + await settled(page); const results = await new AxeBuilder({ page }) .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22aa']) .analyze(); diff --git a/eslint.config.js b/eslint.config.js index de04286..2025900 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -73,8 +73,9 @@ export default tseslint.config( // the monochrome theming docs/04 §2 and docs/14 §3d require. files: [ 'src/components/ShAppCard.astro', + // The single UI-icon component (src/lib/icon.ts behind it). + 'src/components/ShIcon.astro', 'src/components/pages/AppDetailPage.astro', - 'src/components/pages/CategoriesPage.astro', // ShJsonLd emits JSON.stringify() of an object it builds itself into a //