Notes from shipping code
Deep-dives on the problems I've debugged, the patterns I've extracted, and the decisions I'd make differently next time.

Killing Split-Brain Content with One Metadata Export
How moving cover images, titles, and excerpts into MDX metadata eliminated 680 lines of duplicate records and the silent drift between them.

Sentry Should Be Optional in Your Next.js App
A single boolean guard across three runtimes keeps Sentry from crashing local dev when the DSN is missing.

Mobile Visual Regression Without Doubling Your Test Count
A typed page config array turns 9 copy-pasted Playwright tests into a loop that runs at two viewports with zero duplication.

Correlating a Multi-Step Funnel with One sessionStorage ID
A timestamp and random suffix in sessionStorage ties scan, completion, email capture, and calendar booking into one GA4 funnel with zero backend state.

Upgrading cmdk Search with MiniSearch Field Boosting
cmdk does substring matching. Keeping its UI shell and swapping the filter engine for MiniSearch gives ranked, fuzzy results with match highlighting.

Cycling Theme Toggle: From Radio Group to Single Button
Replacing a three-button theme picker with a single cycling button and a keyboard shortcut reclaims nav space without losing discoverability.

Systematic prefers-reduced-motion Across a Component Library
Auditing every animated component for motion sensitivity reveals which animations are decorative and which need static alternatives.

Site Search Without a Server: Static Index and cmdk
A build-time search index and cmdk power Cmd+K search across 47 pages with zero API calls.

Phantom Dependencies: What pnpm Strict Mode Reveals
Migrating from Yarn Classic to pnpm exposes dependencies that worked by accident, not by declaration.

An 8-Second Timeout for Third-Party Iframes
An iframe that never loads looks like a broken page. An 8-second timeout and a direct booking link keep users moving instead of staring.

Replacing a GitHub Action with 15 Lines of Shell
dorny/paths-filter silently ignored its own config. A 15-line shell case statement replaces it and actually works.

Tooltip aria-describedby Was on the Wrong Element
A Tooltip component passed every test but put aria-describedby on a wrapper div instead of the trigger. Screen readers never announced it.