Skip to content

feat: add site hardening, test suite, CI workflows, and Diataxis docs#80

Merged
rlespinasse merged 20 commits into
mainfrom
next
Mar 20, 2026
Merged

feat: add site hardening, test suite, CI workflows, and Diataxis docs#80
rlespinasse merged 20 commits into
mainfrom
next

Conversation

@rlespinasse
Copy link
Copy Markdown
Contributor

@rlespinasse rlespinasse commented Mar 19, 2026

Summary

Infrastructure, testing, and documentation overhaul:

  • Self-host rick assets locally with WebP support and add service worker for offline capability
  • Extract karaoke inline JavaScript into a dedicated karaoke.js module
  • Add link expiration dates, ad-blocker detection, and generator UX enhancements
  • Add cache-busting via content hashing, doc linting, and test infrastructure in justfile
  • Add CI workflows for Lighthouse audits, broken link checks, and preview builds
  • Add comprehensive Playwright test suite (e2e, a11y, visual, unit)
  • Expand contributing guide and add testing reference page
  • Restructure all documentation following the Diataxis method (tutorials, how-to, explanation, reference)
  • Extract PR comment markdown into template files for preview and lighthouse workflows
  • Fix test dependencies, playwright config, and add test recipes to justfile

Closes

Closes #38, closes #39, closes #40, closes #41, closes #42
Closes #43, closes #44, closes #45, closes #46, closes #47
Closes #48, closes #50, closes #51
Closes #76, closes #77

Related (partially implemented)

Test plan

  • just check — lint, build, and Playwright tests pass (113 tests across 3 browsers)
  • Verify Lighthouse, links, and preview CI workflows trigger on PR
  • Open /karaoke/ — verify extracted JS module loads correctly
  • Open /generate/ — verify link expiration and blocker detection work
  • Verify docs/ structure follows Diataxis categories (tutorials, how-to, explanation, reference)
  • Test service worker caches rick assets for offline playback

🤖 Generated with Claude Code

rlespinasse and others added 8 commits March 19, 2026 22:01
- Replace external Giphy GIF with self-hosted rick.gif/rick.webp using <picture> element
- Add Content-Security-Policy headers to all pages
- Add preload hints for critical assets (fonts, images, scripts, styles)
- Add crossorigin attribute to GoatCounter script tags
- Add service worker for offline caching

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move karaoke page inline scripts to site/karaoke/karaoke.js for
better maintainability and cache efficiency.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add link expiration with configurable TTL (1h, 24h, 7d, 30d)
- Add ad-blocker/extension detection with graceful fallback
- Add expiry selector to link generator page
- Add CSP header and crossorigin attribute to generator page

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add content-hash cache-busting for CSS/JS in build pipeline
- Add markdown documentation linter (lint-docs) to justfile
- Add package.json with Playwright and axe-core test dependencies
- Add Playwright config for multi-browser E2E testing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Update deploy workflow to use just build with cache-busting
- Add Lighthouse CI workflow with PR score comments
- Add weekly broken link checker with auto-issue creation
- Add PR preview build workflow with artifact upload

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add E2E tests for all themed scenarios and link generator
- Add unit tests for Web Audio API melody synthesis
- Add visual regression tests for responsive layouts
- Add accessibility audits with axe-core (WCAG 2.1 AA)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Rewrite CONTRIBUTING.md with setup, theme creation, and PR workflow
- Move theme creation details from README to CONTRIBUTING
- Add comprehensive TESTING.md covering all test suites and debugging

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace inline guides in CONTRIBUTING.md, README.md, and TESTING.md
with a dedicated docs/ tree organized by Diataxis categories:
tutorials, how-to guides, explanation, and reference pages.
The root files now serve as concise hubs linking into the new structure.
@rlespinasse rlespinasse changed the title Build infrastructure, testing, and documentation overhaul feat: add site hardening, test suite, CI workflows, and Diataxis docs Mar 19, 2026
rlespinasse and others added 6 commits March 19, 2026 22:28
- preview.yaml: fix upload-artifact SHA (was upload-pages-artifact's)
  and update to v4.6.2
- links.yaml: fix invalid lychee-action SHA, upgrade to v2.8.0
- dependabot.yml: add npm ecosystem for test dependency updates

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move inline comment content from preview and lighthouse workflows
into dedicated template files under .github/comment-templates/.
Also use step outputs instead of env for the HTTP server PID.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Standardize editor settings, line ending normalization, binary file
detection, and ignore patterns for build artifacts and dependencies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace `playwright` with `@playwright/test` which provides the test
runner, and `@axe-core/playwright` with `axe-playwright` to match
the actual imports used in the test files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Set explicit port and directory in playwright webServer command to
match the configured baseURL, and remove TypeScript type annotations
from .js test files that caused parse errors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add test-unit, test-e2e, test-a11y, test-visual, and test recipes
to manage Playwright test execution. Include tests in the check
recipe and fix @echo usage inside bash shebang block.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wraas wraas deleted a comment from github-actions Bot Mar 19, 2026
@wraas wraas deleted a comment from github-actions Bot Mar 19, 2026
rlespinasse and others added 2 commits March 19, 2026 23:22
Use an HTML marker to find and update an existing Lighthouse comment
rather than creating a new one on each workflow run. Also handle
undefined results with a fallback value.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove @echo from build recipe to fix just v1.47.1 compatibility
- Add -I flag to grep to skip binary files in URL check
- Update CI comment to find-and-update instead of creating duplicates

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Preview Build

✅ Build completed successfully!

Download Preview

The built site is available as an artifact: preview-site-80

To preview locally:

  1. Download the artifact from the Actions tab
  2. Unzip the archive
  3. Open index.html in your browser

Or run a simple HTTP server:

python3 -m http.server 8000

Then visit http://localhost:8000

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 19, 2026

Lighthouse Performance Report

⚠️ NEEDS IMPROVEMENT

Audit Results

  • /: Performance 69, Accessibility 95, Best Practices 75, SEO 100
  • /about/: Performance 97, Accessibility 100, Best Practices 75, SEO 100
  • /generate/: Performance 100, Accessibility 87, Best Practices 75, SEO 66
  • /karaoke/: Performance 100, Accessibility 92, Best Practices 75, SEO 66
  • /404.html: Performance 73, Accessibility 95, Best Practices 75, SEO 100

All categories must score 90 or higher.

rlespinasse and others added 2 commits March 19, 2026 23:57
…-off

Add daily CI check (check-sri.yaml) that detects GoatCounter SRI hash
mismatches and opens a PR to update automatically. Document the SRI
trade-off in all HTML files. Add SRI integrity attributes where missing.
Replace setup-just with taiki-e/install-action and lazy-load karaoke JS.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add three new Diataxis docs: CI workflow reference, CI failure
debugging guide, and SRI supply-chain explanation. Replace the
placeholder SECURITY.md with a proper security policy covering
scope, reporting, and security measures. Remove the TESTING.md
redirect stub. Update README and CONTRIBUTING indexes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Preview Build

✅ Build completed successfully!

Download Preview

The built site is available as an artifact: preview-site-80

To preview locally:

  1. Download the artifact from the Actions tab
  2. Unzip the archive
  3. Open index.html in your browser

Or run a simple HTTP server:

python3 -m http.server 8000

Then visit http://localhost:8000

rlespinasse and others added 2 commits March 20, 2026 00:49
Generate favicon assets and logo from logo_source.png, replace
inline SVG emoji favicons with proper favicon links across all
pages. Add logo alongside title/tagline on about, generate, and
karaoke pages. Unify accent color to #5bcefa (logo cyan) across
all CSS, JS, and HTML — replacing the previous green (#4ade80)
and blue (#3b82f6, #1a73e8) accents for a cohesive brand identity.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Restrict URL grep to text files and add || true to handle
  empty pipeline results after filtering
- Add missing meta descriptions on generate and karaoke pages
- Add site.webmanifest and link it from all pages to fix
  Lighthouse Best Practices score

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

CI Failures

External URLs

The following external URLs are unreachable:

  • https://fonts.googleapis.com in site/karaoke/index.html (HTTP 404)
  • https://fonts.gstatic.com in site/karaoke/index.html (HTTP 404)

Please fix before merging.

@github-actions
Copy link
Copy Markdown
Contributor

Preview Build

✅ Build completed successfully!

Download Preview

The built site is available as an artifact: preview-site-80

To preview locally:

  1. Download the artifact from the Actions tab
  2. Unzip the archive
  3. Open index.html in your browser

Or run a simple HTTP server:

python3 -m http.server 8000

Then visit http://localhost:8000

@rlespinasse rlespinasse merged commit 18da340 into main Mar 20, 2026
1 of 3 checks passed
@rlespinasse rlespinasse deleted the next branch March 20, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment