fix: allow standalone timeline rendering#1617
Merged
Merged
Conversation
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.
Problem
The public
@hyperframes/studioTimelineexport can be used by consumers outside the full Studio app shell, but0.6.117made that path require private provider context. Internal app pages that renderTimelinedirectly crash withuseTimelineEditContext must be used within TimelineEditProvider.What this fixes
Timelineresolve edit callbacks from the optional timeline edit context, so standalone/read-only timelines render with no-op edit callbacks.FileManagerProvider.Timelineexport with real elements outsideTimelineEditProvider.Root cause
Timelineis exported as a reusable component, but the recent timeline edit callback refactor assumed every timeline lived under the full Studio provider stack. Internal app routes consume the exported lower-level timeline directly, so provider-only hooks threw at runtime.Verification
Local checks
bun run --filter @hyperframes/studio test -- src/player/components/Timeline.test.tsbun run --filter @hyperframes/studio typecheckbun run --filter @hyperframes/studio buildNotes
This keeps full Studio editing behavior intact: provider-backed callbacks still flow through
TimelineEditProvider; only standalone consumers fall back to empty/read-only callback bags.