Add JSDoc docstrings across all utility and i18n modules
Brings docstring coverage from ~33% to well above the 80% threshold.
Every exported and non-trivial internal function now has a /** */ docstring
describing its contract, not just its name.
Files updated:
- src/utils/bluesky-api.ts — all 9 functions (fetchWithTimeout, fetchProfile,
resolveHandle, fetchPost, extractPostId, truncateText, fetchVideoPosts,
toAbsoluteUrl, getImageMimeType) + 2 export interfaces
- src/utils/richtext.ts — escapeHtml, parseRichText, parseRichTextTruncated
- src/utils/video-ambient-backdrop.ts — oklchToCss, normalizeHue,
getVideoAmbientBackdropGradientColors, hashVideoAmbientBackdropSeed,
getVideoAmbientBackdropInlineStyle
- src/utils/orbyt-api.ts — ColorData, OrbytApiBinding, getColor
- src/utils/ios-distribution.ts — normalizeCountryCode, isAltstorePalRegion,
getIosDownloadOptions, getIosDownloadOptionsFromRequest, iosHrefForOptions
- src/utils/profile-colors.ts — getRelativeLuminance, blendColors
- src/middleware.ts — matchAcceptLanguage, onRequest (full detection-order docs)
- src/i18n/utils.ts — isValidLocale, useTranslations, localeToHtmlLang,
getLocaleUrl, hreflangLinks
- src/actions/index.ts — loadMorePosts
https://claude.ai/code/session_01Ek5Qwg11ePJwKdeS1x6LwS