Skip to content

fix: dedup heading-anchor IDs and add controls to reduced-motion demo videos#245

Merged
tomasz-tomczyk merged 1 commit into
mainfrom
audit/frontend-fixes
May 30, 2026
Merged

fix: dedup heading-anchor IDs and add controls to reduced-motion demo videos#245
tomasz-tomczyk merged 1 commit into
mainfrom
audit/frontend-fixes

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

@tomasz-tomczyk tomasz-tomczyk commented May 30, 2026

Summary

Two review-page / marketing fixes found in the pre-release audit of v0.9.0..main:

  • Duplicate heading IDsdocument-renderer.js heading_open set id=slug with no de-duplication, so a doc with two headings slugifying to the same value emitted duplicate ids and anchor clicks (hashchange nav and the in-page heading_close link) always scrolled to the first match. Ports crit local's GitHub-style dedup (baseSlug, baseSlug-1, …) via a counter on the md instance, reset once per buildLineBlocks render so it doesn't leak across re-renders. IDs now match crit local exactly (parity contract).
  • Reduced-motion demo videos — the homepage mode-grid videos had only data-lazy-src (no src) and no controls; under prefers-reduced-motion app.js skips loading them, leaving a poster with no way to play. Adds controls to match the hero and mode-page videos.

Review

  • Code review: passed (fresh frontend review; dedup reset semantics + both anchor consumers verified)
  • Parity audit: passed (id scheme byte-identical to crit local; per-file reset matches parseMarkdown clear)

Test plan

🤖 Generated with Claude Code

… videos

Two review-page / marketing fixes:

- document-renderer.js: the heading_open renderer set id=slug with no
  de-duplication, so a doc with two headings slugifying to the same
  value emitted duplicate ids and anchor clicks (hashchange nav and the
  in-page heading_close link) always scrolled to the first match. Port
  crit local's GitHub-style dedup (baseSlug, baseSlug-1, …) via a
  counter on the md instance, reset once per buildLineBlocks render so
  it doesn't leak across re-renders. IDs now match crit local exactly.

- home.html.heex: the homepage mode-grid demo videos had only
  data-lazy-src (no src) and no controls; under prefers-reduced-motion
  app.js skips loading them, leaving a poster with no way to play. Add
  controls to match the hero and mode-page videos.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.42%. Comparing base (21a90e5) to head (2837a52).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #245   +/-   ##
=======================================
  Coverage   82.42%   82.42%           
=======================================
  Files          89       89           
  Lines        3089     3089           
=======================================
  Hits         2546     2546           
  Misses        543      543           
Flag Coverage Δ
unit 82.42% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tomasz-tomczyk tomasz-tomczyk merged commit f3a5730 into main May 30, 2026
4 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the audit/frontend-fixes branch May 30, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant