Skip to content

Keep Alpine listener coverage stable across morphs - #10

Merged
VitaliyBoyko merged 14 commits into
mainfrom
fix/alpine-morph-rebind-lifecycle
Nov 24, 2026
Merged

VitaliyBoyko merged 14 commits into
mainfrom
fix/alpine-morph-rebind-lifecycle

Conversation

@VitaliyBoyko

Copy link
Copy Markdown
Collaborator

Preserve Alpine CSP coverage through morphdom rebinds. The collector deduplicates Alpine’s final attribute records after native cleanup. Each bound coverage getter follows the live template marker and original directive name. Static binding markers carry that name so a restore can reorder DOM attributes. The served directive expression remains unchanged.

On v2.1.3, one batched click incremented twice, a restored conditional directive incremented once and recorded zero hits, and a marker-only template swap credited template A. The 2.1.4 candidate increments once in all three cases and credits the exact current statement. The stock-context tests also pass. Eight repeated same-response morphs produce no additional attribute mutations.

Local validation passed 55 unit tests, 21 Playwright checks, 19 Cypress checks, TypeScript and npm pack --dry-run. The local MageLens clean Hyvä Playwright run with the packed candidate is underway.

Consumer tracking is in MageLens #104. The 2.1.4 package version is prepared for maintainer review.

@VitaliyBoyko
VitaliyBoyko merged commit 7884621 into main Nov 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant