Skip to content

fix(frontend): Remove fetch to non-existent plugin-stats.json breaking app store#7236

Open
dyingg wants to merge 1 commit into
BasedHardware:mainfrom
dyingg:fix/marketplace-frontend-remove-dead-stats
Open

fix(frontend): Remove fetch to non-existent plugin-stats.json breaking app store#7236
dyingg wants to merge 1 commit into
BasedHardware:mainfrom
dyingg:fix/marketplace-frontend-remove-dead-stats

Conversation

@dyingg
Copy link
Copy Markdown

@dyingg dyingg commented May 11, 2026

Summary

The marketplace was fetching community-plugin-stats.json from raw.githubusercontent.com/BasedHardware/omi/refs/heads/main/community-plugin-stats.json on 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.

Screenshot 2026-05-12 at 3 26 31 AM

This PR removes the dead fetch from the three call sites and stops passing the resulting stat prop into the card components (which never read it anyway).

  • apps/[id]/page.tsx — drops the fetch on every plugin detail render
  • apps/category/[category]/page.tsx — drops it from the parallel fetch in getCategoryData
  • apps/popular/page.tsx — drops it from the parallel fetch in getPluginsData

The optional stat?: PluginStat field on CompactPluginCard / FeaturedPluginCard / PluginCard is 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 on productivity-and-organization
  • /apps/[id] renders — hero + "More …Apps" related-apps grid render (only console error is an unrelated 3rd-party eapps.Platform widget present on every page)
  • pnpm exec tsc --noEmit clean for the three modified files (pre-existing errors elsewhere in the repo are unrelated)

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.
@dyingg dyingg changed the title fix(frontend): Remove fetch to non-existent plugin-stats.json breaking marketplace fix(frontend): Remove fetch to non-existent plugin-stats.json breaking app store May 11, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 11, 2026

Greptile Summary

This PR removes three identical fetches to a GitHub raw URL (community-plugin-stats.json) that was deleted from the repo in April 2026. The 404 response caused statsResponse.json() to throw during SSR, crashing all three marketplace pages with a white screen.

  • apps/[id]/page.tsx — drops the sequential stats fetch and the stat prop passed to the related-apps CompactPluginCard grid.
  • apps/category/[category]/page.tsx — removes the stats leg of the Promise.all in getCategoryData and cleans up the stat prop on all three card render sites.
  • apps/popular/page.tsx — removes the stats leg of the Promise.all in getPluginsData and the stat prop on FeaturedPluginCard; the optional stat? field on the card component interfaces is intentionally left in place for future use.

Confidence Score: 5/5

Safe 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

Filename Overview
web/frontend/src/app/apps/[id]/page.tsx Removes the 404-causing fetch to the deleted community-plugin-stats.json and stops passing the unused stat prop to CompactPluginCard in the related-apps grid.
web/frontend/src/app/apps/category/[category]/page.tsx Removes the parallel stats fetch from getCategoryData and the resulting stat prop from all three card rendering sites (FeaturedPluginCard, CompactPluginCard x2).
web/frontend/src/app/apps/popular/page.tsx Removes the parallel stats fetch from getPluginsData and the stat prop from FeaturedPluginCard; the remaining approved-apps fetch and rendering logic are unchanged.

Sequence Diagram

sequenceDiagram
    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
Loading

Reviews (1): Last reviewed commit: "Refactor: Remove unused PluginStat impor..." | Re-trigger Greptile

@dyingg
Copy link
Copy Markdown
Author

dyingg commented May 11, 2026

For proper cadence, I have also filed an issue:
Fixes #7237

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant