[auth] Add search-by-intent via ente-auth://search?query= deep link#9501
[auth] Add search-by-intent via ente-auth://search?query= deep link#9501bekoeppel wants to merge 3 commits intoente-io:mainfrom
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 40332ed5f0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 17ee46b060
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@bekoeppel Thanks for the contribution but could you also add a video recording or a screenshot too. |
|
Hi @AmanRajSinghMourya! Sure, happy to. Here's a quick video how I intend to use this new intent (pun intended). demo.mp4 |
|
Hi @AmanRajSinghMourya, hope you're doing well! Were you able to take a look at the video I uploaded? Do you have any feedback for my pull request? Thank you! Benedikt |
| _logger.warning("Malformed ente-auth deep link: $link", e); | ||
| } | ||
| } else if (mounted && lowerLink.startsWith("otpauth://")) { | ||
| if (DateTime.now().millisecondsSinceEpoch - lastScanTime < 1000) { |
There was a problem hiding this comment.
It would be better to extract this above the if-else ladder, so it applies to both enteauth and otpauth
There was a problem hiding this comment.
Thanks for your feedback!
I skipped the throttling only for ente-auth://search links on purpose, because it's OK to repeat a search query (it's idempotent, as it just filters the list).
However, the throttle already existed for OTP code additions (with otpauth:// links), I assume this is because otputh:// links add elements to the list, so we wanted to debounce that logic.
If I moved the throttle above the if-else, it adds an unnecessary delay to search deep links.
| lastScanTime = DateTime.now().millisecondsSinceEpoch; | ||
| if (mounted && link.toLowerCase().startsWith("otpauth://")) { | ||
| final lowerLink = link.toLowerCase(); | ||
| if (mounted && (lowerLink.startsWith("ente-auth://") || lowerLink.startsWith("enteauth://"))) { |
There was a problem hiding this comment.
I am not sure about ente-auth:// pattern, any reason you included it here?
There was a problem hiding this comment.
I saw ente-auth:// pattern (with a -) is registered in AndroidManifest.xml:
ente/mobile/apps/auth/android/app/src/main/AndroidManifest.xml
Lines 19 to 24 in 164efcf
along with the enteauth:// pattern (without a -):
ente/mobile/apps/auth/android/app/src/main/AndroidManifest.xml
Lines 33 to 38 in 164efcf
Let me know if I should remove the one with the -.
Description
ente-auth://search?query=gmailTests
adb shell am start -a android.intent.action.VIEW -d "ente-auth://search?query=gmail"with app closed: should open with search filteredadb shell am start -a android.intent.action.VIEW -d "ente-auth://abcd?query=gmail": should be ignored (only/searchpath is accepted)otpauth://deep links still work