Skip to content

Prune stale boundFields entries for long-lived sessions #28

@adnaan

Description

@adnaan

Context

Follow-up from PR #25 (Change() auto-inference).

Source PR: #25
Suggested by: @claude[bot]

Task

boundFields in ChangeAutoWirer grows monotonically — fields are added but never removed. Fields that appear in conditional template branches that are no longer rendered stay in the map indefinitely.

Not a correctness bug (querySelectorAll returns nothing for absent fields), but could be a minor memory/performance concern in long-lived sessions with many conditional fields.

Consider clearing and rebuilding boundFields from the full tree state periodically, or tracking fields seen in the latest walk and pruning stale ones.

Location

state/change-auto-wirer.tsanalyzeStatics() method


This issue was created from PR review comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    follow-upFollow-up task from PR review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions