fix: prevent plugins page crash when tags or features fields are missing#3398
fix: prevent plugins page crash when tags or features fields are missing#3398MuhammadKhalilzadeh merged 2 commits intodevelopfrom
Conversation
Plugins from the marketplace JSON (e.g. dataset-bulk-upload, model-lifecycle) may not include tags or features fields. The backend searchPlugins method called .some() directly on p.tags without a null-check, causing it to throw when tags was undefined and resulting in a blank plugins page. ## Changes - Add (p.tags || []) fallback in pluginService.ts searchPlugins filter - Make tags and features optional in the frontend Plugin type to match actual marketplace data shape
|
CC: @gorkem-bwl Bug Fix Report: Plugins Page Crash (Missing Tags/Features)Branch: ProblemThe Plugins page rendered a blank screen (white page crash) when running in Docker. The page worked fine in local development but consistently crashed in the production Docker environment. Root CauseThe crash was caused by unguarded access to the The specific crash site was in // BEFORE (crashes when plugin.features is undefined)
{plugin.features.slice(0, 2).map((feature, index) => ( ... ))}Calling The reason it worked locally but not in Docker: the local development environment likely had cached plugin data or a different Fixes Applied1. Backend normalization (
|
| Layer | File | Purpose |
|---|---|---|
| Backend API | pluginService.ts |
Normalize data at the source |
| Frontend hook | usePlugins.ts |
Normalize before state storage |
| Frontend component | PluginCard/index.tsx |
Guard at render site |
This ensures the bug cannot recur even if one layer is bypassed (e.g., a different API consumer, a code path that skips the hook, or a direct prop pass).
Verification
Both TypeScript compilation checks pass cleanly:
- Backend:
cd Servers && npx tsc --noEmit- no errors - Frontend:
cd Clients && npx tsc --noEmit- no errors
|
@gorkem-bwl
|
|
Thanks! |

Summary
dataset-bulk-upload,model-lifecycle) may not includetagsorfeaturesfieldssearchPluginsmethod called.some()directly onp.tagswithout a null-check, throwingTypeErrorwhentagswasundefinedChanges
(p.tags || [])fallback inpluginService.tssearch filtertagsandfeaturesoptional in the frontendPlugintype to match actual marketplace data shapeTest plan
tagsfield (e.g.dataset-bulk-upload) appear correctlyfeaturesis missing