[menu-bar] Show minimal popover when opened via deep link#312
Open
krystofwoldrich wants to merge 5 commits intomainfrom
Open
[menu-bar] Show minimal popover when opened via deep link#312krystofwoldrich wants to merge 5 commits intomainfrom
krystofwoldrich wants to merge 5 commits intomainfrom
Conversation
…a deep link When the app is opened via a browser deep link (expo-orbit://), only show the builds/progress section instead of the full device list and footer. The full menu bar is shown when the user clicks the menu bar icon directly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
gabrieldonadel
left a comment
There was a problem hiding this comment.
Thanks for the PR @krystofwoldrich! This idea looks great. Just need to implement the equivalent on Electron as well
Comment on lines
+102
to
+132
| // Track whether the popover was opened via a deep link (browser) or user click. | ||
| // In deep link mode, only the progress UI is shown. | ||
| const [isDeepLinkMode, setIsDeepLinkMode] = useState(false); | ||
| const deepLinkPending = useRef(false); | ||
|
|
||
| // Handle cold start: if app was launched via URL scheme, React wasn't mounted | ||
| // when deepLinkOpened fired, so check the initial URL instead. | ||
| useEffect(() => { | ||
| Linking.getInitialURL().then((url) => { | ||
| if (url) { | ||
| setIsDeepLinkMode(true); | ||
| } | ||
| }); | ||
| }, []); | ||
|
|
||
| useEffect(() => { | ||
| const listener = DeviceEventEmitter.addListener('deepLinkOpened', () => { | ||
| deepLinkPending.current = true; | ||
| }); | ||
| return () => listener.remove(); | ||
| }, []); | ||
|
|
||
| // When popover is focused by user click, exit deep link mode. | ||
| // Deep link opens also trigger popoverFocused, but deepLinkPending | ||
| // distinguishes them: the native side emits deepLinkOpened before | ||
| // popoverFocused, so we check and consume the flag here. | ||
| usePopoverFocusEffect( | ||
| useCallback(() => { | ||
| if (deepLinkPending.current) { | ||
| deepLinkPending.current = false; | ||
| setIsDeepLinkMode(true); |
Member
There was a problem hiding this comment.
Perhaps we can incorporate this logic into the useDeepLinking hook?
Co-authored-by: Gabriel Donadel Dall'Agnol <donadeldev@gmail.com>
Member
Author
|
Let's leave it out of today release then, I can revisit it and make sure it's solid. |
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.


Screen.Recording.2026-03-10.at.09.56.32.mov
Summary
expo-orbit://), only the builds/progress section is shown instead of the full device list, projects, and footerImplementation
AppDelegate.swift): emitsdeepLinkOpenedevent before opening the popover so React can distinguish deep link opens from user clicksCore.tsx: tracksisDeepLinkModestate using the native event +Linking.getInitialURL()for cold starts; conditionally hides projects section and device listPopover/index.tsx: hides footer in deep link modeTest plan
expo-orbit:///download?url=...from browser → should show only progress bar🤖 Generated with Claude Code