You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
We are currently only using the document.delete action when a published document exists. document.delete requires a published ID that exists. There are a couple of issues
We are not passing includedDrafts array through to document.delete which means that we are not also deleting the other versions of the document that exist
When a published document doesn't exist, we are using document.discard which is firstly a deprecated action, and secondly only discard a single document version, rather than all versions.
This PR makes the changes so that:
includedDrafts passes the document Ids of all versions to delete the published and all other versions of the document
version.discard is used instead of document.discard and the actions are chained together to delete all the versions of that document
Before:
Release version document is not deleted
After:
All versions of the document are deleted
What to review
Testing
Notes for release
Fixes an issue where deleting a document would in some cases not delete all versions of that document.
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-qeehoesly.sanity.dev
SANITY_E2E_DATASET="update depending the project you want to test (pr-11336-chromium-19765155601 || pr-11336-firefox-19765155601 )"
SANITY_E2E_DATASET_CHROMIUM=pr-11336-chromium-19765155601
SANITY_E2E_DATASET_FIREFOX=pr-11336-firefox-19765155601
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)
33ms
36ms
40ms
53ms
38ms
8.7s
article (body)
28ms
30ms
67ms
117ms
150ms
6.2s
article (string inside object)
35ms
40ms
57ms
100ms
0ms
5.9s
article (string inside array)
39ms
44ms
56ms
139ms
111ms
6.3s
recipe (name)
23ms
27ms
36ms
69ms
0ms
6.6s
recipe (description)
16ms
18ms
22ms
32ms
0ms
4.2s
recipe (instructions)
7ms
10ms
12ms
18ms
0ms
3.0s
singleString (stringField)
18ms
20ms
21ms
43ms
0ms
5.9s
synthetic (title)
60ms
63ms
115ms
167ms
422ms
14.9s
synthetic (string inside object)
58ms
60ms
65ms
146ms
251ms
7.6s
🧪 Experiment result
The performance result of this branch
Benchmark
latency
p75
p90
p99
blocking time
test duration
article (title)
38ms
42ms
48ms
100ms
20ms
9.3s
article (body)
27ms
30ms
68ms
113ms
117ms
6.1s
article (string inside object)
36ms
38ms
42ms
67ms
0ms
5.7s
article (string inside array)
43ms
47ms
62ms
99ms
3ms
6.4s
recipe (name)
20ms
25ms
36ms
47ms
0ms
6.8s
recipe (description)
16ms
19ms
20ms
39ms
0ms
4.1s
recipe (instructions)
6ms
10ms
11ms
15ms
0ms
3.0s
singleString (stringField)
15ms
17ms
23ms
39ms
0ms
5.7s
synthetic (title)
61ms
64ms
71ms
112ms
454ms
15.0s
synthetic (string inside object)
58ms
63ms
115ms
144ms
196ms
8.0s
📚 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.
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.
Description
We are currently only using the
document.deleteaction when a published document exists.document.deleterequires a published ID that exists. There are a couple of issuesincludedDraftsarray through todocument.deletewhich means that we are not also deleting the other versions of the document that existdocument.discardwhich is firstly a deprecated action, and secondly only discard a single document version, rather than all versions.This PR makes the changes so that:
includedDraftspasses the document Ids of all versions to delete the published and all other versions of the documentversion.discardis used instead ofdocument.discardand the actions are chained together to delete all the versions of that documentBefore:

Release version document is not deleted
After:

All versions of the document are deleted
What to review
Testing
Notes for release
Fixes an issue where deleting a document would in some cases not delete all versions of that document.