Repository navigation
docs: set up live data for client-only Angular CLI apps - #224
Conversation
A client-only ng new app has no server part to mount, so the docs sent it to the standalone CLI, which only shows the source scan. An ng serve proxy that forwards /__pangular, with websockets, to pangular dev lets the overlay and popup find the CLI on the app's own origin. The installation page documents it, a test checks the documented proxy against what the overlay and popup request, and the CLI page no longer says the port is always random. Closes pangular-inspector#120
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe documentation adds a proxy setup for client-only Angular CLI apps to connect to the standalone devtools server. Tests read the documented proxy configuration and check its settings, overlay connection and WebSocket URLs, and popup iframe URL. ChangesClient-only Angular CLI proxy
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to This change documents a proxy setup for client-only Angular CLI apps and adds a test for it. No runtime behavior changes, and no merge-blocking risk was identified. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The setup remains development-oriented, requires a one-time code, and introduces no runtime code changes. No authorization bypass was established, but preservation of authentication across the proxy remains unverified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
What and why
A client-only
ng newapp has no Express server or Vite plugin to mount the devtools in, so the docs sent it to the standalone CLI, which only shows the source scan. It turns out anng serveproxy is enough: forward/__pangular(with websockets) topangular dev, and the overlay and popup find the CLI on the app's own origin. No package code change was needed.{ "/__pangular": { "target": "http://localhost:9999", "pathRewrite": {"^/__pangular": ""}, "ws": true } }installation.md: a "Client-only Angular CLI" tab and section (startpangular dev --port 9999, add the proxy, pointng serveat it, load the overlay, enter the one-time code on the app's origin).introduction.md: "Does it work without SSR?" is now "Yes", linking there.cli.mdlinks there too, and no longer says the port is always random (it's 9999 unless taken).proxy-setup.test.ts: reads the proxy sample from the docs and checks the real overlay and popup reach the CLI through it, so the docs can't drift.Closes #120
How it was verified
pnpm commit:check,pnpm format:check,pnpm typecheck,pnpm skills:checkpnpm test:devtoolsandpnpm test:panelpnpm docs:build,pnpm test:axeng new --ssr=falseapp (Angular 22.2.1) using the packed package: the overlay connected, the popup loaded through the proxy, and after the code step the panel went Live with the right project and components.ws: trueis required (without it the socket gets no frames).Notes for reviewers
Follow-ups, not done here: a cross-origin option (one server URL plus CORS) overlaps #21; and the one-time code link the CLI prints points at :9999, while behind a proxy it has to be opened on the app's origin, which could be smoother.
Summary by CodeRabbit