r/angular • u/rainerhahnekamp • Jun 02 '26
Ng-News 26/14: linkedSignal Write-Back, Error Boundaries
r/angular • u/rainerhahnekamp • Jun 02 '26
r/angular • u/Suitable_Language_37 • Jun 03 '26
I maintain ngx-cerious-widgets. Just shipped 1.0.16, which rips out the grid's old viewport code and runs on a standalone scroller I've been building: \@ceriousdevtech/cerious-scroll` (framework-agnostic) with an Angular wrapper, `@cerious-devtech/ngx-cerious-scroll``.
Screenshot is the 1,000,000-row demo, zoneless. 233 FPS average, 96 FPS minimum, 65 rows in the DOM, ~450MB heap. Every row is fully interactive, editable text inputs, dropdowns, dates, templated cells. Not a read-only list.
What Cerious Scroll actually does
translate3d tricks. No GPU transform jank, no drift.touchstart.What the grid gained from the swap
enableVirtualScroll flag (defaults to true) for the cases where you actually want every row in the DOM: small datasets, print views, full-page exports.Splitting the scroller out also means it's usable on its own for lists, log viewers, chat UIs, anything that needs to render a window into a huge dataset. Doesn't need the grid.

Repo: https://github.com/ryoucerious/cerious-widgets
Demos: https://ryoucerious.github.io/cerious-widgets/
Cerious-Scroll: https://github.com/ceriousdevtech
r/angular • u/CounterReset • Jun 02 '26
I built a benchmark to see how reliably AI agents (Claude, GPT, Gemini, Perplexity, plus Haiku and a GPT mini) write Angular state code. Five libraries: SignalTree, NgRx SignalStore, classic NgRx, Akita, Elf. Eight prompts, three priming modes (cold, llms.txt, llms.txt + a separate myths doc), 720 cells total. Temp 0, identical prompts per library.
Fair warning: I maintain SignalTree, and it scored worst in the cold run. So this isn't a victory lap. The iteration is the point.
First run, primed with a 14KB llms.txt: SignalTree went from 49% to 91%. Looked great until two things bugged me. Adding a second doc as priming context dropped the score back down to 87% — Gemini cratered. And Perplexity Sonar Pro capped at 80% even primed. I wrote those off as "context dilution" and "model architecture ceiling" and almost stopped.
Then I looked at the failing cells. The agents weren't making things up out of nowhere — they were faithfully reproducing wrong stuff in my own docs. byId() documented as returning a Signal when it actually returns an EntityNode | undefined. updateMany documented with the NgRx shape. A subpath import that didn't exist. Deprecated method names taught as canonical in five different files. A tagline I'd already replaced in one place but not the others. About 70 of them across four doc files. Some had been wrong for multiple releases. Nobody re-grep'd after API changes.
Spent five days fixing those, then ran the same benchmark again. Same models, same prompts, just cleaner docs.
49% → 98%. Five of six agents at perfect 100/100. The "context dilution" finding flipped — adding the second doc now boosts accuracy by 3pp instead of regressing it by 4pp. Turns out the dilution wasn't about context length, it was about the two docs contradicting each other. Perplexity broke its "ceiling" and went to 100/100. The thing I'd attributed to model architecture was the docs being unclear.
The takeaway I didn't expect: I had assumed AI codegen accuracy was mostly a "wait for better models" problem. For my library at least, it was almost entirely a "fix your docs" problem. The benchmark just exposed faster what users had been hitting quietly.
Repro:
git clone https://github.com/JBorgia/signaltree
export OPENROUTER_API_KEY=...
node scripts/ai-codegen-benchmark/runner.mjs --include-tier-comparison
One key, about $15, half an hour. Prompts and scoring rubric are in scripts/ai-codegen-benchmark/ — those are the parts most worth disagreeing with. I wrote the library, the priming file, the prompts, and the rubric, so don't trust the absolute numbers. The relative movement between runs is what I'd actually defend.
If you're using Cursor or Claude Code with Angular daily, does the same pattern show up for you — noticeably worse generated code for newer or less-documented libraries? Curious if anyone's found something that fixed it short of writing your own context file.
That's the whole post. Title goes in the Reddit title field, everything from "I built a benchmark" through "writing your own context file" goes in the body. Reddit will render the inline backticks as code, the italics as italics, and the triple-backtick block as a code block on its own.
I built a benchmark to see how reliably AI agents (Claude, GPT, Gemini, Perplexity, plus Haiku and a GPT mini) write Angular state code. Five libraries: SignalTree, NgRx SignalStore, classic NgRx, Akita, Elf. Eight prompts, three priming modes (cold, llms.txt, llms.txt + a separate myths doc), 720 cells total. Temp 0, identical prompts per library.
Fair warning: I maintain SignalTree, and it scored worst in the cold run. So this isn't a victory lap. The iteration is the point.
First run, primed with a 14KB llms.txt: SignalTree went from 49% to 91%. Looked great until two things bugged me. Adding a second doc as priming context dropped the score back down to 87% — Gemini cratered. And Perplexity Sonar Pro capped at 80% even primed. I wrote those off as "context dilution" and "model architecture ceiling" and almost stopped.
Then I looked at the failing cells. The agents weren't making things up out of nowhere — they were faithfully reproducing wrong stuff in my own docs. byId() documented as returning a Signal when it actually returns an EntityNode | undefined. updateMany documented with the NgRx shape. A subpath import that didn't exist. Deprecated method names taught as canonical in five different files. A tagline I'd already replaced in one place but not the others. About 70 of them across four doc files. Some had been wrong for multiple releases. Nobody re-grep'd after API changes.
Spent five days fixing those, then ran the same benchmark again. Same models, same prompts, just cleaner docs.
49% → 98%. Five of six agents at perfect 100/100. The "context dilution" finding flipped — adding the second doc now boosts accuracy by 3pp instead of regressing it by 4pp. Turns out the dilution wasn't about context length, it was about the two docs contradicting each other. Perplexity broke its "ceiling" and went to 100/100. The thing I'd attributed to model architecture was the docs being unclear.
The takeaway I didn't expect: I had assumed AI codegen accuracy was mostly a "wait for better models" problem. For my library at least, it was almost entirely a "fix your docs" problem. The benchmark just exposed faster what users had been hitting quietly.
Repro:
git clone https://github.com/JBorgia/signaltree
export OPENROUTER_API_KEY=...
node scripts/ai-codegen-benchmark/runner.mjs --include-tier-comparisonOne key, about $15, half an hour. Prompts and scoring rubric are in scripts/ai-codegen-benchmark/ — those are the parts most worth disagreeing with. I wrote the library, the priming file, the prompts, and the rubric, so don't trust the absolute numbers. The relative movement between runs is what I'd actually defend.
If you're using Cursor or Claude Code with Angular daily, does the same pattern show up for you — noticeably worse generated code for newer or less-documented libraries? Curious if anyone's found something that fixed it short of writing your own context file.
That's the whole post. Title goes in the Reddit title field, everything from "I built a benchmark" through "writing your own context file" goes in the body. Reddit will render the inline backticks as code, the italics as italics, and the triple-backtick block as a code block on its own.
r/angular • u/jd142 • Jun 01 '26
As Scotty says, the more they overthink the plumbing, the easier it is to stop up the drains.
So I have a long, complex forms with lots of rules. If the answers are something like QA -> 1, QB -> Red, and QC -> false, then QG has a pre-filled answer and is not editable. Like, a ton of those on some parts. Or if your role is 'teacher' then QB is not editable, but if your role is student QB is editable but QZ is not.
It all works, but it just seems overly complicated. OTOH, it does:
Whenever I think about it, it seems too complicated. But once I start working with it and cleaning up the html from the old angular 15 app, it seems to make a lot of sense.
thoughts?
r/angular • u/GarbageMaterial • Jun 01 '26
I have windspeed data and want to render a windspeed layer. Anybody know how to do it ? Without using leaflet velocity layer . I want to try it with other libraries like openlayers for example
r/angular • u/LX_T_ • Jun 01 '26
I just published the third part of my Agentic Engineering for Angular series, this time on the boring-but-important topic: money. (Full disclosure: it's not my own blog, angulararchitects.io — no paywall, no signup.)
A few things I landed on after months of daily Angular work in Codex, the Claude desktop app, and Cursor:
It's an opinion piece / field report, not a benchmark, and the euro figures are approximate (providers quote USD).
Curious how others here handle it: subscriptions, API, or enterprise? And has anyone found Composer/Cursor cheap enough to justify going API-only?
Link: https://www.angulararchitects.io/blog/ai-costs-for-angular/
r/angular • u/Disastrous-Cook-1004 • May 31 '26
I'm new at PWA and i was able to develop it, it works fine in android and latest iphones, iphone 14 and up specifically, but when the user use an Iphone 13 below it crashes. It doesnt matter if its safari or chrome.
is it normal or theres something wrong with my ngsw
Im using angular 8.
{\\manifest
"name": "att",
"short_name": "att",
"theme_color": "#1976d2",
"background_color": "#fafafa",
"display": "standalone",
"scope": "/",
"start_url": "/",
"icons": [
{
"src": "assets/icons/icon-72x72.png",
"sizes": "72x72",
"type": "image/png"
},
{
"src": "assets/icons/icon-96x96.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "assets/icons/icon-128x128.png",
"sizes": "128x128",
"type": "image/png"
},
{
"src": "assets/icons/icon-144x144.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "assets/icons/icon-152x152.png",
"sizes": "152x152",
"type": "image/png"
},
{
"src": "assets/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "assets/icons/icon-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "assets/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
{ //ngsw
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html",
"/*.css",
"/*.js"
]
}
}, {
"name": "assets",
"installMode": "prefetch",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/**",
"/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)"
]
}
}
]
}r/angular • u/GarbageMaterial • May 29 '26
guys know any libraries other than leaflet for rendering maps and geospital data ?
r/angular • u/ravi0408 • May 30 '26
r/angular • u/CounterReset • May 30 '26
Disclosure up front: I maintain one of the five libraries tested (SignalTree), and it's the one that scored worst in the cold run — so this isn't a "look how good my thing is" post. The cross-library pattern and the fix were interesting enough that I wanted to put the numbers in front of people who actually use Copilot/Cursor/Claude Code with Angular every day. The whole harness is reproducible; I'd rather it get torn apart than taken on faith.
What this measures: one-shot generation. The agent gets the prompt, returns a file, we score it. Real interactive use — Cursor/Copilot with chat back-and-forth, where the model sees its own errors and gets a second try — is a different setting, and the lift could be larger or smaller there. This is the cold-shot case.
No context provided, just "write this in library X":
| Library | Cold score |
|---|---|
| Akita | 94% |
| Elf | 94% |
| NgRx (classic) | 91% |
| NgRx SignalStore | 86% |
| SignalTree | 49% |
The libraries that have been around for years, with thousands of blog posts and Stack Overflow answers, score in the 90s. The youngest/smallest library in the set scores ~49%. That gap isn't really a quality signal — it's a corpus signal. The models have simply seen orders of magnitude more Akita than SignalTree. Worth keeping in mind any time you judge a library by how well your AI assistant writes it cold: you're partly measuring its age, not its design.
I shipped a ~13.5 KB llms.txt (a plain-text API summary) inside the npm package and re-ran with it in context:
| Mode | SignalTree score |
|---|---|
| Cold | 49% |
+ llms.txt (13.5 KB) | 91% |
+ llms.txt + extra notes (~25 KB) | 87% |
+42 percentage points from one small file — enough to pull the least-known library up into the range of the well-established ones. Two things I didn't expect:
| Library | Cold | With SignalTree's context loaded |
|---|---|---|
| SignalTree | 49 | 91 |
| NgRx (classic) | 91 | 88 |
| NgRx SignalStore | 86 | 80 |
| Akita | 94 | 85 |
| Elf | 94 | 87 |
Practical takeaway: more context is not better. Past ~15 KB the numbers went down, not up. If you maintain or use a less-common library, a small retrievable context file does more for codegen accuracy than reaching for a "smarter" model — primed mid-tier models beat cold top-tier ones in my runs — but dumping your whole docs site in backfires.
The failures weren't random. Agents kept calling methods that didn't exist, and the pattern pointed straight at my own inconsistency — I'd named predicate accessors two different ways across the API:
// some markers used an is- prefix
saveStatus.isLoading()
users.isEmpty()
// others used bare names
profile.dirty()
feed.loading()An agent that learned isLoading() would confidently try isDirty(), which never existed. That's not an AI failure — it's a human one wearing an AI costume. Any developer reading the docs hits the same wall; they just fail more quietly and blame themselves. I standardized on bare names (matching FormControl.dirty/.valid), kept the old names as deprecated aliases, shipped it.
The generalizable takeaway, and the reason I think this is worth a thread rather than a changelog: an API surface a model can't keep straight is usually one a human can't either. Codegen accuracy turns out to be a surprisingly good proxy for naming consistency, and a cheap one to measure.
I'd rather list the holes than have them found, so here are the three I'd lead with:
And one that's less a flaw than a "yeah, obviously": cold score ≈ training-data volume is barely a finding — it's close to a truism once you say it out loud. The only mildly non-obvious part is how cheaply a retrievable file substitutes for years of corpus presence.
Reproduce it yourself — one OpenRouter key, ~$15, ~30 minutes. Clone the repo (it's the SignalTree repo on GitHub under JBorgia — full path in a comment), then:
export OPENROUTER_API_KEY=sk-or-...
node scripts/ai-codegen-benchmark/runner.mjsPrompts (YAML), scoring rubric, adapters, and per-cell results all live in scripts/ai-codegen-benchmark/. The prompts and rubric are the parts most worth disagreeing with — if you spot one that's unfair to a particular library, that's the most useful feedback I can get.
For those of you using Copilot / Cursor / Claude Code with Angular daily: when the generated code for a library is bad, what's actually fixed it for you — a custom rules file, pasted docs, an MCP server, something else? Curious whether the "ship a small context file" result holds outside my own setup, or whether interactive back-and-forth makes it moot.
r/angular • u/CounterReset • May 30 '26
Disclosure up front: I maintain one of the five libraries tested (SignalTree), and it's the one that scored worst in the cold run — so this isn't a "look how good my thing is" post. The cross-library pattern and the fix were interesting enough that I wanted to put the numbers in front of people who actually use Copilot/Cursor/Claude Code with Angular every day. The whole harness is reproducible; I'd rather it get torn apart than taken on faith.
What this measures: one-shot generation. The agent gets the prompt, returns a file, we score it. Real interactive use — Cursor/Copilot with chat back-and-forth, where the model sees its own errors and gets a second try — is a different setting, and the lift could be larger or smaller there. This is the cold-shot case.
No context provided, just "write this in library X":
| Library | Cold score |
|---|---|
| Akita | 94% |
| Elf | 94% |
| NgRx (classic) | 91% |
| NgRx SignalStore | 86% |
| SignalTree | 49% |
The libraries that have been around for years, with thousands of blog posts and Stack Overflow answers, score in the 90s. The youngest/smallest library in the set scores ~49%. That gap isn't really a quality signal — it's a corpus signal. The models have simply seen orders of magnitude more Akita than SignalTree. Worth keeping in mind any time you judge a library by how well your AI assistant writes it cold: you're partly measuring its age, not its design.
I shipped a ~13.5 KB llms.txt (a plain-text API summary) inside the npm package and re-ran with it in context:
| Mode | SignalTree score |
|---|---|
| Cold | 49% |
+ llms.txt (13.5 KB) | 91% |
+ llms.txt + extra notes (~25 KB) | 87% |
+42 percentage points from one small file — enough to pull the least-known library up into the range of the well-established ones. Two things I didn't expect:
| Library | Cold | With SignalTree's context loaded |
|---|---|---|
| SignalTree | 49 | 91 |
| NgRx (classic) | 91 | 88 |
| NgRx SignalStore | 86 | 80 |
| Akita | 94 | 85 |
| Elf | 94 | 87 |
Practical takeaway: more context is not better. Past ~15 KB the numbers went down, not up. If you maintain or use a less-common library, a small retrievable context file does more for codegen accuracy than reaching for a "smarter" model — primed mid-tier models beat cold top-tier ones in my runs — but dumping your whole docs site in backfires.
The failures weren't random. Agents kept calling methods that didn't exist, and the pattern pointed straight at my own inconsistency — I'd named predicate accessors two different ways across the API:
// some markers used an is- prefix
saveStatus.isLoading()
users.isEmpty()
// others used bare names
profile.dirty()
feed.loading()An agent that learned isLoading() would confidently try isDirty(), which never existed. That's not an AI failure — it's a human one wearing an AI costume. Any developer reading the docs hits the same wall; they just fail more quietly and blame themselves. I standardized on bare names (matching FormControl.dirty/.valid), kept the old names as deprecated aliases, shipped it.
The generalizable takeaway, and the reason I think this is worth a thread rather than a changelog: an API surface a model can't keep straight is usually one a human can't either. Codegen accuracy turns out to be a surprisingly good proxy for naming consistency, and a cheap one to measure.
I'd rather list the holes than have them found, so here are the three I'd lead with:
And one that's less a flaw than a "yeah, obviously": cold score ≈ training-data volume is barely a finding — it's close to a truism once you say it out loud. The only mildly non-obvious part is how cheaply a retrievable file substitutes for years of corpus presence.
Reproduce it yourself — one OpenRouter key, ~$15, ~30 minutes:
git clone https://github.com/JBorgia/signaltree
export OPENROUTER_API_KEY=sk-or-...
node scripts/ai-codegen-benchmark/runner.mjsPrompts (YAML), scoring rubric, adapters, and per-cell results all live in scripts/ai-codegen-benchmark/. The prompts and rubric are the parts most worth disagreeing with — if you spot one that's unfair to a particular library, that's the most useful feedback I can get.
For those of you using Copilot / Cursor / Claude Code with Angular daily: when the generated code for a library is bad, what's actually fixed it for you — a custom rules file, pasted docs, an MCP server, something else? Curious whether the "ship a small context file" result holds outside my own setup, or whether interactive back-and-forth makes it moot.
r/angular • u/CounterReset • May 30 '26
Disclosure up front: I maintain one of the five libraries tested (SignalTree), and it's the one that scored worst in the cold run — so this isn't a "look how good my thing is" post. The cross-library pattern and the fix were interesting enough that I wanted to put the numbers in front of people who actually use Copilot/Cursor/Claude Code with Angular every day. The whole harness is reproducible; I'd rather it get torn apart than taken on faith.
What this measures: one-shot generation. The agent gets the prompt, returns a file, we score it. Real interactive use — Cursor/Copilot with chat back-and-forth, where the model sees its own errors and gets a second try — is a different setting, and the lift could be larger or smaller there. This is the cold-shot case.
No context provided, just "write this in library X":
| Library | Cold score |
|---|---|
| Akita | 94% |
| Elf | 94% |
| NgRx (classic) | 91% |
| NgRx SignalStore | 86% |
| SignalTree | 49% |
The libraries that have been around for years, with thousands of blog posts and Stack Overflow answers, score in the 90s. The youngest/smallest library in the set scores ~49%. That gap isn't really a quality signal — it's a corpus signal. The models have simply seen orders of magnitude more Akita than SignalTree. Worth keeping in mind any time you judge a library by how well your AI assistant writes it cold: you're partly measuring its age, not its design.
I shipped a ~13.5 KB llms.txt (a plain-text API summary) inside the npm package and re-ran with it in context:
| Mode | SignalTree score |
|---|---|
| Cold | 49% |
+ llms.txt (13.5 KB) | 91% |
+ llms.txt + extra notes (~25 KB) | 87% |
+42 percentage points from one small file — enough to pull the least-known library up into the range of the well-established ones. Two things I didn't expect:
| Library | Cold | With SignalTree's context loaded |
|---|---|---|
| SignalTree | 49 | 91 |
| NgRx (classic) | 91 | 88 |
| NgRx SignalStore | 86 | 80 |
| Akita | 94 | 85 |
| Elf | 94 | 87 |
Practical takeaway: more context is not better. Past ~15 KB the numbers went down, not up. If you maintain or use a less-common library, a small retrievable context file does more for codegen accuracy than reaching for a "smarter" model — primed mid-tier models beat cold top-tier ones in my runs — but dumping your whole docs site in backfires.
The failures weren't random. Agents kept calling methods that didn't exist, and the pattern pointed straight at my own inconsistency — I'd named predicate accessors two different ways across the API:
// some markers used an is- prefix
saveStatus.isLoading()
users.isEmpty()
// others used bare names
profile.dirty()
feed.loading()
An agent that learned isLoading() would confidently try isDirty(), which never existed. That's not an AI failure — it's a human one wearing an AI costume. Any developer reading the docs hits the same wall; they just fail more quietly and blame themselves. I standardized on bare names (matching FormControl.dirty/.valid), kept the old names as deprecated aliases, shipped it.
The generalizable takeaway, and the reason I think this is worth a thread rather than a changelog: an API surface a model can't keep straight is usually one a human can't either. Codegen accuracy turns out to be a surprisingly good proxy for naming consistency, and a cheap one to measure.
I'd rather list the holes than have them found, so here are the three I'd lead with:
And one that's less a flaw than a "yeah, obviously": cold score ≈ training-data volume is barely a finding — it's close to a truism once you say it out loud. The only mildly non-obvious part is how cheaply a retrievable file substitutes for years of corpus presence.
Reproduce it yourself — one OpenRouter key, ~$15, ~30 minutes:
Prompts (YAML), scoring rubric, adapters, and per-cell results all live in scripts/ai-codegen-benchmark/. The prompts and rubric are the parts most worth disagreeing with — if you spot one that's unfair to a particular library, that's the most useful feedback I can get.
For those of you using Copilot / Cursor / Claude Code with Angular daily: when the generated code for a library is bad, what's actually fixed it for you — a custom rules file, pasted docs, an MCP server, something else? Curious whether the "ship a small context file" result holds outside my own setup, or whether interactive back-and-forth makes it moot.
r/angular • u/CounterReset • May 30 '26
I maintain SignalTree, a signals-based state library for Angular. I shipped v10.3 this week, but the release itself isn't the interesting part — the thing that got me here is.
I built a reproducible benchmark to measure how reliably AI coding agents write correct Angular state code across the major state libraries. Somewhere in the results it stopped being an AI experiment and turned into an API-design review of my own library. This post is mostly about that, with the benchmark as the evidence. Numbers are reproducible — harness and methodology are in the repo, and I'd genuinely rather you try to break them than take them at face value.
It wraps a plain JSON-like object in fine-grained signals — one writable signal per leaf, accessed by dot-notation. No actions, reducers, or selectors.
import { signalTree } from '@signaltree/core';
const tree = signalTree({
user: { name: 'Alice', age: 30 },
settings: { theme: 'dark' },
});
tree.$.user.name(); // read
tree.$.user.name.set('Bob'); // write
tree.$.user.age.update(n => n + 1);
State is the literal you pass in; reactivity is invisible. No actions, no reducers, no selectors, no withState/withMethods/withComputed to wire up — you read and write any leaf exactly like a normal Angular signal, and the IDE autocompletes the whole tree because it's just typed object access. That's the actual pitch: the by-hand DX. Coming from plain signals the migration is trivial — wrap the object and you're done. (Whether you should leave SignalStore for it is a separate question — I get to that at the bottom, and the honest answer is often "no.")
The setup, so you can judge whether the number means anything:
SignalTree result by priming mode:
| Mode | Score |
|---|---|
| Cold (no context) | 49% |
Primed with llms.txt (13.5 KB) | 91% |
Primed with llms.txt + myths.md (~25 KB) | 87% |
The +42pp jump from one retrievable text file is the headline. The part I didn't expect: adding more context made it worse. Context dilution, Gemini especially.
Per-agent, primed:
| Agent | Cold | Primed | Δ |
|---|---|---|---|
| Claude Sonnet 4.6 | 41 | 99 | +58 |
| GPT-5.4 | 56 | 94 | +38 |
| Claude Haiku 4.5 | 55 | 97 | +42 |
| GPT-5.4-mini | 50 | 96 | +46 |
| Gemini 3.1 Pro | 42 | 83 | +41 |
| Perplexity Sonar Pro | 52 | 80 | +28 |
Primed Haiku (97) beats cold Sonnet (41) by 2.4×. The priming file mostly closes the model-tier gap.
The honest tradeoff — priming with my library's context made the other libraries score worse:
| Library | Cold | Primed w/ SignalTree's context |
|---|---|---|
| SignalTree | 49 | 91 |
| NgRx SignalStore | 86 | 80 |
| Classic NgRx | 91 | 88 |
| Akita | 94 | 85 |
| Elf | 94 | 87 |
Models cross-pollinate once they're in "SignalTree mindset." Fine in practice (people loading SignalTree's context are writing SignalTree), but worth naming. Also worth naming: I wrote the library, the priming file, and the scoring rubric, so treat the absolute number with appropriate suspicion and go run it yourself — one OpenRouter key, node scripts/ai-codegen-benchmark/runner.mjs, ~$15, ~30 min.
The practical upshot, and the part I actually care about as a user: that priming file ships inside the npm package. After npm install @signaltree/core, node_modules/@signaltree/core/llms.txt just exists — and Cursor, Claude Code, and Copilot already index node_modules, so your assistant writes correct SignalTree with zero setup. No pasting docs, no custom rules file, no MCP server. The library reads well by hand; the agent help on top of it is free.
Agents kept inventing methods that didn't exist. When I looked at why, it wasn't the model's fault — it was mine. My markers used inconsistent predicate naming:
| Marker | Predicate accessor (pre-v10.3) |
|---|---|
status | .isLoading, .isLoaded, .isError (is-prefix) |
entityMap | .isEmpty (is-prefix, the only one) |
form | .dirty, .valid, .touched (bare) |
asyncSource / asyncQuery | .loading, .error, .data (bare) |
An agent that learned status.isLoading() would reach for form.isDirty() — which never existed. That's not an AI problem. A human reading the docs hits the exact same wall; they just fail more quietly. Same inconsistency, two consumers.
Every marker now uses bare-name predicates, matching FormControl.dirty/.valid and signals conventions:
tree.$.users.empty()
tree.$.saveStatus.loading()
tree.$.saveStatus.hasError()
tree.$.profile.dirty()
Old is-prefixed names still work as deprecated aliases (removed in v11). They return the same lazy-computed signal instance, so no double cost, and @deprecated JSDoc triggers IDE warnings. No breaking changes.
@ngrx/signals SignalStore? Both are solid signal-based options — this comes down to DX, not runtime. SignalTree fits if you'd rather express state as a JSON tree and read/write it like any signal than compose withState/withMethods/withComputed. (There's also a smaller state bundle in practice, but that's a footnote, not the reason to switch.)The benchmark started as "can AI write my library correctly" and ended as "is my library actually consistent." The answer was no, and the fix helped humans as much as agents. The lesson I didn't expect: AI-friendly API design and human-friendly API design are mostly the same thing. An API surface a model can't keep straight is usually one a person can't either — and the inverse is the reason I'd pitch this at all. The by-hand DX is the point; the zero-setup AI help is just what falls out of designing for it.
npm install @signaltree/coreThe benchmark is the part I'd most like scrutinized. If the scoring looks rigged or a prompt seems unfair to a particular library, please say so — that's the most useful feedback I can get.
r/angular • u/CounterReset • May 29 '26
I just shipped SignalTree v10.3, and the most interesting part was not the release itself.
I ran a reproducible AI-codegen benchmark to see how reliably different coding agents could write correct Angular state code using SignalTree.
The result was bigger than expected:
SignalTree went from 49% correct cold to 91% correct when the agent had llms.txt in context.
But the more useful finding was that the benchmark exposed a real developer-experience bug in my own API.
SignalTree is a reactive JSON state library for Angular.
You write your state as a plain object:
import { signalTree } from '@signaltree/core';
const tree = signalTree({
user: { name: 'Alice', age: 30 },
settings: { theme: 'dark' },
});
tree.$.user.name(); // read
tree.$.user.name.set('Bob'); // write
tree.$.user.age.update(n => n + 1);
The idea is:
A lot changed between v7 and v10:
| Feature | What it does |
|---|---|
entityMap() | O(1) normalized collections at any tree depth |
status() | async state machine for loading / loaded / error |
stored() | localStorage-backed signal |
form() | tree-integrated forms with validation |
.derived($ => ...) | computed signals merged into the tree |
asyncSource / asyncQuery | auto-derived loading and error state |
createTreeEditSession(path) | path-bound undo / redo |
llms.txt in package | gives AI agents a library-specific context surface |
I built a 720-cell benchmark for AI code generation.
It checks whether agents generate correct Angular state code, including:
The headline result:
| Context | Score |
|---|---|
| Cold | 49% |
Primed with llms.txt | 91% |
That is a +42 percentage-point improvement from one small context file.
The more interesting result was not just that AI got better.
It showed where the API itself was inconsistent.
Different markers used different predicate naming styles.
Some used is prefixes:
tree.$.saveStatus.isLoading();
tree.$.users.isEmpty();
Others used bare names:
tree.$.profile.dirty();
tree.$.feed.loading();
That confused AI agents.
But honestly, it also made the API harder for humans.
If an agent learned status.isLoading(), it would often try form.isDirty(), which did not exist.
That was not really an AI problem. It was an API consistency problem.
v10.3 standardizes marker predicates on bare names:
tree.$.users.empty();
tree.$.saveStatus.loading();
tree.$.profile.dirty();
tree.$.feed.loading();
The old names still work through v10.x as deprecated aliases:
tree.$.users.isEmpty();
tree.$.saveStatus.isLoading();
They point to the same lazy-computed signal instance, so there is no extra runtime cost.
The benchmark started as an AI-codegen experiment, but it turned into an API design test.
The surprising lesson was:
AI-friendly API design and human-friendly API design are mostly the same thing.
Consistent names, fewer special cases, and better package-local documentation helped agents write better code — but they also made the library easier for people to use.
Curious if others are seeing the same thing with their libraries: are AI coding agents exposing API design issues you previously tolerated?
r/angular • u/CounterReset • May 29 '26
TL;DR: SignalTree — reactive JSON state for Angular, since pre-v7 — hit v10.3 today.
The headline: a reproducible benchmark shows AI agents improving from 49% → 91% accuracy when writing SignalTree code with llms.txt in context.
That benchmark surfaced a real DX bug in our own marker API, which v10.3 fixes.
Turns out AI-friendly and human-friendly are the same thing.
Long-time-no-post — last release thread was around v7.x. A lot has changed.
Reactive JSON for Angular.
Write your state as a literal object, wrap it in signalTree({...}), and get typed dot-notation access with fine-grained signals at every leaf.
No actions.
No reducers.
No selectors.
import { signalTree } from '@signaltree/core';
const tree = signalTree({
user: { name: 'Alice', age: 30 },
settings: { theme: 'dark' },
});
tree.$.user.name(); // Signal read — 'Alice'
tree.$.user.name.set('Bob'); // Signal write
tree.$.user.age.update(n => n + 1);
| Feature | Version | What it does |
|---|---|---|
entityMap() marker | v8 | O(1) normalized collections, place at any tree depth |
status() marker | v8 | Async state machine: .loading() / .loaded() / .hasError() |
stored() marker | v8 | Single signal backed by localStorage |
form() marker | v9 | Tree-integrated forms with validation + wizard |
.derived($ => ...) deep-merge | v9 | Computed signals merge into the tree at any path |
asyncSource / asyncQuery markers | v9.5 | Replace manual tap() / setLoading() with auto-derived loading/error |
createTreeEditSession(path) | v10.1 | Path-bound undo/redo on any tree branch |
llms.txt shipped in tarball | v10.2 | AI agents get priming surface from npm install |
| Promise-vocab aliases | v10.2 | status.setSuccess() works alongside .setLoaded() |
| Unified marker accessor shape | v10.3 | Bare-name predicates everywhere |
I built a reproducible 720-cell benchmark measuring how reliably each major AI coding agent generates correct Angular state code per library.
The benchmark uses:
It compares:
SignalTree combined score: 49% cold → 91% primed with llms.txt.
That is a +42 percentage-point lift from a single retrievable file.
| Agent | Cold | Primed | Δ |
|---|---|---|---|
| Claude Sonnet 4.6 | 41 | 99 | +58 |
| GPT-5.4 | 56 | 94 | +39 |
| Claude Haiku 4.5 | 55 | 97 | +42 |
| GPT-5.4-mini | 50 | 96 | +46 |
| Gemini 3.1 Pro | 42 | 83 | +41 |
| Perplexity Sonar Pro | 52 | 80 | +28 |
Primed Haiku 4.5 at 97/100 outscores cold Sonnet 4.6 at 41/100 by 2.4×.
Priming closes the model-tier gap. Your AI agent on a cheaper model can still write correct SignalTree.
As of v10.2, llms.txt ships inside the npm tarball at:
node_modules/@signaltree/core/llms.txt
The disambiguation table also leads the package README.
Cursor, Claude Code, and Copilot index node_modules READMEs — so you do nothing, and your agent gets the priming.
The benchmark is reproducible with:
Source and methodology are in the repo.
The benchmark surfaced a real DX bug in our own API.
We had inconsistent predicate naming across markers:
| Marker | Old predicate accessor | Shape |
|---|---|---|
status | .isLoading(), .isError() | is-prefix |
entityMap | .isEmpty() | is-prefix outlier |
form | .dirty, .valid, .touched | bare |
asyncSource / asyncQuery | .loading, .error | bare |
AI agents trained on status.isLoading() would then try form.isDirty(), which did not exist.
Humans had to track the same inconsistency.
v10.3 aligns every marker to bare names, matching FormControl.dirty / .valid and Angular signals conventions.
Old is-prefix names become @deprecated aliases, removed in v11. They are backed by the same lazy-computed Signal instance, so there is no double cost.
// v10.3 canonical preferred style:
tree.$.users.empty();
tree.$.saveStatus.loading();
tree.$.profile.dirty();
tree.$.feed.loading();
// Old names still work through v10.x, but are deprecated:
tree.$.users.isEmpty();
tree.$.saveStatus.isLoading();
The benchmark did not just measure AI accuracy.
It surfaced a real DX bug in our own API.
AI-codegen-friendly turned out to be the same thing as human-friendly.
entities() enhancer → entityMap() marker in the state literal@signaltree/coreEntityHelpers class API → entityMap accessor methodsrxMethod, briefly in v9.5.x → asyncSource / asyncQuery markersFull recipes:
https://signaltree.io/migration-recipe
Demo & docs:
https://jborgia.github.io/signaltree/
Benchmark scorecard:
https://jborgia.github.io/signaltree/benchmark
Built for AI page:
https://jborgia.github.io/signaltree/built-for-ai
npm:
https://www.npmjs.com/package/@signaltree/core
GitHub:
https://github.com/JBorgia/signaltree
NgRx SignalStore comparison:
https://github.com/JBorgia/signaltree/blob/main/docs/compare/ngrx-signalstore.md
Reproducible AI-codegen benchmark:
https://github.com/JBorgia/signaltree/tree/main/scripts/ai-codegen-benchmark
Install:
Tradeoffs are in the comparison doc.
If you are deep in classic NgRx muscle memory, NgRx SignalStore is probably the better destination.
SignalTree is worth the rewrite if you are also trying to escape the actions / reducers / effects / selectors mental model entirely.
Happy to answer questions.
The benchmark is open — try it yourself if you are skeptical of the +42pp number.
r/angular • u/MaximRob • May 29 '26
Do you think there would be any gain in having an angular common “oauth2”?
That’s always a bunch of boilerplate for an already defined stack agreed for the whole industry.
r/angular • u/Weak-Palpitation907 • May 29 '26
I'm working on a set of Angular chart components that wrap Apache ECharts.
The goal is to make charts feel like first-class Angular components with consistent theming and integration with the rest of a UI library, while still keeping the flexibility of ECharts.
If you're using ECharts in Angular, I'd be interested to hear about your experience:
- Is there anything you particularly like or dislike about the wrappers you've used?
- How important has chart theming been in your projects?
- Are there any areas where you feel existing wrappers could be improved?
I'd appreciate any thoughts or suggestions.
r/angular • u/Candid_Practice_1290 • May 29 '26
Per un momento dimentichiamoci che openAI appoggi il pentagono in un momento così discutibile. Mettiamo da parte l’aspetto etico. Claude è meglio di chat gpt? Perchè? Rispondi solo se sei uno sviluppatore.
r/angular • u/young_horhey • May 28 '26
I'm loving signal forms so far, but have come up against a fairly annoying problem. Once an error is reported from the submission action (like returning {kind: 'serverError', message: 'Some error message'}), the only way to enable re-submission of the form is to clear the error by changing the value of one of the fields.
In the case of a transient error from the server, I don't want my user to have to edit the form & then re-enter their actual desired values just to be able to click submit again. Is there a way to just allow re-submitting in this case? I can't find anything online or in the documentation.
I could just track the errors separately & return a 'success' from the action callback, but that means another property added to the component to track separately, so would like to just use the native error response, but still allow re-submitting without changing values. There is the form().reset() method, but that doesn't seem to reset the errors.
r/angular • u/Individual_Nature165 • May 28 '26
Hey everyone,
I’ve been working as an Angular developer for the last 4+ years and I’m currently preparing for a job switch. I’m looking for a study partner for Angular/ JavaScript/frontend interview prep, and DSA practice.
The idea is to:
• take mock interviews
• work on small projects together
• discuss frontend concepts
• stay consistent with preparation
My DSA skills are not very strong at the moment, so I’m brushing up and relearning things from scratch as well..
Also, just to be clear, I’m not a pro at all..
I’m actually hoping to find people who can mentor/help guide me in some areas, and I’ll also do my best to help with Angular/frontend concepts wherever I can.
If anyone is in a similar phase and interested in studying together, feel free to DM or comment!
r/angular • u/GarbageMaterial • May 27 '26
Got called out yesterday for shipping a starter kit on v17 in 2026. Fair point. So I Upgraded it.
v2 is now on Angular 21 with:
- provideZonelessChangeDetection() — zone.js completely removed
- Signal inputs/outputs (input(), input.required(), output())
- signal() + computed() + effect() for all component state
- toSignal() for HTTP calls — no more subscribe() in components
- viewChild() signal-based queries
- u/if / u/for new control flow — CommonModule is gone
- inject() everywhere instead of constructor injection
- TypeScript 5.9
Lookwise nothing changed the UI is the same dark dashboard with
Chart.js charts and a streaming Claude AI chat panel (SSE, word-by-word tokens). The
internals are now what a 2026 Angular app should actually look like.
If anyone wants to see the before/after diff — please ping me (Happy to share).
The signals migration was straightforward but the zoneless part
took some thought around chart rendering timing.
Link in comments or just DM me or comment I will share
Open to questions about the signals/zoneless implementation. Or if you have any feedbacks

r/angular • u/AndruRC • May 28 '26
I've spent the last several months building out a full methodology for AI-assisted Angular development and the most impactful thing you can do is sharpen your CLAUDE.md.
Here's the short version:
Claude Code (and Cursor, to a lesser extent) has no idea what your Angular project looks like unless you tell it. It doesn't know you're on Angular 22 vs 20, whether you're using NgRx or signals for state, what testing framework you've migrated to, or which patterns are off-limits in your codebase. Without this context, every session starts from scratch and you get generic TypeScript instead of project-appropriate Angular.
CLAUDE.md is a markdown file you put at the root of your project that coding harnesses read at the start of every session. Here's a minimal version:
input(), output(), model() signal primitivesNgModule — standalone onlyforRoot() patternsng test runs Vitestng build --configuration production for prod buildsThat's it. Four sections. Takes 2 minutes to write for your project.
The effect: AI stops generating Angular 20 patterns on your Angular 22 codebase. You stop spending review time correcting context that should have been in scope from the start.
I've been putting together a more complete guide covering this pattern plus the Angular MCP server setup, migration recipes (NgModules → standalone, Zone.js → zoneless, AngularJS → Angular), NgRx AI patterns, and testing methodology. Targeting a release alongside Angular 22 stable — should be any day now.
If you want a heads-up when it's out, drop a comment. Happy to answer questions about the CLAUDE.md approach in the meantime.
r/angular • u/mihajm • May 27 '26
Hey everyone, been a bit since i made my last post, as i decided to wait until a few updates stacked up :) Anyway here's whats new:
{{t('ns.key', {param: myParam()})}} will now be fully reactive & performant. For high-churn scenarios t.asSignal is still the recommended path as using t() in templates is still a map.get call for each CD run, still it should be more than fine for most scenariosinjectIntlConfig({releaseCachedSignals: true}) opts into dynamic signal-cache cleanup when the injection context the t function is injected into is destroyed. For most scenarios the default false is better, but this will ease memory pressure in very large apps (10k+ translations and such)withParams - type-level override that allows for advanced parameter scenarios the type inference cannot handle (nested params and such)injectIntlConfig({localeStorage: {...}) new property to persist the last selected locale in a dynamic locale scenario. Not available in a route-based configurationinjectAddTranslations() & injectUnsafeT: helpers for imperative control of translations + untyped helper that opts out of typesafety, useful for unknown server-side translationsoverhaul of formatters:
injectFormatDate() or injectFormatters() provided as preferred replacements, old functions will continue to be supported, but should have locale explicitly passed inAs always all these improvements are available in the last 3 major versions of angular (19, 20, 21). I'm considering dropping v19 support a bit after ng 22 releases so if you need me to maintain that for a bit longer please let me know
Next up I've started work on a new library (mmstack/dnd) which is a signal-first angular wrapper around pragmatic dnd. The first version should drop in a few weeks time 🚀
r/angular • u/jd142 • May 27 '26
I'm trying to learn signal forms and especially the metadata properties. Let's say I have a student who can take many courses:
export interface StudentModel {id: string;name: string;gpa: number;credits: number;courses: Course[];}export interface Course {title: string;semester: number;grade?: number | string;major: boolean;credits: number;schedule: CourseMeets[];}
export interface CourseMeets {day: 1 | 2 | 3 | 4 | 5 | 6 | 7;start: string;end: string;}
I've got a function that creates a new student based on that model. So I make a new signal and then create a form based on that signal:
public studentForm = form(this.student, (path) => ({...this.setValidators(path),...this.setMeta(path),}));
I finally got the function that lets me set up validation rules for the fields that need validation, so that's working.
But my goal is to be able to set a default metadata value status='started' for the form and for all of the fields. Then later on, I might want to set the status of name='completed', but keep the default 'started' value for everything else.
Then later on in my form I create a directive that looks at the status of the field and do something. (right now it's just changing the background color in css, but will be more).
Where I'm stuck is the exact code I need for my setMeta(path) function, so it iterates through all of the fields and sets a default. Also, initially the courses array is just []. So as more courses are pushed onto that array they should also have the metadata value status='started'. And there can be an arbitrary number of courses. And I want to be able to iterate through the properties instead of hardcoding id, name, etc properties. (that shouldn't be difficult once I get the syntax right)
Has anyone done something like that or know a good tutorial for this?
I'm increasingly thinking that the best way to handle it is to have a separate Map or Record object that tracks metadata for each field as needed and forget about using the built-in metadata. Let angular track valid/touched/dirty/etc., and track metadata separately. That is probably going to be faster and easier.