Repository navigation
Add urlcode studio: the review report served on localhost, rebuilt on every reload - #751
Merged
Merged
Conversation
…uilt on every reload `urlcode studio [BEFORE] [--port 4100] [--policy F] [--host-file F]` serves the `urlcode report` page and rebuilds it from disk on each page load, so a reload shows the project as it is now. It adds no analysis and changes nothing: one read-only page, no project code run. The policy file and BEFORE are re-read per load; the host file is loaded once. A project that does not load (mid-edit YAML) renders its error and the studio keeps running. It listens on loopback only and answers only requests whose Host is a loopback name, so a web page cannot read it through DNS rebinding. It reads only an explicit --port, never PORT (the serve/dev container setting). loadDocument admits two loads per process. The report ran explain and review in parallel; when one failed, the sibling kept a slot and the next load was refused with "Configuration compilation capacity unavailable". The report now loads sequentially, and concurrent studio requests share one build. readChangeInput (yaml-change.ts) replaces the directory-or-YAML reader diff and report each had inline. Co-Authored-By: Claude Opus 5.5 <[email protected]>
jimhoyd
enabled auto-merge (squash)
September 25, 2026 14:56
4 tasks done
jimhoyd
added a commit
that referenced
this pull request
Sep 25, 2026
Studio (#751) and the report (#749) were documented only in TOOLING.md, llms.txt and the CLI help. Add a row to the docs index, a sentence in the README's "Try it", and name studio next to report in the AI-authoring hand-back step. llms-full.txt regenerated. Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Problem and change
urlcode report(#749) writes a file you regenerate by hand after each change.urlcode studio [BEFORE] [--project DIR] [--port 4100] [--policy F] [--host-file F]serves the same page on localhost and rebuilds it from disk on every page load, so reloading shows the project as it is now.report;studio.tsadds no analysis. Read-only: no editing, no project code run.BEFOREare re-read per load, so a re-pin shows on reload. The host file is trusted operator code: loaded once at start.urlcode.yamlmid-edit) renders its error; the studio keeps running.--hostmust be127.0.0.1,::1orlocalhost, and requests whoseHostis not a loopback name get 403, so a web page cannot read it through DNS rebinding. Only an explicit--portis read, neverPORT(theserve/devcontainer setting).Found while building it:
loadDocumentadmits two loads per process. The report ranexplainandreviewin parallel; when one failed on broken YAML, the sibling kept a slot and the next load was refused ("Configuration compilation capacity unavailable"). The report now loads sequentially, and concurrent studio requests share one in-flight build.readChangeInputinyaml-change.tsreplaces the directory-or-YAML reader thatdiffandreporteach had inline.Docs: new Studio subsection under the review report, and
llms.txt.Verification
npm run verify: pass, 0 failures.npm run test:package: pass.test/studio.test.ts(5 tests): the page follows file edits; broken YAML gives a 500 error page with no script and the studio keeps serving; non-loopback--hostrefused, foreignHost403, POST 405 withAllow, other paths 404, HEAD without a body; 6 concurrent loads all 200;BEFOREcomparison; the CLI prints itslisteningevent and exits 0 on SIGINT.Not included: the page does not refresh itself. That needs script, which the page's CSP currently forbids, so it is left for a separate decision.
Compatibility and security
New CLI command;
studiojoinshostFileCommandsandpolicyCommands. No YAML, schema or runtime change.The report now runs
explainthenreviewsequentially instead of in parallel; output is unchanged.Serves only the read-only report, with
Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline',Cache-Control: no-store,X-Content-Type-Options: nosniffandReferrer-Policy: no-referrer.Changes match the documented portable contract; docs/examples are updated where needed.
Relevant tests and package checks pass, or limitations are explained above.
No credentials, customer data or private project material are included.
Runtime/starter changes remain aligned where applicable.
🤖 Generated with Claude Code