Repository navigation
feat(cli): add reylo play, the playground on the project's database - #110
Conversation
|
No configured credential can serve this run. Your Claude Pro/Max subscription has hit its usage limit, which resets at 2026-10-26 08:00 UTC. Re-trigger after it resets, or add an API key for this provider, which Pullfrog falls back to automatically. The providers' responses
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No configured credential can serve this run. Your Claude Pro/Max subscription has hit its usage limit, which resets at 2026-10-26 08:00 UTC. Re-trigger after it resets, or add an API key for this provider, which Pullfrog falls back to automatically. The providers' responses
|
|
No configured credential can serve this run. Your Claude Pro/Max subscription has hit its usage limit, which resets at 2026-10-26 08:00 UTC. Re-trigger after it resets, or add an API key for this provider, which Pullfrog falls back to automatically. The providers' responses
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This run covers a336522, which narrows reylo play to the project's own database and opens the browser by default.
- Removed
--schema:openBackendnow uses the project's database whenever a URL is set. PGlite only stands in withSAMPLE_SCHEMAwhen no URL is set, and its label says why (no database URL is set). - Opened the browser by default:
parseArgsnow starts withopen: true, and--no-openreplaces--open. The usage text, the Setup docs and the skill's agent instructions all say--no-openfor scripts and agents. - Cleaned up after the removal:
schemaFilesand thereaddirSync/relative/resolveimports are gone. The remaining imports (readFileSync,statSync,extname) are still used by the static file handler. - Updated the PGlite test: it now checks the sample schema's params and nullable single-row return through a project with no URL. It also drops the assertions for the missing
--schemafile.
Nothing in the repo still mentions --schema or --open for reylo play. The only --schema hits are in site/scripts/capture-types.ts, which is a different tool.
claude-opus-5-5 | 𝕏
There was a problem hiding this comment.
ℹ️ No critical issues. There are two small fixes inline for the Postgres schema query.
Reviewed changes
This run covers 6e7bca5, which fills the schema card with the database's own DDL in place of the column list taken from the catalog.
- Added
schemaDdl: on SQLite it reads the stored statements fromsqlite_schema. On MySQL it runsSHOW CREATE TABLE/VIEWfor each table indatabase()and stripsAUTO_INCREMENT=n. On Postgres it runsPOSTGRES_SCHEMA, a catalog query that writes enums, domains, tables with their defaults and constraints, views and standalone indexes for the schemas on the search path. If any of these fails, the card falls back toschemaText. - Extended the SQLite play test:
/api/pagemust now return the table's originalCREATE TABLEtext.
I ran POSTGRES_SCHEMA against a local Postgres 16 with enums, domains, identity and stored generated columns, FKs across schemas, a view and indexes. It parsed and produced correct DDL, except for the index case noted inline.
claude-opus-5-5 | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This run covers 7c9ad88, which applies both fixes from the last review to POSTGRES_SCHEMA.
- Wrote virtual generated columns correctly: any column with a non-empty
attgeneratednow shows asgenerated always as (…), ending instoredorvirtual. Before, a Postgres 18 virtual column was written asdefault (…). - Narrowed the index filter: only a primary key, unique or exclusion constraint now hides the index it owns. A plain unique index that a foreign key points at stays on the card.
claude-opus-5-5 | 𝕏
7c9ad88 to
4bb9b53
Compare
There was a problem hiding this comment.
ℹ️ No critical issues. Two small follow-ups inline from removing PGlite.
Reviewed changes
This run covers 4bb9b53, which drops the PGlite stand-in so reylo play only reads the project's own database.
- Refused a project with no database:
openBackendnow closes the session and throwsproject.error, orproject.missingUrlfollowed by a pointer to reylo.dev/play. It no longer starts PGlite with a sample schema. - Removed the PGlite path:
pgliteBackend,src/play-sample.ts, the root@electric-sql/pglitedev dependency and thesite/tsconfig.jsonpath alias are gone.src/pglite-io.tswent back tosite/lib/live/pg-io.tsas the docs' own module, andplay-data.tsandworker.tsimport it from there again. - Removed the docs and skill entries: took out the Setup page's "Playground" section and the skill's
reylo play --no-openline. This matches "Not documented yet" in the PR body. - Replaced the PGlite test: it now checks the refusal message for a project with no URL.
tests/play.test.tspasses locally (3/3).
claude-opus-5-5 | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This run covers 8659a93, which applies both follow-ups from the last review.
- Restored the url-alone notice: when
.reylo.yamlsets onlyurl,databaseBackendpassesproject.noticethroughBackend.noticeandPlayground.notice, andplay()prints it in yellow before the banner. This is the same noticereylo generateprints.openBackendhas already refused a project with no URL by then, so it matchesreylo generate'sproject.notice && project.urlguard. - Added a test for the notice: it checks that the label names
DATABASE_URLand that the notice says the project file'surlis not read.tests/play.test.tspasses locally (4/4). - Dropped
pglite-iofrom the build check: the tooling regex inscripts/build.tsno longer lists a module that can't be indist/reylo.
claude-opus-5-5 | 𝕏

npx reylo playserves the playground of reylo.dev/play on 127.0.0.1 against the project's own database, the one its type check reads: edit a query, and its params, return type and errors update as you type. Nothing is run. The page opens in the browser;--no-openleaves it closed for scripts and agents.direct_urlorDATABASE_URL), on Postgres, MySQL or SQLite. Statements are analyzed withstore: false, so nothing is written to.reylo/. A project that names no database is refused with the usual missing-URL message and a pointer to reylo.dev/play.site/lib/live/app.tsx, which both the docs'/playand the standalone page render. The standalone page is built with the site's own toolchain (site/vite.play.config.ts) intodist/reylo/play/bynub run build, so CI's build job and the release installsite/first.?q=opens a query. "View schema" shows the database's whole schema: SQLite's stored statements, MySQL'sSHOW CREATE, and on Postgres one written from the catalog (types, tables with defaults and constraints, views, indexes).GET /api/analyze?q=<sql>(orPOSTwith{"sql": "…", "width": n}) answers{ params, returns, cardinality, diagnostics }, each diagnostic by line and column;GET /api/schemalists tables, columns, functions and types. The page uses the same endpoint.HostorOriginis not localhost, so neither a page on another site nor a DNS name rebound to 127.0.0.1 can read the schema through it.src/play-result.ts), the catalog queries (src/play-catalog.ts, now with MySQL and SQLite) and the type formatter (src/type-format.ts) moved fromsite/intosrc/.Checked:
tests/play.test.ts(SQLite through a project URL, the schema card, the Host and Origin refusals, nothing written to.reylo/, a project with no database refused); the whole suite with both test databases, 257 passing, none skipped;npm packofdist/reyloanddist/postgresinstalled into an empty project, wherenpx reylo playserved the page and the API; real Postgres (a schema on the search path) and MySQL 8.4 throughDATABASE_URL.