Studio save, UI connection, and streaming recovery checks
Studio can save a new UI file without connecting it to the entry component. A successful syntax check also cannot establish whether the component mounts, its closed-state styles load, or the rendered control is visible. The connection diagnostic and Studio instructions make those limits explicit.
Behavior covered
- Successful editor saves advance the merge ancestor to the submitted client draft. Edits made while the request is pending remain dirty. Published-world responses can contain the live schema instead of the accepted working draft, so that response is not used as the saved ancestor.
- Responses from an earlier editor session must not change the current work's draft, ancestor, concurrency token, or save status. Older save/refresh responses must not replace a newer server revision.
- Static UI analysis follows source references from the entry and warns about unreferenced code files. The warning is advisory and is included directly in write/edit tool results. Unknown imports, parse failures, and analysis limits produce an unknown result instead of a false warning.
- Once any streaming chunk has reached the Studio agent, its outer retry wrapper surfaces a transient exception rather than starting a second generation and appending its content to the first. Failures before the first emitted chunk can still retry.
- Billing ownership stays in the Studio route. Coverage checks include callers of the retry wrapper; the wrapper itself does not charge a second time.
Local verification
From the repository root, run the server regressions without development or production credentials:
node packages/server/scripts/test-local.mjs src/lib/studio-tools/root-ui-reachability.test.ts src/lib/studio-tools/generate-stream-with-retry.test.ts src/lib/studio-tools/tool-executor.test.ts src/lib/studio-tools/tsx-validate.test.ts src/lib/billing-coverage.test.tsThe launcher strips application environment variables, disables dotenv loading, blocks unmocked external fetches, and uses a separate in-memory PGlite database in each test worker. Selected integration suites receive the current Drizzle schema, including constraints and the world/message triggers they need. Suites that deliberately create minimal schemas keep control of their own setup. This setup list does not skip tests: invoking the launcher without file arguments discovers the whole server suite.
Run the editor save regressions and release checks:
pnpm --filter @yumina/app exec tsx --tsconfig tsconfig.app.json --test src/stores/editor-save-baseline.test.ts
pnpm typecheck
pnpm buildThe editor tests load the actual store with a mocked network and browser storage. They do not open a browser, start a listening server, or modify real worlds.
Release verification — 2026-09-16
- Full isolated server suite: 1,799 passed, 8 skipped, 0 failed. After the schema helper's standalone dotenv guard was added, all 12 affected integration files were rerun: 113 passed, 0 failed.
- Full application suite: 974 passed, 9 failed. The nine failures were reproduced unchanged from main at
f216763d8135535dcc56ae91eeaa535c7ed697fc, in an isolated copy without this release's editor changes. All 84 relevant test/input files matched that commit byte for byte. - The existing failures concern top-bar scroll behavior (1), notification navigation (1), back-navigation source contracts (2), mobile drawer dimensions (3), wallet formatting source contracts (1), and CSS gradient formatting (1). This release does not change those tests or their inputs.
- Save regressions cover 23 cases, including overlapping save callers, edits during a save, published working drafts, stale server revisions, navigation between worlds, and delayed success/conflict/error responses.
- Final
pnpm buildandpnpm typecheckboth passed. The 23 save cases were rerun successfully after the final test-context type correction.
Limits
An imported component may still be unmounted or hidden. Literal dynamic imports and re-exports count conservatively as source connections even where the runtime bundler may not support that module form. These checks do not replace rendered UI verification.
The prompt guidance favors targeted changes and checking entry mounting and initial-state styles. It does not guarantee model compliance or reduce the price of work already performed. Billing formulas, account balances, provider selection, provider-level retries, interrupted-call accounting, and database schemas are unchanged.
Rollback
The runtime fixes do not require a database migration. Revert the relevant save, validation, or retry commit to restore its previous behavior; no creator data needs to be rewritten.
