feat(kilo-app): deep linking for existing web URLs#1935
Open
feat(kilo-app): deep linking for existing web URLs#1935
Conversation
Configure universal links (iOS) and Android App Links for app.kilo.ai. Map /claw, /profile, and /organizations/[orgId]/... web URLs to the corresponding mobile app screens via +native-intent URL rewriting.
Contributor
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Overview
Fix these issues in Kilo Cloud Issue Details (click to expand)WARNING
Other Observations (not in diff)Issues found in unchanged code that cannot receive inline comments:
Files Reviewed (2 files)
Reviewed by gpt-5.4-20260305 · 183,174 tokens |
Host apple-app-site-association and assetlinks.json under public/.well-known/ so iOS and Android can verify app ownership for deep linking from app.kilo.ai URLs.
- Narrow Android intent filters: replace broad /organizations pathPrefix with specific pathPattern for /organizations/*/claw only - AASA: add explicit exclude for /organizations/*/* to prevent claiming unsupported org sub-pages - Make useDeepLink reactive: subscribe to deep link events so org-scoped links arriving while the app is already open are handled correctly
Only store pending link when no listener is active (cold start). When a listener handles it directly (warm start), skip storage so consumePendingDeepLink() won't replay it on layout remount.
Call organizations.list to verify the user belongs to the target org before switching context. Shows a toast and stays on the current screen if access is denied or the request fails.
Store all recognised deep link targets (not just org-scoped ones) as pending so the app can navigate there after login completes. Previously, non-org links like /claw were rewritten directly but lost if the user wasn't authenticated and got redirected to login first.
| (link: PendingDeepLink) => { | ||
| const navigate = async () => { | ||
| try { | ||
| if (link.organizationId) { |
Contributor
There was a problem hiding this comment.
WARNING: Personal deep links never reset org context
link.organizationId is the only branch that calls setContext, so /claw and /profile now reuse whatever organization context was already active. If someone is currently scoped to an org and opens https://app.kilo.ai/claw or https://app.kilo.ai/profile, this code navigates to the screen but leaves that org selected, so they never reach the personal page those URLs represent.
jeanduplessis
approved these changes
Apr 2, 2026
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
associatedDomains) and Android App Links (intentFilters) forapp.kilo.ai+native-intent.tsto rewrite incoming web URLs to internal app routes/claw→ instance list,/profile→ profile screen/organizations/[orgId]/claw,/organizations/[orgId]) with automatic context switchingPrerequisites for universal links to work
apple-app-site-associationfile athttps://app.kilo.ai/.well-known/apple-app-site-associationassetlinks.jsonfile athttps://app.kilo.ai/.well-known/assetlinks.jsonDeep link mapping (existing web URLs only)
/claw/organizations/[orgId]/claw/profile/organizations/[orgId]Test plan
npx uri-scheme open "https://app.kilo.ai/claw" --iosopens instance listnpx uri-scheme open "https://app.kilo.ai/profile" --iosopens profileadb shell am start