Skip to content

perf(runtime-tags): skip serializing unused controllable <let> change handler#3293

Open
DylanPiercey wants to merge 1 commit into
mainfrom
claude/runtime-tags-serialization-uuq9w5
Open

perf(runtime-tags): skip serializing unused controllable <let> change handler#3293
DylanPiercey wants to merge 1 commit into
mainfrom
claude/runtime-tags-serialization-uuq9w5

Conversation

@DylanPiercey

Copy link
Copy Markdown
Contributor

A controllable <let>'s valueChange handler (TagVariableChange:<binding>) is only read back on resume by _let_change, and only when the variable is actually reassigned on the client. Reactive value= updates run in rendering mode and re-set the handler from the fresh argument, so they don't depend on the serialized copy — only a direct assignment (the signal's entry point) does.

The handler is now serialized only when the binding has assignment sites. The decision is made in finalizeReferences over the marked controllable-<let> bindings (rather than the post-prune bindings set), so it still applies when the <let>'s value was pruned but it's still assigned + has a change handler.

No behavior change: only writes.*.html / html.bundle.* / sizes.json snapshots changed — no render/dom.bundle diffs. Two fixtures with a never-reassigned controllable <let> (let-bind-to-undefined, let-bind-stateful-upstream-alias) drop the dead handler from their resume payload.


Generated by Claude Code

@changeset-bot

changeset-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a731a01

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
marko Patch
@marko/runtime-tags Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@DylanPiercey, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 50 minutes and 26 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 706006b1-9076-4285-9f94-7c01eb1522b1

📥 Commits

Reviewing files that changed from the base of the PR and between 0048472 and a731a01.

⛔ Files ignored due to path filters (8)
  • packages/runtime-tags/src/__tests__/fixtures/let-bind-stateful-upstream-alias/__snapshots__/html.bundle.debug.js is excluded by !**/__snapshots__/** and included by **
  • packages/runtime-tags/src/__tests__/fixtures/let-bind-stateful-upstream-alias/__snapshots__/html.bundle.js is excluded by !**/__snapshots__/** and included by **
  • packages/runtime-tags/src/__tests__/fixtures/let-bind-stateful-upstream-alias/__snapshots__/writes.debug.html is excluded by !**/__snapshots__/** and included by **
  • packages/runtime-tags/src/__tests__/fixtures/let-bind-stateful-upstream-alias/__snapshots__/writes.html is excluded by !**/__snapshots__/** and included by **
  • packages/runtime-tags/src/__tests__/fixtures/let-bind-to-undefined/__snapshots__/html.bundle.debug.js is excluded by !**/__snapshots__/** and included by **
  • packages/runtime-tags/src/__tests__/fixtures/let-bind-to-undefined/__snapshots__/html.bundle.js is excluded by !**/__snapshots__/** and included by **
  • packages/runtime-tags/src/__tests__/fixtures/let-bind-to-undefined/__snapshots__/writes.debug.html is excluded by !**/__snapshots__/** and included by **
  • packages/runtime-tags/src/__tests__/fixtures/let-bind-to-undefined/__snapshots__/writes.html is excluded by !**/__snapshots__/** and included by **
📒 Files selected for processing (5)
  • .changeset/let-change-handler-serialization.md
  • packages/runtime-tags/src/__tests__/fixtures/let-bind-stateful-upstream-alias/sizes.json
  • packages/runtime-tags/src/__tests__/fixtures/let-bind-to-undefined/sizes.json
  • packages/runtime-tags/src/translator/core/let.ts
  • packages/runtime-tags/src/translator/util/references.ts

Walkthrough

The PR changes runtime-tags so controllable <let> bindings are tracked when valueChange is present, and finalizeReferences only adds TagVariableChange serialization for tracked bindings that have assignmentSections. It also updates two size fixtures and marks marko and @marko/runtime-tags for patch releases in the changeset.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: skipping serialization of an unused controllable <let> change handler.
Description check ✅ Passed The description accurately explains the runtime-tags serialization change and its snapshot-only impact.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/runtime-tags-serialization-uuq9w5

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.25%. Comparing base (f368176) to head (a731a01).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3293   +/-   ##
=======================================
  Coverage   94.25%   94.25%           
=======================================
  Files         383      383           
  Lines       50869    50894   +25     
  Branches     3855     3859    +4     
=======================================
+ Hits        47946    47971   +25     
  Misses       2897     2897           
  Partials       26       26           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…ge handler

A controllable `<let>`'s `valueChange` handler is only read back on resume
(`_let_change`) when the variable is actually reassigned on the client; reactive
`value=` updates run in rendering mode and re-set the handler from the fresh arg.
The `TagVariableChange` accessor is now serialized only when the binding has
assignment sites, resolved in `finalizeReferences` over the marked bindings (so
it still applies when the value was pruned). No behavior change.
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