Conversation
There was a problem hiding this comment.
Pull request overview
Adds a self-contained “Proton Query Playground” example that serves a static HTML UI and proxies browser requests to a local Proton instance, enabling streaming query + visualization without a frontend build step.
Changes:
- Introduce a Node/TypeScript static server + Proton proxy (
server.ts) with/api/configand/api/ping. - Add a single-file HTML playground UI (
index.html) using UMD builds of@timeplus/proton-javascript-driverand@timeplus/vistral. - Add example-local Node tooling (
package.json/ lockfile) and usage docs (README.md).
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/playground/server.ts | Implements the static file server + Proton reverse proxy and small JSON APIs for UI configuration/ping. |
| examples/playground/index.html | Provides the browser UI for running queries and visualizing streaming results. |
| examples/playground/package.json | Adds example-local scripts to run/build the TypeScript server. |
| examples/playground/package-lock.json | Locks dev-tooling dependencies for the playground server. |
| examples/playground/README.md | Documents architecture, setup steps, and environment variables for the playground. |
Files not reviewed (1)
- examples/playground/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ts-node fails with ERR_UNKNOWN_FILE_EXTENSION on Node 22 when package.json has "type": "module". tsx handles ESM natively without extra flags or configuration. Made-with: Cursor
Made-with: Cursor
yokofly
approved these changes
Mar 2, 2026
Collaborator
yokofly
left a comment
There was a problem hiding this comment.
Review — examples/playground/
Reviewed the full PR diff (6 original files + 2 follow-up fix commits). Overall this is a solid, self-contained example.
What's good
- Zero impact on core engine — all changes are net-new files under
examples/playground/, no modifications to any existing code. - Clean architecture — proxy-based design avoids CORS issues; single
server.tshandles static serving + Proton forwarding. - Security hardening — path traversal protection, 10MB body size limit,
127.0.0.1binding, scoped CORS origin,escapeHTML()for user-controlled output, password field masked, no credential leakage in/api/config. - Good README — architecture diagram, quick-start steps, env var table, example queries.
- Copilot review feedback addressed — 10 of 12 automated review comments were resolved in follow-up commits (unbounded rawLines, password field, STATIC_ROOT, body size limit, pinned CDN versions, unused import, CORS/binding, credential exposure, server URL consistency).
- All CDN dependencies pinned to specific versions (React 18.3.1, lodash 4.17.21, vistral 0.1.4, proton-driver 0.1.3, etc.).
Fixes applied (2 commits)
ts-node→tsx—ts-nodedoes not support ESM on Node 22+ (ERR_UNKNOWN_FILE_EXTENSION). Replaced withtsxwhich handles"type": "module"natively. Verified server starts successfully..gitignore+ trailing newlines — added.gitignorefornode_modules/anddist/; fixed missing final newlines inpackage.json,index.html,server.ts.
Minor note (not blocking)
server.tsline 15 still saysnpx ts-node server.tsin the doc comment — should benpx tsx server.ts. Trivial, can be fixed in a follow-up.
LGTM — approving.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a quick playground based on