Skip to content

fix(agera): drop the development warning about a signal written inside a computed - #266

Merged
dangreen merged 1 commit into
mainfrom
fix/agera-write-warning
Sep 25, 2026
Merged

dangreen merged 1 commit into
mainfrom
fix/agera-write-warning

Conversation

@dangreen

Copy link
Copy Markdown
Member

Why

The development build of agera warned whenever a signal was written while a computed was evaluating. Libraries do that on purpose: a cache that creates an entry on its first read writes inside the computed that read it. CacheStorage.$get of @nano_kit/query inserts the entry into its SignalsMap as the computed of a query evaluates, the signal of the entry and the version of the map, so examples/weather/react-nano_kit-di printed six warnings on start, none of them about the application. The check cannot tell such a write from a mistake in a computed of the application.

What

  • The check in signalOper is removed, with the specs in system.spec.ts that covered it.
  • The warnings about an effect or an effect scope created inside a computed stay.

Size

Nothing changes in production: the check was behind import.meta.env.DEV, and every size-limit entry of agera measures dist/index.production.js. The development build loses the check and its message.

Notes

  • Found while trying the devtools panel of feat(devtools,store): add the DevTools panel #263 on the weather example.
  • Checked in the dev tree: oxlint and tsc of agera, the unit tests of agera, 194 and the expected failure that was there before, of kida, 100, of store, 74, and of query, 166. The pre-push hook was skipped on purpose: it runs the whole monorepo suite in parallel, which the dev machine does not survive. CI runs the rest.

…e a computed

A cache that creates an entry on its first read writes inside a computed on purpose: `CacheStorage.$get` of `@nano_kit/query` inserts the entry into its `SignalsMap` as the computed of a query evaluates, and the weather example printed six warnings on start, none of them about the application. The warnings about an effect or an effect scope created inside a computed stay.
@codecov

codecov Bot commented Sep 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.66%. Comparing base (61186e0) to head (35a4eaf).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #266      +/-   ##
==========================================
- Coverage   83.67%   83.66%   -0.02%     
==========================================
  Files          99       99              
  Lines        2628     2626       -2     
  Branches      590      589       -1     
==========================================
- Hits         2199     2197       -2     
  Misses        295      295              
  Partials      134      134              

☔ 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.

@dangreen
dangreen merged commit 21e269b into main Sep 25, 2026
10 checks passed
@dangreen
dangreen deleted the fix/agera-write-warning branch September 25, 2026 18:00
@github-actions github-actions Bot mentioned this pull request Sep 24, 2026
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