Skip to content

v2.0.0 - Frontend Source Mapping

Choose a tag to compare

@jakub-lipinski jakub-lipinski released this 25 Apr 10:57

v2.0.0 - Frontend Source Mapping

This major release expands Lens for Laravel from a Blade-focused accessibility auditor into a broader Laravel frontend
accessibility tool for Blade, Livewire, React, Vue, and Inertia applications.

Added

  • React source locating for files under resources/js/**/*.js|jsx|ts|tsx
  • Vue source locating for resources/js/**/*.vue
  • Inertia-friendly source discovery for resources/js/Pages/**
  • AI Fix support for React and Vue files
  • sourceType metadata on located issues: blade, react, or vue
  • Source type badges in the dashboard
  • Scan history with persisted issues and source locations
  • Scan comparison for new, fixed, and remaining issues
  • Trend data endpoint for recent scans
  • Optional JavaScript-rendered crawler for SPA/Inertia apps:
    • LENS_FOR_LARAVEL_CRAWLER_RENDER_JAVASCRIPT=true
  • Optional post-network-idle scan delay for hydration-heavy pages:
    • LENS_FOR_LARAVEL_SCAN_WAIT_MS=500
  • Additional locator heuristics for:
    • JSX expression attributes
    • React className
    • Vue :href and v-bind
    • Vue :class object keys
    • CSS/class variants like primary-button, primaryButton, and PrimaryButton
  • v2 documentation updates covering Blade, Livewire, React, Vue, Inertia, SPA crawling, and upgrade notes

Changed

  • Source location is no longer Blade-only.
  • AI Fix now supports Blade, React, and Vue source files.
  • The dashboard now displays source type information next to source locations.
  • Whole-site crawling can optionally render JavaScript before extracting links.
  • Scan output may now include a sourceType field.

Security

  • AI Fix writes remain restricted to supported source paths:
    • resources/views/**/*.blade.php
    • resources/js/**/*.js
    • resources/js/**/*.jsx
    • resources/js/**/*.ts
    • resources/js/**/*.tsx
    • resources/js/**/*.vue
  • Path traversal protection remains enforced.
  • Generated fixes containing dangerous server-side execution functions are blocked.
  • Unexpected raw PHP tags introduced by AI fixes are rejected.

Upgrade Notes

Run migrations after upgrading:

php artisan migrate

If you previously published the config, add the new v2 options manually or republish the config:

'crawler_render_javascript' => env('LENS_FOR_LARAVEL_CRAWLER_RENDER_JAVASCRIPT', false),
'scan_wait_ms' => env('LENS_FOR_LARAVEL_SCAN_WAIT_MS', 0),

For SPA/Inertia apps, enable JavaScript link discovery when needed:

LENS_FOR_LARAVEL_CRAWLER_RENDER_JAVASCRIPT=true

For delayed Livewire/Inertia/React/Vue rendering, configure a scan delay:

LENS_FOR_LARAVEL_SCAN_WAIT_MS=500

### Notes

Source mapping is heuristic. Lens can locate many common Blade, React, Vue, and Inertia patterns, but deeply abstracted
components, runtime-generated attributes, or interaction-only UI states may still require manual review.