feat(dev): deep-link E2E navigation, dev session injection, GitHub account seed - #5386
Conversation
…n detail E2E drives navigation by deep link instead of taps. Adds /home, /profile/preferences, and /cloud/sessions/* (agent-chat by id).
dev_session_* params sign the dev build in without the email-code flow. Parser no-ops outside __DEV__. kiloTokenPayload gains an optional deviceSessionId so minted pairs match issueSessionCredentials.
…seed open: mints a device session for a seeded user and opens the app on a named route, signed in. seed: reuses a live donor GitHub authorization and verifies connected via the product query; --json output.
| home: process.env.HOME ?? '', | ||
| path: process.env.PATH ?? '', | ||
| }); | ||
| const args = ['shell', 'am', 'start', '-a', 'android.intent.action.VIEW', '-d', url]; |
There was a problem hiding this comment.
WARNING: Android adb shell will split the deep-link URL on &, so session injection never completes
adb shell concatenates the remaining args and runs them through the device shell. The minted URL always contains & (dev_session_token=…&dev_session_refresh=…&dev_session_expires_in=…), so the shell treats those as job separators. Only dev_session_token reaches am start; parseDevSessionQuery then rejects the incomplete query and signIn is skipped. Quote the -d URI (for example pass a single 'am start … -d "' + url + '"' string to adb shell) so the full credential query survives.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
|
|
||
| const isMain = | ||
| process.argv[1] && path.resolve(process.argv[1]) === path.resolve(import.meta.filename); | ||
| if (isMain) { |
There was a problem hiding this comment.
WARNING: Successful dev:mobile:open never closes the seed pg.Pool, so the CLI hangs
getSeedDb() creates a pg.Pool with allowExitOnIdle left at the default false. The seed runner exists specifically to closeSeedDb() in finally for this reason. This entry path only process.exit(1) on failure, so after minting the session and opening the app the Node process stays alive on the open pool. That breaks using this as an E2E step. Close the pool in a finally (or process.exit(0) after a successful open).
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (20 files)
Fix these issues in Kilo Cloud Reviewed by grok-4.6 · Input: 234.2K · Output: 32.8K · Cached: 883.8K Review guidance: REVIEW.md from base branch |
What
Two dev-only helpers that cut E2E wall time in the delivery workflow, plus the routes they need.
pnpm dev:mobile:open --email <seeded> <route>— mints a device session for a seeded user and opens the app on a named route (home,sessions,session --session-id,settings,profile, or a raw path), signed in, on a booted simulator/emulator. No args prints the route list.pnpm dev:seed app:github-account [email] --json— reuses a live donor GitHub authorization, verifiesconnected: truevia the same query asgithubApps.getUserAuthorization, and prints userId/email/connected/revoked/githubLogin. Failure lines distinguish no-donor / donor-revoked / verification-failed.Why
Workflow session data: E2E verifier rounds average 22 min (p90 52) and burn steps tap-navigating and re-doing email-code login every round; 5+ runs ended BLOCKED on a missing or revoked GitHub test integration.
Review first
apps/mobile/src/lib/dev-session-inject.ts— the__DEV__gate is the first line of the parser; production paths calltakeDevSessionFromUrlbut it no-ops outside dev builds.packages/worker-utils/src/kilo-token.ts— production schema gains optionaldeviceSessionId(additive, backwards compatible) so the minted pair matchesissueSessionCredentials./home,/profile/preferences,/cloud/sessions/*→ agent-chat by id (AASA updated).Checks
Human steps
app:github-accounthas a live donor (unique index on(github_user_id, github_app_type)blocks copying onto a second user).dev:mobile:openneeds a booted device and a seeded user.