Skip to content

Conversation

@dcilke
Copy link
Member

@dcilke dcilke commented Dec 16, 2025

Description

  • Refactor studio version display
  • Expose studio registration status

What to review

Resource Menu makes sense.

Testing

Changes were tested manually.

Lacking registration:
image

Lacking registration and user doesn't have permission:
image

Registered:
image

Notes for release

Expose the studio's registration status to the UI to enable and encourage users to register their Studio.

@vercel
Copy link

vercel bot commented Dec 16, 2025

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

Project Deployment Review Updated (UTC)
page-building-studio Ready Ready Preview, Comment Jan 6, 2026 2:27pm
test-studio Ready Ready Preview, Comment Jan 6, 2026 2:27pm
3 Skipped Deployments
Project Deployment Review Updated (UTC)
e2e-studio Ignored Ignored Jan 6, 2026 2:27pm
studio-workshop Ignored Ignored Preview Jan 6, 2026 2:27pm
test-next-studio Ignored Ignored Jan 6, 2026 2:27pm

@github-actions
Copy link
Contributor

github-actions bot commented Dec 16, 2025

🧪 E2E Preview environment

🔑 Environment Variables for Local Testing

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 16, 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 16, 2025

⚡️ Editor Performance Report

Updated Tue, 06 Jan 2026 14:39:45 GMT

Benchmark reference
latency of sanity@latest
experiment
latency of this branch
Δ (%)
latency difference
article (title) 20.8 efps (48ms) 18.7 efps (54ms) +6ms (+11.5%)
article (body) 46.0 efps (22ms) 43.9 efps (23ms) +1ms (+4.8%)
article (string inside object) 21.1 efps (48ms) 21.7 efps (46ms) -2ms (-3.2%)
article (string inside array) 18.5 efps (54ms) 18.9 efps (53ms) -1ms (-1.9%)
recipe (name) 40.0 efps (25ms) 38.5 efps (26ms) +1ms (+4.0%)
recipe (description) 47.6 efps (21ms) 45.5 efps (22ms) +1ms (+4.8%)
recipe (instructions) 99.9+ efps (9ms) 99.9+ efps (7ms) -2ms (-/-%)
singleString (stringField) 43.5 efps (23ms) 46.5 efps (22ms) -2ms (-6.5%)
synthetic (title) 14.3 efps (70ms) 15.4 efps (65ms) -5ms (-7.1%)
synthetic (string inside object) 15.3 efps (66ms) 14.6 efps (69ms) +3ms (+4.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) 48ms 56ms 98ms 271ms 310ms 10.5s
article (body) 22ms 26ms 39ms 127ms 95ms 5.7s
article (string inside object) 48ms 52ms 61ms 204ms 168ms 7.3s
article (string inside array) 54ms 63ms 87ms 238ms 277ms 7.7s
recipe (name) 25ms 32ms 47ms 78ms 0ms 7.1s
recipe (description) 21ms 24ms 27ms 54ms 0ms 4.6s
recipe (instructions) 9ms 11ms 12ms 16ms 0ms 3.2s
singleString (stringField) 23ms 31ms 40ms 70ms 5ms 6.6s
synthetic (title) 70ms 79ms 141ms 238ms 796ms 16.5s
synthetic (string inside object) 66ms 75ms 133ms 365ms 921ms 9.2s

🧪 Experiment result

The performance result of this branch

Benchmark latency p75 p90 p99 blocking time test duration
article (title) 54ms 61ms 85ms 191ms 162ms 10.5s
article (body) 23ms 33ms 82ms 181ms 226ms 6.5s
article (string inside object) 46ms 53ms 62ms 238ms 217ms 6.9s
article (string inside array) 53ms 59ms 84ms 194ms 148ms 7.5s
recipe (name) 26ms 30ms 36ms 86ms 0ms 7.6s
recipe (description) 22ms 24ms 29ms 46ms 2ms 4.8s
recipe (instructions) 7ms 13ms 17ms 51ms 0ms 3.5s
singleString (stringField) 22ms 24ms 29ms 57ms 0ms 6.3s
synthetic (title) 65ms 69ms 121ms 213ms 663ms 14.8s
synthetic (string inside object) 69ms 72ms 117ms 239ms 711ms 8.4s

📚 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 16, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 44.46% 64182 / 144348
🔵 Statements 44.46% 64182 / 144348
🔵 Functions 47.99% 3369 / 7019
🔵 Branches 79.65% 12969 / 16281
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/sanity/src/_singletons/context/LiveUserApplicationContext.tsx 100% 100% 100% 100%
packages/sanity/src/core/i18n/bundles/studio.ts 100% 100% 100% 100%
packages/sanity/src/core/studio/components/navbar/resources/ResourcesButton.tsx 24.59% 100% 0% 24.59% 22-85
packages/sanity/src/core/studio/components/navbar/resources/ResourcesMenuItems.tsx 8.21% 100% 0% 8.21% 37-39, 50-228
packages/sanity/src/core/studio/components/navbar/resources/useCanDeployStudio.ts 40% 100% 0% 40% 15-27
packages/sanity/src/core/studio/liveUserApplication/LiveUserApplicationProvider.tsx 20% 100% 0% 20% 23-61
Generated in workflow #49246 for commit ed7bba9 by the Vitest Coverage Report Action

@dcilke dcilke changed the title chore(ResourceMenu): move StudioVersion to top ResourceMenu: studio version and registration Dec 16, 2025
@dcilke dcilke changed the title ResourceMenu: studio version and registration feat: Update ResourceMenu studio version and registration Jan 6, 2026
@dcilke dcilke changed the title feat: Update ResourceMenu studio version and registration feat: update ResourceMenu studio version and registration Jan 6, 2026
@dcilke dcilke requested a review from mariuslundgard January 6, 2026 09:39
@dcilke dcilke marked this pull request as ready for review January 6, 2026 10:01
@dcilke dcilke requested a review from a team as a code owner January 6, 2026 10:01
@dcilke dcilke requested review from juice49 and removed request for a team January 6, 2026 10:01
mariuslundgard
mariuslundgard previously approved these changes Jan 6, 2026
Copy link
Member

@mariuslundgard mariuslundgard left a comment

Choose a reason for hiding this comment

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

LGTM

const workspaces = useWorkspaces()
const projectId = workspaces[0]?.projectId

let manageBaseUrl = 'https://www.sanity.io'
Copy link
Member

Choose a reason for hiding this comment

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

I think you could reuse the existing useEnvAwareSanityWebsiteUrl here

const handleRegisterStudio = useCallback(() => {
if (!projectId) return
const currentOrigin = typeof window === 'undefined' ? '' : window.location.origin
const registrationUrl = `${manageBaseUrl}/manage/project/${projectId}/studios?studio=add&origin=${encodeURIComponent(currentOrigin)}`
Copy link
Member

Choose a reason for hiding this comment

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

I'd maybe recommend a slightly more declarative approach like

      if (!projectId) return
      const url = new URL(`/manage/project/${projectId}/studios`, manageBaseUrl)
      url.searchParams.set('studio', 'add')
      url.searchParams.set('origin', window.location.origin)
      window.open(url, '_blank', 'noopener,noreferrer')

Copy link
Member

@jordanl17 jordanl17 left a comment

Choose a reason for hiding this comment

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

Suggested a few minor improvements to the way we construct the URL, to match existing patterns we have. Otherwise LGTM

jordanl17
jordanl17 previously approved these changes Jan 6, 2026
Copy link
Member

@jordanl17 jordanl17 left a comment

Choose a reason for hiding this comment

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

Nice one, thanks for the quick turnaround

@dcilke dcilke merged commit 6b48277 into main Jan 6, 2026
78 of 80 checks passed
@dcilke dcilke deleted the cldx-4505 branch January 6, 2026 20:27
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.

4 participants