Skip to content

fix: allow standalone timeline rendering#1617

Merged
miguel-heygen merged 1 commit into
mainfrom
fix/timeline-without-edit-provider
Jun 20, 2026
Merged

fix: allow standalone timeline rendering#1617
miguel-heygen merged 1 commit into
mainfrom
fix/timeline-without-edit-provider

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

Problem

The public @hyperframes/studio Timeline export can be used by consumers outside the full Studio app shell, but 0.6.117 made that path require private provider context. Internal app pages that render Timeline directly crash with useTimelineEditContext must be used within TimelineEditProvider.

What this fixes

  • Lets Timeline resolve edit callbacks from the optional timeline edit context, so standalone/read-only timelines render with no-op edit callbacks.
  • Lets the timeline canvas read optional edit callbacks for move/resize/razor interactions.
  • Makes beat-analysis project file IO optional so standalone timeline consumers do not need the full FileManagerProvider.
  • Adds a regression test that mounts the public Timeline export with real elements outside TimelineEditProvider.

Root cause

Timeline is 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.ts
  • bun run --filter @hyperframes/studio typecheck
  • bun run --filter @hyperframes/studio build
  • pre-commit: lint, format, fallow, typecheck

Notes

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.

@miguel-heygen miguel-heygen merged commit aed1829 into main Jun 20, 2026
30 checks passed
@miguel-heygen miguel-heygen deleted the fix/timeline-without-edit-provider branch June 20, 2026 22:23
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