Delay onboarding web search until after file access#5738
Conversation
Greptile SummaryThis PR reorders the desktop onboarding flow so that web research (previously STEP 2) is deferred to STEP 5 — after file scanning, task-candidate selection, and a background Gmail read attempt — giving the AI richer context before it searches the web. It also parameterises Key changes:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant U as User
participant O as Omi (LLM)
participant FS as File System
participant Gmail as Gmail (background)
participant Web as Web Search
O->>U: STEP 1 — Greet + confirm name
O->>U: STEP 1.5 — Language preference
O->>U: STEP 2 — Monthly goal
U-->>O: Goal selected
O->>FS: STEP 3 — scan_files()
FS-->>O: Files, tools, frameworks found
O->>Gmail: Background Gmail read attempt
O->>U: STEP 4 — File discoveries + task candidates
U-->>O: Task selected
Note over O,Web: STEP 5 — Web research only AFTER file scan + Gmail attempt
O->>Web: web_search(user_name + email_domain)
Web-->>O: Company / role info
O->>Web: web_search(company + product)
Web-->>O: Project details
O->>U: STEP 6 — Privacy note + permissions
O->>U: STEP 7 — complete_onboarding()
O->>U: STEP 8 — Deep dive
|
| XCTAssertLessThan(step2Range.lowerBound, step3Range.lowerBound) | ||
| XCTAssertLessThan(step3Range.lowerBound, step4Range.lowerBound) | ||
| XCTAssertLessThan(step4Range.lowerBound, step5Range.lowerBound) | ||
| XCTAssertGreaterThan(gateRange.lowerBound, step5Range.lowerBound) |
There was a problem hiding this comment.
Gate assertion is trivially true relative to its purpose
XCTAssertGreaterThan(gateRange.lowerBound, step5Range.lowerBound) verifies that the gate sentence appears after the STEP 5 heading. While correct, this is trivially guaranteed by the structure of the prompt (the sentence lives inside STEP 5).
The stronger guarantee the test name promises — that web research is deferred until after file scan and task candidates — is already implied transitively through the chained XCTAssertLessThan calls. Consider adding an explicit assertion to document the intent more clearly:
// Gate must also appear after STEP 4 (file discoveries), making the constraint explicit.
XCTAssertGreaterThan(gateRange.lowerBound, step4Range.lowerBound)## Summary - move onboarding web research until after file scan, task follow-up, and the background Gmail read attempt - add a Swift package test that locks the onboarding prompt ordering - allow custom desktop dev app names to carry matching bundle identifiers and document that rule in AGENTS/CLAUDE ## Verification - `cd desktop/Desktop && swift test` - `cd desktop/Desktop && swift build` - built and launched `/Applications/search.app` as `com.omi.search` - runtime onboarding check in the built bundle confirmed file scan completed first, Gmail started next, and only then the post-scan "learning about you" phase appeared
Summary
Verification
cd desktop/Desktop && swift testcd desktop/Desktop && swift build/Applications/search.appascom.omi.search