Skip to content

fix(sanity): add _strengthenOnPublish to reference schema type#12366

Draft
juice49 wants to merge 1 commit intomainfrom
fix/reference-schema-type-strengthen-on-publish
Draft

fix(sanity): add _strengthenOnPublish to reference schema type#12366
juice49 wants to merge 1 commit intomainfrom
fix/reference-schema-type-strengthen-on-publish

Conversation

@juice49
Copy link
Copy Markdown
Contributor

@juice49 juice49 commented Mar 11, 2026

Description

This branch adds the _strengthenOnPublish field to the core reference schema type. It's currently absent, despite being a field routinely added by the system.

This branch also fixes a gap in the extractManifestRestore test, in which fields in the tested schema type weren't sanitised before being used in assertions.
Edit: those tests were removed when the CLI was ejected from this repository.

Why add it now?

The process that displays divergences to the user is informed by the schema. If a divergence affects a field that doesn't exist in the schema, it's excluded.

This means that if a user copies the upstream value of a reference field that has _strengthenOnPublish defined, the _strengthenOnPublish value is not currently copied. This can create a reference strength mismatch. Including _strengthenOnPublish in the reference schema type definition fixes this.

before.mov
after.mov

What to review

The updated reference schema type definition.

Testing

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 11, 2026

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

Project Deployment Actions Updated (UTC)
page-building-studio Ready Ready Preview, Comment Mar 12, 2026 3:02pm
test-studio Ready Ready Preview, Comment Mar 12, 2026 3:02pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
e2e-studio Ignored Ignored Mar 12, 2026 3:02pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 11, 2026

🧪 E2E Preview environment

🔑 Environment Variables for Local Testing

This is the preview URL for the E2E tests: https://e2e-studio-dg2aq4821.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-dg2aq4821.sanity.dev
  SANITY_E2E_DATASET="update depending the project you want to test (pr-12366-chromium-23008456491 || pr-12366-firefox-23008456491 )"
  SANITY_E2E_DATASET_CHROMIUM=pr-12366-chromium-23008456491
  SANITY_E2E_DATASET_FIREFOX=pr-12366-firefox-23008456491

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 11, 2026

📊 Playwright Test Report

Download Full E2E Report

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 11, 2026

📦 Bundle Stats — sanity

Compared against main (a925f7bf) · v5.14.1 (npm)

Metric Value vs main (a925f7b) vs v5.14.1
Internal (raw) 4.31 MB +24 B, +0.0% +2.4 KB, +0.1%
Internal (gzip) 1014.3 KB +14 B, +0.0% +743 B, +0.1%
Bundled (raw) 11.63 MB +262 B, +0.0% +102.1 KB, +0.9%
Bundled (gzip) 2.63 MB +95 B, +0.0% +20.7 KB, +0.8%
Import time 1.55s +5ms, +0.3% +64ms, +4.3%
Details
  • Import time regressions over 10% are flagged with ⚠️
  • Treemap artifacts are attached to the CI run for detailed size analysis
  • Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 11, 2026

⚡️ Editor Performance Report

Updated Thu, 12 Mar 2026 15:12:22 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
arrayI18n (simple-en) 83.3 efps (12ms) 76.9 efps (13ms) +1ms (-/-%)
article (title) 37.0 efps (27ms) 35.7 efps (28ms) +1ms (+3.7%)
article (body) 53.6 efps (19ms) 51.3 efps (19ms) +1ms (+4.6%)
article (string inside object) 40.8 efps (25ms) 40.0 efps (25ms) +1ms (+2.0%)
article (string inside array) 45.5 efps (22ms) 45.5 efps (22ms) +0ms (-/-%)
recipe (name) 99.9+ efps (9ms) 99.9+ efps (9ms) +0ms (-/-%)
recipe (description) 50.0 efps (20ms) 58.8 efps (17ms) -3ms (-15.0%)
recipe (instructions) 99.9+ efps (6ms) 99.9+ efps (5ms) -1ms (-/-%)
singleString (stringField) 99.9+ efps (6ms) 99.9+ efps (6ms) +0ms (-/-%)
synthetic (title) 58.8 efps (17ms) 52.6 efps (19ms) +2ms (+11.8%)
synthetic (string inside object) 57.1 efps (18ms) 60.6 efps (17ms) -1ms (-5.7%)

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
arrayI18n (simple-en) 12ms 14ms 20ms 36ms 0ms 5.4s
article (title) 27ms 30ms 33ms 85ms 25ms 7.0s
article (body) 19ms 21ms 30ms 94ms 280ms 5.5s
article (string inside object) 25ms 28ms 33ms 53ms 22ms 6.8s
article (string inside array) 22ms 26ms 35ms 70ms 24ms 7.0s
recipe (name) 9ms 13ms 16ms 36ms 0ms 5.2s
recipe (description) 20ms 23ms 27ms 45ms 0ms 4.4s
recipe (instructions) 6ms 10ms 12ms 21ms 0ms 3.1s
singleString (stringField) 6ms 9ms 11ms 27ms 0ms 4.5s
synthetic (title) 17ms 22ms 25ms 101ms 1257ms 9.1s
synthetic (string inside object) 18ms 24ms 49ms 100ms 1540ms 9.4s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
arrayI18n (simple-en) 13ms 15ms 18ms 44ms 0ms 5.6s
article (title) 28ms 30ms 38ms 59ms 29ms 7.8s
article (body) 19ms 25ms 33ms 99ms 268ms 5.6s
article (string inside object) 25ms 29ms 48ms 89ms 10ms 6.9s
article (string inside array) 22ms 30ms 40ms 58ms 3ms 6.9s
recipe (name) 9ms 11ms 13ms 26ms 0ms 5.1s
recipe (description) 17ms 21ms 26ms 35ms 0ms 4.3s
recipe (instructions) 5ms 9ms 11ms 12ms 0ms 3.0s
singleString (stringField) 6ms 8ms 12ms 30ms 0ms 4.6s
synthetic (title) 19ms 21ms 29ms 98ms 1621ms 9.7s
synthetic (string inside object) 17ms 19ms 24ms 117ms 1374ms 9.3s

📚 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.

@juice49 juice49 force-pushed the fix/reference-schema-type-strengthen-on-publish branch from 03a3966 to b702d9b Compare March 12, 2026 14:59
@github-actions
Copy link
Copy Markdown
Contributor

📚 TypeDoc Generation Result

TypeDoc generated successfully!

  • File size: 8.1M
  • Total exports: 1057
  • Artifact: sanity-typedoc-619fd4f17065736c68d0ab85aec61dbcbc38b53c

The TypeDoc JSON file has been generated and validated. All documentation scripts completed successfully.

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