fix(frontend): Remove fetch to non-existent plugin-stats.json breaking app store#7236
fix(frontend): Remove fetch to non-existent plugin-stats.json breaking app store#7236dyingg wants to merge 1 commit into
Conversation
This commit simplifies the PluginDetailView, CategoryPage, and PopularPage components by removing the unused PluginStat type and the associated fetching of community plugin stats. The changes streamline the code and improve performance by eliminating unnecessary API calls and data processing.
Greptile SummaryThis PR removes three identical fetches to a GitHub raw URL (
Confidence Score: 5/5Safe to merge — the change is a pure removal of a dead external fetch that was actively crashing three marketplace pages. All three pages were fetching a file that no longer exists, and the uncaught JSON parse error on the 404 response was taking down the entire SSR render. This PR removes those fetches and the now-unnecessary prop threading; no new logic is introduced, and the optional stat? fields on card interfaces are preserved without breaking any call sites. The remaining fetches and rendering paths are unchanged from before. No files require special attention — all three changes are symmetrical deletions of the same broken pattern. Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser
participant Next_SSR as Next.js SSR
participant OmiAPI as Omi API
participant GitHub as raw.githubusercontent.com
Note over Next_SSR, GitHub: BEFORE (broken)
Browser->>Next_SSR: GET /apps/popular
Next_SSR->>OmiAPI: GET /v1/approved-apps
Next_SSR->>GitHub: GET community-plugin-stats.json
GitHub-->>Next_SSR: 404 Not Found
Next_SSR-->>Browser: ❌ White screen (json() throws)
Note over Next_SSR, GitHub: AFTER (this PR)
Browser->>Next_SSR: GET /apps/popular
Next_SSR->>OmiAPI: GET /v1/approved-apps
OmiAPI-->>Next_SSR: plugins[]
Next_SSR-->>Browser: ✅ Rendered page
Reviews (1): Last reviewed commit: "Refactor: Remove unused PluginStat impor..." | Re-trigger Greptile |
|
For proper cadence, I have also filed an issue: |
Summary
The marketplace was fetching
community-plugin-stats.jsonfromraw.githubusercontent.com/BasedHardware/omi/refs/heads/main/community-plugin-stats.jsonon three pages — but that file was deleted from the repo on 2026-04-20 (commit da28b08, "Delete community-plugin-stats.json — deprecated since we moved to https://docs.omi.me/doc/developer/apps/Introduction"). The fetch has been 404'ing ever since, and(await statsResponse.json()) as PluginStat[]then throws on the unparseable response, taking the whole RSC render down — users land on a white screen.This PR removes the dead fetch from the three call sites and stops passing the resulting
statprop into the card components (which never read it anyway).apps/[id]/page.tsx— drops the fetch on every plugin detail renderapps/category/[category]/page.tsx— drops it from the parallel fetch ingetCategoryDataapps/popular/page.tsx— drops it from the parallel fetch ingetPluginsDataThe optional
stat?: PluginStatfield onCompactPluginCard/FeaturedPluginCard/PluginCardis left in place — to reduce the blast radius of this fix allowing for immediate fix of the marketplace website, and further discussion on the future plan of stats. Note these stats were not being displayed and dead code anyways.Test plan
/apps/category/[category]renders — new/recent + all-apps grids render onproductivity-and-organization/apps/[id]renders — hero + "More …Apps" related-apps grid render (only console error is an unrelated 3rd-partyeapps.Platformwidget present on every page)pnpm exec tsc --noEmitclean for the three modified files (pre-existing errors elsewhere in the repo are unrelated)