fix: revert page-level hooks to useRealtimeRun to fix auth context error#2780
Merged
fix: revert page-level hooks to useRealtimeRun to fix auth context error#2780
Conversation
…ntext useRun requires a TriggerProvider with an access token. When there's no active onboarding (no triggerJobId), the TriggerTokenProvider renders children without a TriggerProvider, causing useRun to throw "Missing accessToken in TriggerAuthContext." Reverted policies-table, use-policy-onboarding-status, and use-onboarding-status back to useRealtimeRun which gracefully handles missing auth context via the enabled flag. For ToDoOverview, removed the trigger hook entirely — it only needs a boolean "is onboarding running" which can be derived from the triggerJobId prop. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
5 tasks
claudfuen
pushed a commit
that referenced
this pull request
May 7, 2026
# [3.45.0](v3.44.2...v3.45.0) (2026-05-07) ### Bug Fixes * address cubic review findings on onboarding PR ([#2783](#2783)) ([bd43e8a](bd43e8a)) * **onboarding:** handle zero-item steps in tracker ([#2785](#2785)) ([a196339](a196339)) * revert page-level hooks to useRealtimeRun to fix missing auth context ([#2780](#2780)) ([5a406f9](5a406f9)) ### Features * **frameworks:** remove is-framework-versioning-enabled feature flag ([#2781](#2781)) ([016f379](016f379)) ### Performance Improvements * **build:** skip TS in next build, reduce sentry upload, add CI typecheck ([#2782](#2782)) ([26e1667](26e1667)) * **onboarding:** optimize onboarding pipeline from ~5min to ~2min ([b14db0b](b14db0b))
Contributor
|
🎉 This PR is included in version 3.45.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Summary
Fixes the "Missing accessToken in TriggerAuthContext" error on staging that crashes the overview and policies pages.
useRunrequires aTriggerProvidercontext with an access tokentriggerJobId), theTriggerTokenProviderrenders children WITHOUT aTriggerProvideruseRunthrows;useRealtimeRunwithenabled: falsegracefully returns nullChanges:
useRun→useRealtimeRunwithenabledflagisOnboardingInProgressfrom thetriggerJobIdpropFollow-up to #2777.
Test plan
🤖 Generated with Claude Code
Summary by cubic
Fixes the “Missing accessToken in TriggerAuthContext” crash by reverting page-level hooks to
useRealtimeRunand removing an unnecessary trigger hook. Overview and Policies now load safely when no onboarding is active.useRunwithuseRealtimeRun({ enabled })from@trigger.dev/react-hooksin policies table and onboarding status hooks to avoid requiring aTriggerProviderwhen noonboardingRunId.ToDoOverview: removed trigger hook and deriveisOnboardingInProgressfromtriggerJobId.Written for commit a24baec. Summary will update on new commits.