Skip to content

Conversation

@kbrabrand
Copy link
Contributor

@kbrabrand kbrabrand commented Dec 1, 2025

Description

The PR adds an override for imports starting with https://themer.sanity.build/api/ that returns a Proxy object. This should be safe since the themes from the themer never impacts the exported schema.

This was done in response to https://linear.app/sanity/issue/CLDX-2705/validateextract-schema-fails-when-there-is-a-url-import-in reported by a user in #7602.

Testing

Tests have been added both for the importErrorHandler in isolation and a test verifying that the themer url imports work in a worker where the mockBrowserEnvironment is called. Has also been verified in a test project locally.

Notes for release

@kbrabrand kbrabrand requested a review from a team as a code owner December 1, 2025 09:56
@kbrabrand kbrabrand requested review from bjoerge and removed request for a team December 1, 2025 09:56
@vercel
Copy link

vercel bot commented Dec 1, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
page-building-studio Ready Ready Preview Comment Dec 2, 2025 0:32am
test-studio Ready Ready Preview Comment Dec 2, 2025 0:32am
3 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
e2e-studio Ignored Ignored Dec 2, 2025 0:32am
studio-workshop Ignored Ignored Preview Dec 2, 2025 0:32am
test-next-studio Ignored Ignored Dec 2, 2025 0:32am

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

🧪 E2E Preview environment

🔑 Environment Variables for Local Testing

This is the preview URL for the E2E tests: https://e2e-studio-lk5dfen03.sanity.dev

To run the E2E tests locally, you can use the following environment variables, then run pnpm test:e2e --ui to open the Playwright test runner.

💬 Remember to build the project first with pnpm build:e2e.

  SANITY_E2E_PROJECT_ID=ittbm412
  SANITY_E2E_BASE_URL=https://e2e-studio-lk5dfen03.sanity.dev
  SANITY_E2E_DATASET="update depending the project you want to test (pr-11346-chromium-19858571523 || pr-11346-firefox-19858571523 )"
  SANITY_E2E_DATASET_CHROMIUM=pr-11346-chromium-19858571523
  SANITY_E2E_DATASET_FIREFOX=pr-11346-firefox-19858571523

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

📊 Playwright Test Report

Download Full E2E Report

This report contains test results, including videos of failing tests.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

⚡️ Editor Performance Report

Updated Tue, 02 Dec 2025 12:44:53 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 22.7 efps (44ms) 23.8 efps (42ms) -2ms (-4.5%)
article (body) 34.1 efps (29ms) 32.0 efps (31ms) +2ms (+6.7%)
article (string inside object) 27.4 efps (37ms) 26.3 efps (38ms) +2ms (+4.1%)
article (string inside array) 23.8 efps (42ms) 24.4 efps (41ms) -1ms (-2.4%)
recipe (name) 45.5 efps (22ms) 45.5 efps (22ms) +0ms (-/-%)
recipe (description) 66.7 efps (15ms) 71.4 efps (14ms) -1ms (-/-%)
recipe (instructions) 99.9+ efps (6ms) 99.9+ efps (5ms) -1ms (-/-%)
singleString (stringField) 58.8 efps (17ms) 55.6 efps (18ms) +1ms (+5.9%)
synthetic (title) 17.5 efps (57ms) 16.8 efps (60ms) +3ms (+4.4%)
synthetic (string inside object) 17.1 efps (59ms) 17.5 efps (57ms) -2ms (-2.6%)

efps — editor "frames per second". The number of updates assumed to be possible within a second.

Derived from input latency. efps = 1000 / input_latency

Detailed information

🏠 Reference result

The performance result of sanity@latest

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 44ms 48ms 73ms 121ms 59ms 11.0s
article (body) 29ms 42ms 100ms 134ms 190ms 6.9s
article (string inside object) 37ms 39ms 51ms 85ms 3ms 5.8s
article (string inside array) 42ms 46ms 54ms 122ms 18ms 6.4s
recipe (name) 22ms 25ms 29ms 50ms 0ms 8.1s
recipe (description) 15ms 19ms 25ms 40ms 0ms 4.1s
recipe (instructions) 6ms 10ms 12ms 21ms 0ms 3.0s
singleString (stringField) 17ms 20ms 22ms 35ms 0ms 7.1s
synthetic (title) 57ms 59ms 71ms 137ms 252ms 15.1s
synthetic (string inside object) 59ms 61ms 104ms 129ms 204ms 7.7s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 42ms 47ms 73ms 108ms 41ms 10.3s
article (body) 31ms 39ms 74ms 174ms 164ms 6.7s
article (string inside object) 38ms 42ms 61ms 111ms 0ms 6.0s
article (string inside array) 41ms 45ms 50ms 111ms 1ms 6.3s
recipe (name) 22ms 25ms 35ms 57ms 0ms 7.2s
recipe (description) 14ms 17ms 21ms 37ms 0ms 4.1s
recipe (instructions) 5ms 9ms 10ms 31ms 0ms 3.0s
singleString (stringField) 18ms 19ms 24ms 50ms 0ms 6.3s
synthetic (title) 60ms 63ms 70ms 152ms 346ms 15.2s
synthetic (string inside object) 57ms 64ms 127ms 266ms 480ms 8.1s

📚 Glossary

column definitions

  • benchmark — the name of the test, e.g. "article", followed by the label of the field being measured, e.g. "(title)".
  • latency — the time between when a key was pressed and when it was rendered. derived from a set of samples. the median (p50) is shown to show the most common latency.
  • p75 — the 75th percentile of the input latency in the test run. 75% of the sampled inputs in this benchmark were processed faster than this value. this provides insight into the upper range of typical performance.
  • p90 — the 90th percentile of the input latency in the test run. 90% of the sampled inputs were faster than this. this metric helps identify slower interactions that occurred less frequently during the benchmark.
  • p99 — the 99th percentile of the input latency in the test run. only 1% of sampled inputs were slower than this. this represents the worst-case scenarios encountered during the benchmark, useful for identifying potential performance outliers.
  • blocking time — the total time during which the main thread was blocked, preventing user input and UI updates. this metric helps identify performance bottlenecks that may cause the interface to feel unresponsive.
  • test duration — how long the test run took to complete.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

⚡️ Editor Performance Report

Deploying studio and running performance tests…

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 44.46% 64007 / 143956
🔵 Statements 44.46% 64007 / 143956
🔵 Functions 48.32% 3414 / 7064
🔵 Branches 79.32% 13028 / 16424
File CoverageNo changed files found.
Generated in workflow #46919 for commit a5ac793 by the Vitest Coverage Report Action

Copy link
Member

@bjoerge bjoerge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kbrabrand
Copy link
Contributor Author

kbrabrand commented Dec 2, 2025

LGTM

Cool. I need an approval to be able to merge :)

(running the eFPS tests again before merging ofc.. they failed as per usual)

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.

3 participants