Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
✅ E2E Tests🟢 46 passed • view full report • view run Studio: https://plugins-e2e-test-studio-7bhs94zuw.sanity.dev Datasets: |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Review: approveVerified
Non-blocking
VerdictApprove. Small diff, returned shape unchanged, the measurement claims that can be checked in code hold, and the test fails on |
cursor
Bot
force-pushed
the
cody/mux-input-keep-videos-browser-on-reveal-8079
branch
from
October 13, 2026 15:19
a0f4450 to
99ea258
Compare
🦋 Changeset detectedLatest commit: c24509d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Re-review (99ea258): approveBoth non-blocking points are addressed; nothing new to raise. Verified
VerdictApprove. The non-blocking thread is addressed and can be resolved on your side. |
cursor
Bot
force-pushed
the
cody/mux-input-keep-videos-browser-on-reveal-8079
branch
from
October 22, 2026 16:28
99ea258 to
fae8125
Compare
cursor
Bot
force-pushed
the
cody/mux-input-keep-videos-browser-on-reveal-8079
branch
from
October 23, 2026 13:29
fae8125 to
a31f7f0
Compare
cursor
Bot
force-pushed
the
cody/mux-input-keep-videos-browser-on-reveal-8079
branch
from
October 26, 2026 16:05
a31f7f0 to
7187f7d
Compare
…query reconnects With `beta.reactActivityMode` the Studio keeps recently used tools mounted behind `<Activity>`, which tears down their subscriptions on hide and re-subscribes on reveal. `useAssets` read its query through `createHookFromObservableFactory`, whose observable starts every subscription with a loading tuple, so returning to the Videos tool replaced the whole grid with a spinner and remounted it (and refetched every thumbnail) once the listener's first result arrived. Subscribe to the memoized `listenQuery` observable with react-rx's `useObservable` directly: it keeps the last emission across re-subscriptions, so the grid stays put while the query reconnects, and only a query that has never emitted (first load, a new search or sort) is loading. Co-authored-by: Cody Olsen <stipsan@users.noreply.github.com>
cursor
Bot
force-pushed
the
cody/mux-input-keep-videos-browser-on-reveal-8079
branch
from
October 29, 2026 16:07
7187f7d to
c24509d
Compare
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
With
beta.reactActivityMode, returning to the Videos tool replaced the whole grid with a spinner for ~700ms, then remounted every video card (1648 components) and refetched all 14 animated thumbnails. The Studio keeps recently used tools mounted behind<Activity>, which tears down their subscriptions on hide and re-subscribes on reveal.useAssetsread itslistenQuerythroughcreateHookFromObservableFactory, whose observable starts every subscription with a loading tuple ([undefined, true]), so on revealassetswent empty andisLoadingtrue until the listener's first result arrived.useAssetsnow subscribes to the memoizedlistenQueryobservable with react-rx'suseObservabledirectly. Its store keeps the last emission across re-subscriptions, so the grid stays on screen while the query reconnects in the background, and only a query that has never emitted (the first load, a new search or sort) is loading. The asset source'sInputBrowsershares the hook, so it gets the same behaviour. That retention is react-rx 7 behaviour rather than a documented guarantee (the per-component store entry keeps its snapshot across thesharereset), so the hook test pins it and the code comment points there for the next react-rx bump.What to review
src/hooks/useAssets.ts:useMemoof the observable plususeObservable(assetDocuments$, undefined);isLoadingis "no emission yet". The returned shape is unchanged.src/hooks/useAssets.test.tsx: the hook test. The@testing-library/reactandjsdomdevDependencies it needs are already onmainsince fix(mux-input): mount the Mux player only after clicking the poster #2074, so this PR no longer touchespackage.jsonor the lockfile.Affects
sanity-plugin-mux-input.Testing
src/hooks/useAssets.test.tsx(jsdom,sanityfully mocked withuseDocumentStoreand acollatefor published documents, so the test does not load the Studio package): the loaded videos stay rendered across an<Activity>hide/show cycle while the query re-subscribes once, and the next emission updates them. Onmainthe component showsloadingafter the reveal.pnpm --filter sanity-plugin-mux-input exec vitest run,pnpm build,pnpm lint,pnpm knip,pnpm formatare clean.dev/test-studio(/home/mux,reactActivityModeon) with a headed Playwright harness that switches to Vision, waits 7s, switches back and records React commits, mounted components, requests and painted frames (CDP screencast) until the page is quiet for 30 frames. Before: spinner mounted at 49ms, the grid gone until +766ms, 1835 components mounted, 14 thumbnail requests toimage.mux.com. After: the grid is on screen from the first painted frame, 0 components mounted, 2 thumbnail requests. The 3listen+ 3queryreconnects remain (they are the Studio stores' cold start on reveal, and the data they deliver is identical). Frame counts are not comparable for this tool because the thumbnails are animated GIFs.Videos tool before: spinner then full remount
Videos tool after: grid stays on screen
Notes for release
Fixes the Videos tool (and the Mux asset source) replacing its grid with a spinner and reloading every thumbnail when returning to it in a Studio with
beta.reactActivityModeenabled.To show artifacts inline, enable in settings.