Skip to content

feat(core): studio opens the browser; review report shows changed files, a verdict, route marks and findings - #792

Merged
jimhoyd merged 1 commit into
mainfrom
claude/studio-reviewer-enhancements
Sep 26, 2026
Merged

jimhoyd merged 1 commit into
mainfrom
claude/studio-reviewer-enhancements

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator

What

urlcode studio opens the browser

  • From a terminal it opens the page; --no-open only prints the URL. Piped/JSON output opens nothing unless --open; the listening event reports opened.
  • Uses $BROWSER when set (BROWSER=none disables), else open / explorer.exe / xdg-open. The URL is one argument, never a shell; a failing browser never stops the studio.

Review report / studio page

  • Code-only edits now show. diff reads YAML only, so against urlcode-ai's app/ five changed function files showed as just "Changes project settings: extensions". With a BEFORE directory, the report compares files by content (change.files: added, removed, changed, runBy). Each changed code file is a Check item, attributed to the route that runs it (function, middleware, or a file named in the config of an add-on the route mounts/requires, e.g. an MCP tool handler). Skips dot-entries, node_modules, symlinks; stops at 5000 files per side; parses nothing.
  • Verdict line (to fix / to check) and summary numbers: routes (new/changed/removed), routes running code (trusted/sandboxed), needs from the host, review findings.
  • Route rows marked new / changed / code changed, with their own attention items; removed routes listed struck through; :target highlight; CSS-only filters (Needs attention / Changed / Runs code). Still no script, same CSP.
  • Code review findings section with category, confidence, file:line, routes, excerpt and note.
  • Studio header shows when the page was built (urlcode report stays deterministic).

Docs: docs/TOOLING.md (review report + studio), README, AI-AUTHORING, regenerated llms-full.txt.

Evidence

  • npm run verify passes locally.
  • New tests: file comparison and attribution (incl. skipped node_modules/dot-files/symlinks, YAML BEFORE note), verdict/route marks/findings with escaping, browserCommand selection, studio --open via a fake $BROWSER, and --open/--no-open scoping.
  • Checked by hand in a browser against urlcode-ai's app/ and a synthetic before/after project, including dark mode and phone width.

Limitations / follow-up

  • Studio reads both trees on every reload; large asset trees reload slower.
  • Not in this PR: editing a file only named in an add-on's config (e.g. MCP tool handlers) does not change the revision operator grants pin to. Worth its own issue.

🤖 Generated with Claude Code

…es, a verdict, route marks and findings

- `urlcode studio` opens the page from a terminal (--open/--no-open, $BROWSER, BROWSER=none); the listening event reports `opened`.
- Against a BEFORE directory the report compares files by content, so code-only edits show; changed code is attributed to the route that runs it, including files an add-on's config names.
- The page leads with a verdict and summary numbers, marks routes new/changed/code changed/removed with their own attention items, adds CSS-only filters, and lists review findings with excerpts. Studio shows when the page was built.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jimhoyd
jimhoyd enabled auto-merge (squash) September 26, 2026 16:47
@jimhoyd
jimhoyd merged commit 64b181b into main Sep 26, 2026
27 checks passed
@jimhoyd
jimhoyd deleted the claude/studio-reviewer-enhancements branch September 26, 2026 16:50
jimhoyd added a commit that referenced this pull request Sep 26, 2026
…-in MCP streaming transport (#659, #626) (#796)

* feat(core): generic streaming responses for extensions and trusted functions on node/vercel, refused elsewhere (#659)

HandlerResult gains `stream` (AsyncIterable<string | Uint8Array>), exclusive
with `body`. A trusted function route opts in with `stream: true` (its Response
body is handed on unread); an extension registration opts in with
`streams: true`. Any other streamed result is the generic 502, logged as
`stream_refused`. `stream: true` needs `function` and is refused with
`sandbox: true`; the sandbox stays buffered and unchanged.

The self-hosted server (native) and the Vercel adapter (delegated) write
streams through a shared StreamHost: runtime decoration, no Content-Length,
chunked, head committed on the first chunk, backpressure, HEAD never pulls,
cancellation through iterator return() and an AbortSignal handed to
extensions (request.signal) and trusted functions (context.signal), and
operator limits separate from short-request admission (--max-streams,
--stream-idle-timeout-ms, --stream-max-duration-ms, --stream-max-bytes).
Shutdown ends streams at the close deadline; a retired dev-reload runtime
closes after its last stream. AWS, Cloudflare and static refuse streaming
before serving through the new `streaming` capability, and prepareExtensions
refuses a `streams: true` registration outside node/vercel. Cache and
compression bypass streams explicitly. Each ended stream logs a `stream`
record with bytes, duration and end reason.

Adds RIM-STREAM-001, specification/extension/operations/capability docs, the
streaming-progress recipe and real-socket tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014jmv9dMggduiprzSsNd7iP

* feat(mcp): opt-in streaming transport with progress, sessions, server stream and Last-Event-ID replay (#659, #626)

The optional parts of the MCP Streamable HTTP transport, enabled only by the
operator: mcp({ streaming: true }) or bounded options (maxSessions 1000,
sessionIdleTimeoutMs 1800000, keepAliveMs 15000, replayMaxEvents 64,
replayMaxBytes 65536). Off by default: the registration then does not declare
streams and every response is unchanged on every target, aws included.

On, the registration declares streams: true (core refuses aws before
activation; activation refuses vercel, whose instances do not share the
in-memory session table):
- initialize issues a 32-byte random base64url Mcp-Session-Id; later requests
  without it answer 400, an unknown/ended/expired/evicted one 404, DELETE ends
  it. A session is bound to the creating principal; another principal's use
  answers 404. The table is bounded (LRU eviction, idle expiry) and lives in
  memory, so a restart means 404 and re-initialize.
- a tools/call with _meta.progressToken and an SSE Accept answers
  notifications/progress then the response as SSE; tools report through
  context.progress, and every handler gets context.signal (client disconnect,
  notifications/cancelled, session end, stream limits).
- GET opens the session's server stream: keep-alive comments, consecutive
  event ids, a bounded replay buffer and Last-Event-ID replay; a newer GET
  replaces the open one. Nothing sends server-initiated messages yet; the
  plumbing is exercised by a test-only trigger.

Real-socket tests in packages/mcp/test/streaming.test.ts. README, SECURITY,
llms, CHANGELOG, EXTENSIONS/FRAMEWORK/OPERATIONS docs and urlcode.json updated;
the mcp unpacked-size budget is raised to 160 KiB.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014jmv9dMggduiprzSsNd7iP

* chore(package): raise core size budgets for streaming with the studio report (#659, #792)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014jmv9dMggduiprzSsNd7iP

---------

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant