Tapping connect on Add environment swaps the checkmark for a spinner, a custom header item. Since #21095 the toolbar's items feed the native stack options signature, which walked every enumerable field. In development a React element's `_owner` is a fiber, so the walk climbed the whole tree to React Navigation's NavigationStateContext. Outside render that context holds its default value, whose getters throw "Couldn't find a navigation context". The red box pointed at StackHeader.tsx:148 only because that is the component frame for NativeStackScreenOptions. The options helpers no longer walk React's internals. Elements are compared by type, key, and props. Component types and contexts are compared by identity and kept as-is when header factories are stabilized. Sheet headers with trailing or loading custom items went through the same path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed on 10/20/2026, 9:47:27 PMparentca140c4
Checks
- SuccessfulCodeRabbitGitHub
Review skipped
- Successful
Skipped - Not affected
- Skipped
- Skipped
- Skipped
- SuccessfulRemove preview downloadGitHub
- SuccessfulCheckGitHub
- Skipped
- SkippedTest WebGitHub
- SkippedRustGitHub
- SkippedRelease SmokeGitHub
- SuccessfulTestGitHub
- SuccessfulBuild and TypecheckGitHub
- SuccessfulNative fingerprint diffGitHub
- SkippedBuild preview JS bundleGitHub
- Successful
- SkippedEAS PreviewGitHub
- SkippedDeploy web previewGitHub
- Successful
- SuccessfulLabel PR 22521GitHub
- Skipped
- SuccessfulLabel PR sizeGitHub
- Successful
- Successful
- Successful
- Successful
- SkippedEAS PreviewGitHub
- SuccessfulCollect PR targetsGitHub
- SuccessfulPOST to CursorGitHub
- SuccessfulPrepare PR size configGitHub
- SuccessfulTest Server 4GitHub
- SuccessfulTest Server 5GitHub
- SuccessfulTest Server 1GitHub
- SuccessfulTest Server 3GitHub
- SuccessfulTest Server 7GitHub
- SuccessfulTest Server 8GitHub
- SuccessfulTest Server 6GitHub
- CancelledNative fingerprint diffGitHub
- SuccessfulTest Server 2GitHub
- SuccessfulLintGitHub
- SuccessfulChangesGitHub
2 files changedLine totals unavailable