-
2026-03-10
Direct DOM Swipe-Back: Finishing What the Ownership Audit Started
Three days ago, I reverted a direct DOM swipe optimization because the action was writing transforms to the wrong element. The fix was simple: walk up to the view layer with closest(), and own the entire gesture lifecycle without touching Svelte's reactive graph. The result dropped swipe-back from ~8ms/frame to under 1ms.
-
2026-03-10
Peek Swipe: TikTok-Style Navigation in a Userscript
Replaced instant flick navigation with a peek gesture that reveals the next or previous stream sliding in as you drag. A 20% threshold commits the transition; anything less snaps back. The tricky part was coordinating the animation commit with an event-driven navigation system that assumes it owns visibility.
-
2026-03-07
HLS Playlist Accuracy: Why Safari iOS Broke and Other Players Didn't
Safari iOS refused to play certain HLS streams because the downloader was building playlists with rounded durations and missing discontinuity tags. The accurate data existed — ffprobe already computed it — but the interface threw it away. Fixing the return type fixed the spec compliance.
-
2026-03-07
Ownership Audit: Five Bugs With One Root Cause
A performance refactoring broke swipe gestures and exposed four more bugs in gallery-reader. Every one traced back to the same root cause: unclear ownership of state that crosses session boundaries. Applying Rust-like ownership thinking — single owner, explicit borrowers — fixed all five.
-
2026-03-07
Ownership-Based Scroll Sync Between Reader and Chapter List
When swiping back from the reader to manga details, the chapter list showed a stale scroll position. The fix captures where the user clicked, then invisibly scrolls the hidden manga view as chapters advance — so the current chapter is already in place when they swipe back.
-
2026-03-05
Stack-Based View Navigation: Fixing Chained Swipe-Back and Favorites
Chained swipe-back gestures (reader→manga→list) hit a black screen because navigation used a single previousViewMode slot. Favorites couldn't be swiped back to because it wasn't a real view. Replacing the single slot with a view stack fixed both problems.
-
2026-02-25
From Tap Quadrants to Swipe Gestures in a Hostile DOM
Replaced a click-based quadrant overlay with swipe gestures in a userscript that hijacks the page's event system. Touch events had to bypass our own addEventListener block using the saved original reference, and the iOS-native edge-back swipe needed to reveal a hidden list view mid-gesture.
-
2026-02-25
iOS WebKit Silently Kills IntersectionObservers After visibility:hidden
The manga reader's infinite scroll stopped loading after navigating list -> manga -> reader -> list. The IntersectionObserver was still connected but never fired again. iOS WebKit permanently breaks observers whose root element goes through CSS visibility changes. The fix: a generation counter that forces recreation on view re-entry, plus a health check for edge cases where even a fresh observer misses.
-
2026-02-25
Monorepo Migration: Extracting Source-Specific Logic from hitomi-frontend/backend
Merging two repos into one, pulling all Hitomi-specific constants and logic into a shared gallery-sources package
-
2026-02-25
The Stale Filename Marker: Why Swipe Navigation Showed Black Screens
Swiping between streams navigated correctly but showed a black screen. The video element thought it was loaded, but HLS was dead. A skip optimization trusted a DOM marker without verifying the stream was actually alive.
-
2026-02-25
Why Opening the Reader Froze: HTTP/1.1 Connection Starvation from Sprite Polls
Clicking a gallery to read it showed nothing for minutes. Sprite thumbnail polls held all 6 HTTP/1.1 connections hostage. The reactive abort ran too late because Svelte 5 effects are asynchronous. A synchronous centralized abort in openReader() fixed it instantly.
-
2026-02-22
TL Provider: Killing Phase 0 — Unified IDB-First Loading
The progressive UX only worked on first open. On second open, cached liveUrls loaded all at once. The fix: check IDB inline per-streamer, consume leftover entries after the endpoint list, and make every open look the same.
-
2026-02-21
Building an Automated Hitomi Gallery Sync System
77 tracked artists, zero manual checking — building a daily sync pipeline for hitomi.la
-
2026-02-21
Converting the Admin Portal to a SvelteKit 5 PWA
From a 632-line index.html to a data-driven SvelteKit SPA with PWA installability and auto-deploy
-
2026-02-21
Fixing iPhone Wireless Backup & Automating Photo Extraction
Debugging a 4-month-old wireless backup failure and automating HEIC photo extraction
-
2026-02-21
Fixing Two Invisible Bugs in the iOS Trading PWA
Fixing stale account balance after iOS resume and a missing chart bar at minute boundaries
-
2026-02-21
TL Provider: Soft Refresh, IndexedDB Cache & the 404 Rewrite
Building a resilient live stream list — caching liveUrls, fixing black screens, replacing a timer with a processing queue, and learning that organic signals beat proactive checks