fix: white screen crash for custom Docker tags

Description

Problem

Configuration page crashed when users configured Docker images with custom tags not in the predefined dockerImagesConfig list (PostgreSQL versions 9.6-17 with specific tags like 0.5.3, 0.5.2, 0.5.1).

Root cause: formatConfig() only extracted dockerTag for SE images, causing currentDockerImage to be undefined for Generic Postgres images.

Solution

  1. Fixed dockerTag extraction - Now extracts tags for all images with :
  2. Enhanced image handling - Auto-adds custom images to predefined list
  3. Added safety checks - Prevents crashes on undefined objects
  4. Performance optimization - Added useMemo to avoid array recreation

Result

Image Before After
postgresai/extended-postgres:16-0.5.4 💥 Crash Works
postgresai/extended-postgres:18-0.6.0 💥 Crash Works
Predefined tags (16-0.5.3) Works Works

🎯 Key benefit: Users can now specify any Docker image version in config.yaml and it will automatically appear in the UI dropdown without requiring frontend updates.

Related issue

bug: white screen when user uses postgres image... (#633)

Examples

Checklist

  • MR description has been reviewed
  • MR changes are functionally tested
  • MR does NOT have API/CLI changes OR there are API/CLI changes and they have been reviewed & DOCS ARE ADJUSTED (reference doc, etc)
  • MR does NOT have UI changes OR there are UI changes and they have been reviewed & UX IS REVIEWED

Merge request reports

Loading