fix(ui): register StatusResponse for native-image reflection (#1441)

The /_floci/ui/status endpoint returned HTTP 500 under the native image
because Jackson could not serialize UiController.StatusResponse (no
reflection metadata was registered). The interstitial page served by
GET /_floci/ui polls /status and only redirects to the floci-ui sidecar
once it reads {ready:true,url:...}, so a 500 there left the UI stuck on
the loading page even though the floci-ui container was up and healthy.

Register the record for reflection, matching the existing pattern used
by other controller response types (e.g. AwsErrorResponse).
This commit is contained in:
Hector Ventura authored and GitHub committed 2026-06-19 08:22:37 -05:00
1 parent 3860fafdfb
commit aaa1faa7fe
1 file changed
+2
@@ -3,6 +3,7 @@ package io.github.hectorvent.floci.lifecycle;
import io.github.hectorvent.floci.services.floci.ui.FlociUiManager;
import io.github.hectorvent.floci.services.floci.ui.FlociUiManager.UiStatus;
import io.github.hectorvent.floci.services.floci.ui.UiPages;
import io.quarkus.runtime.annotations.RegisterForReflection;
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.HeaderParam;
@@ -40,6 +41,7 @@ public class UiController {
return Response.ok(uiPages.startingHtml()).build();
}
@RegisterForReflection
public record StatusResponse(boolean ready, String url, String error) {}
@GET