fix(desktop): apps page empty due to OmiAppCapability decoding failure#6385
Conversation
The /v1/app-capabilities endpoint returns objects without a `description` field, but OmiAppCapability had it as required. Since getAppCapabilities() runs concurrently with getAppsV2() in AppProvider.fetchApps(), the decode failure causes the entire try-await to fail, showing "No apps found". Also reduces getAppsV2 default limit from 100 to 50 to match backend max. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Greptile SummaryThis PR fixes a production bug where the Apps page showed "No apps found" because Confidence Score: 5/5Safe to merge — targeted fix for a confirmed production crash with no regressions introduced. Single-file change with a correct, well-scoped decoding fix. The only finding is a P2 style note about a redundant CodingKeys enum with no behavioral impact. Encoding conformance is unaffected because the explicit CodingKeys enum causes Swift to synthesize encode(to:) correctly. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant AP as AppProvider.fetchApps()
participant AC as APIClient
participant BE as Backend
AP->>+AC: async let getAppsV2()
AP->>+AC: async let getAppCategories()
AP->>+AC: async let getAppCapabilities()
AC->>BE: GET /v2/apps
AC->>BE: GET /v1/app-categories
AC->>BE: GET /v1/app-capabilities
BE-->>AC: apps JSON
BE-->>AC: categories JSON
BE-->>AC: capabilities JSON (missing description field)
Note over AC: Before fix: decode throws → entire try await fails
Note over AC: After fix: decodeIfPresent defaults to empty string → success
AC-->>-AP: OmiAppsV2Response
AC-->>-AP: [OmiAppCategory]
AC-->>-AP: [OmiAppCapability]
AP->>AP: Update UI state
Reviews (1): Last reviewed commit: "Revert getAppsV2 limit to 100 — backend ..." | Re-trigger Greptile |
| enum CodingKeys: String, CodingKey { | ||
| case id, title, description | ||
| } | ||
| } |
There was a problem hiding this comment.
All three case names (id, title, description) exactly match their property names, so Swift's synthesized CodingKeys would be identical. This can be removed with no behavioral change.
| enum CodingKeys: String, CodingKey { | |
| case id, title, description | |
| } | |
| } | |
| } |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Test Results — PR #6385 verified on Mac Mini M4Build
Results
Comparison: Omi Beta v0.11.241 (WITHOUT this fix)Apps page shows "No apps found" because Logs from pr6385 test bundle (WITH this fix)Zero Screenshots |
|
lgtm |
v0.11.242 Live Verification — PASSOmi Beta updated to v0.11.242 via Sparkle on Mac Mini M4. Results
Logs (v0.11.242 session)Zero Screenshots (Omi Beta v0.11.242)Dashboard — title bar shows v0.11.242, Tasks + Goals working: Minor: new
|





Summary
/v1/app-capabilitiesreturns objects without adescriptionfield, butOmiAppCapabilitystruct haddescription: Stringas required. SincegetAppCapabilities()runs concurrently withgetAppsV2()inAppProvider.fetchApps(), the decode failure causes the entiretry awaitto fail, showing "No apps found".init(from:)decoder toOmiAppCapabilityusingdecodeIfPresentfor bothtitleanddescription, defaulting to empty string.getAppsV2default limit from 100 to 50 to match backend max.v0.11.241 still has this bug — Apps page shows "No apps found" in production. This fix was verified locally with a test bundle.
Evidence
Decoding error - key 'description' not foundin logsTest plan
🤖 Generated with Claude Code