{"id":50469973,"url":"https://github.com/edisonaugusthy/angular-render-scan","last_synced_at":"2026-06-15T23:00:40.876Z","repository":{"id":360154412,"uuid":"1248302919","full_name":"edisonaugusthy/angular-render-scan","owner":"edisonaugusthy","description":"Angular Render Scan is a visual debugging overlay for Angular change detection. ","archived":false,"fork":false,"pushed_at":"2026-06-04T11:07:38.000Z","size":12129,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-04T12:10:54.532Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/angular-render-scan","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edisonaugusthy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-24T13:16:37.000Z","updated_at":"2026-06-04T11:07:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/edisonaugusthy/angular-render-scan","commit_stats":null,"previous_names":["edisonaugusthy/angular-render-scan"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/edisonaugusthy/angular-render-scan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edisonaugusthy%2Fangular-render-scan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edisonaugusthy%2Fangular-render-scan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edisonaugusthy%2Fangular-render-scan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edisonaugusthy%2Fangular-render-scan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edisonaugusthy","download_url":"https://codeload.github.com/edisonaugusthy/angular-render-scan/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edisonaugusthy%2Fangular-render-scan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34383468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-01T10:00:22.210Z","updated_at":"2026-06-15T23:00:40.871Z","avatar_url":"https://github.com/edisonaugusthy.png","language":"TypeScript","funding_links":[],"categories":["Development Utilities"],"sub_categories":["Debugging"],"readme":"# Angular Render Scan\n\nAngular Render Scan is a visual debugging overlay for Angular change detection. It shows which components update, how often they update, and which checks are slow or wasted.\n\n![Angular Render Scan in Action](docs/assets/angular-render-scan-demo.gif)\n\n[Live Demo](https://edisonaugusthy.github.io/angular-render-scan/) | [npm](https://www.npmjs.com/package/angular-render-scan)\n\n## Versions\n\n| Package                   | Version   |\n| ------------------------- | --------- |\n| Angular                   | `^22.0.0` |\n| `angular-render-scan`     | `0.1.8`   |\n| `angular-render-scan-cli` | `0.1.5`   |\n\n## What it shows\n\n- Component render outlines and heatmap colors.\n- Slow render and budget violation alerts.\n- Change detection trigger labels such as `zone:click`, `signal:write`, and `router:navigation`.\n- OnPush candidates, referentially unstable inputs, and suspected Zone pollution.\n- A copyable AI performance prompt for slow/error components.\n- Session export JSON for deeper debugging.\n\n## Install\n\n```sh\nnpm install angular-render-scan\n```\n\nAngular Render Scan expects Angular 9+.\n\n## Setup with the CLI\n\n```sh\nnpx angular-render-scan-cli init\n```\n\nThe CLI supports Angular CLI and Nx workspaces. It looks for `angular.json`, `workspace.json`, `nx.json`, or `project.json`, finds your `main.ts` or `app.config.ts`, and adds `provideAngularRenderScan()`.\n\n```sh\nnpx angular-render-scan-cli init --dry-run\nnpx angular-render-scan-cli init --script-tag\nnpx angular-render-scan-cli --help\n```\n\n## Manual Setup\n\nAdd the provider to your Angular bootstrap config.\n\n```ts\nimport { bootstrapApplication } from \"@angular/platform-browser\";\nimport { provideAngularRenderScan } from \"angular-render-scan\";\nimport { AppComponent } from \"./app/app.component\";\n\nbootstrapApplication(AppComponent, {\n  providers: [\n    provideAngularRenderScan({\n      enabled: true,\n      animationSpeed: \"fast\",\n    }),\n  ],\n});\n```\n\nFor script-tag usage:\n\n```html\n\u003cscript src=\"https://unpkg.com/angular-render-scan/dist/auto.global.js\"\u003e\u003c/script\u003e\n```\n\nProvider mode is recommended for Angular component-level instrumentation.\n\n## Common Options\n\n```ts\nprovideAngularRenderScan({\n  enabled: true,\n  showToolbar: true,\n  showFPS: true,\n  animationSpeed: \"fast\",\n  maxLabelCount: 20,\n  maxRecordedCycles: 30,\n  showCopyPrompt: true,\n  promptContext: \"Angular app using signals and OnPush components\",\n  log: false,\n});\n```\n\nUseful options:\n\n- `enabled`: turns scanning on or off.\n- `showToolbar`: shows the floating toolbar.\n- `animationSpeed`: `'fast'`, `'slow'`, or `'off'`.\n- `showFPS`: shows FPS in the toolbar.\n- `log`: prints cycle summaries to the console.\n- `include` / `exclude`: limits which components are tracked.\n- `minDurationMs` / `minRenderCount`: filters low-signal entries.\n- `maxRecordedCycles`: controls how much history is included in copied prompts.\n- `promptContext`: adds app-specific context to copied prompts.\n- `dangerouslyForceRunInProduction`: allows scanner runtime outside Angular dev mode.\n\n## Runtime API\n\n```ts\nimport {\n  copyAIPrompt,\n  getAIPrompt,\n  getCdGraph,\n  getOnPushCandidates,\n  getOptions,\n  getReferentialInstability,\n  getZonePollutionEvents,\n  scan,\n  setOptions,\n  stop,\n} from \"angular-render-scan\";\n\nscan();\nsetOptions({ enabled: false });\nsetOptions({ enabled: true, log: true });\n\nconsole.log(getOptions());\nconsole.log(getAIPrompt());\nawait copyAIPrompt();\n\nconsole.log(getOnPushCandidates(40));\nconsole.log(getReferentialInstability(1));\nconsole.log(getZonePollutionEvents());\nconsole.log(getCdGraph());\n\nstop();\n```\n\n## Toolbar\n\nThe toolbar shows render count, FPS, latest cycle time, slowest component, trigger source, OnPush candidates, Zone pollution events, alerts, and copy/export actions.\n\nUseful shortcuts:\n\n| Shortcut      | Action                     |\n| ------------- | -------------------------- |\n| `Alt+Shift+S` | Toggle scanner             |\n| `Alt+Shift+D` | Toggle Details Mode        |\n| `Alt+Shift+C` | Copy AI performance prompt |\n| `Alt+Shift+X` | Clear stats                |\n| `Alt+Shift+T` | Toggle toolbar             |\n| `Escape`      | Close open panels          |\n\n## Details and AI Prompt\n\nEnable `Details` in the toolbar, hover a captured component, then click it to pin a recommendation panel. The panel shows timing, render count, reason, selector, changed inputs, recent cycles, and local Angular recommendations.\n\nUse `Copy Slow Issues Prompt` to copy a focused prompt for an AI coding assistant. It includes recent cycle history, thresholds, and slow/error component evidence without copying DOM nodes, component instances, or source code.\n\n## Playwright Audit\n\n```ts\nimport { test, expect } from \"@playwright/test\";\nimport { startRenderAudit } from \"angular-render-scan\";\n\ntest(\"no render regression\", async ({ page }) =\u003e {\n  await page.goto(\"/\");\n\n  const audit = await startRenderAudit(page);\n  await page.click(\"button.expensive-operation\");\n  const report = await audit.stop();\n\n  expect(await report.maxDurationFor(\"ProductCardComponent\")).toBeLessThan(\n    16.7,\n  );\n  expect(await report.wastedRenderPercentage()).toBeLessThan(20);\n  expect(await report.budgetViolations()).toHaveLength(0);\n});\n```\n\n## Production Behavior\n\nAngular Render Scan is intended for development and demo debugging. Provider mode checks Angular `isDevMode()` and does not run in production unless explicitly enabled.\n\n```ts\nprovideAngularRenderScan({\n  dangerouslyForceRunInProduction: true,\n});\n```\n\nUse that option carefully. The scanner adds runtime instrumentation, DOM reads, canvas work, and debug behavior.\n\n## Demo\n\nHosted demo:\n\n```txt\nhttps://edisonaugusthy.github.io/angular-render-scan/\n```\n\nLocal demo:\n\n```sh\nnpm install\nnpm run dev\n```\n\nOpen `http://127.0.0.1:4200/`.\n\n## Development\n\n```sh\nnpm run test\nnpm run build\nnpm run test:e2e\n```\n\n## Release\n\nRelease runs automatically on pushes to `main`. The workflow bumps the package version, publishes `angular-render-scan` and `angular-render-scan-cli` to npm, and creates a GitHub release.\n\nConfigure `NPM_TOKEN` or npm trusted publishing for both packages before publishing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedisonaugusthy%2Fangular-render-scan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedisonaugusthy%2Fangular-render-scan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedisonaugusthy%2Fangular-render-scan/lists"}