Files
ServerKit/frontend/src/hooks
Juan DenisandClaude Opus 4.8 9bd6d18f2c refactor(frontend): Phase 5 §8.3/§8.2 — useLockBodyScroll hook + markdown link hardening
Per docs/plans/FRONTEND_UX_TAILWIND_CLEANUP_PLAN.md Phase 5.
- Add hooks/useLockBodyScroll.js: a ref-counted body-scroll lock that composes
  nested locks correctly (a modal over an already-locked drawer no longer
  restores scroll prematurely). Replaces the duplicated
  document.body.style.overflow toggles in DashboardLayout (mobile nav drawer),
  PreviewDrawer (file preview), and ChatDrawer (mobile AI sheet).
- lib/ai/markdown.js: escape quotes in link URLs. The renderer already
  HTML-escapes all input and only emits allowlisted tags, but `"`/`'` in a
  crafted URL could break out of the href attribute — now percent-encoded.

Verified: npm run build passes; eslint adds no new errors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 02:24:27 -04:00
..