Commit Graph
2 Commits
Author SHA1 Message Date
Hector Ventura 258994c1b9 feat(ui): serve the Console Contract v2 manifest and pass its URL to the console (#6711)
* feat(ui): serve the Console Contract v2 manifest and pass its URL to the console

/_floci/info and /_localstack/info now carry manifest_version, console_contract, cloud, endpoint, health_url, tls, services, defaults and ui, keeping their existing keys. FlociUiManager injects FLOCI_INFO_URL so the console can read it.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* test(ui): drop the DisplayName from the manifest test

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-26 23:42:00 -04:00
Hector Ventura a5ebda01fb feat(ui): publish a console contract so any web console can be the sidecar (#3641)
Floci could run exactly one web console, the image it ships. This publishes the contract
between Floci and a console so any image can take that slot, and an operator gets there by
setting one image name rather than by configuring seven fields.

Three things make a console a Floci console: it listens on the port in PORT, it serves
GET /api/health, and it talks to Floci at AWS_ENDPOINT_URL. Everything else is detail the
contract spells out, including the AWS baseline every launched container already receives,
so a console built on any AWS SDK is configured by that SDK's ordinary endpoint and
credential discovery.

Floci learns a console's shape from three sources, in order. The image's own
io.floci.console.* labels come first, so a console describes itself and needs no operator
input at all. A built-in profile covers the consoles Floci already knows. The contract
defaults (/api/health, port 4500, status: ok) cover the rest. Configuration overrides all
three, for a console that describes itself neither way.

That ladder is why the new config keys ship commented out in application.yml. They exist for
the console that fits none of the three sources, and setting one silently disables the
discovery that would otherwise just work. Every accessor is Optional or OptionalInt, so
nothing is required and the test configuration needs no entry.

A malformed label is ignored rather than fatal: a console that declares port="banana" starts
on the default instead of failing the emulator, and the reason is logged.

Docs: docs/ui/console-contract.md is the contract itself, written for console authors, and
docs/ui/index.md is the operator's page. Both are in the mkdocs nav.

Tests: 608 lines. ConsoleProfileResolverTest covers the resolution ladder including the
precedence between its three sources; ContainerLifecycleManagerImageLabelsTest covers reading
labels off an image; FlociUiManagerTest grows to cover the manager against the contract.
Neutralising the label arm fails 5 of the 13 resolver tests, so the ladder is genuinely
exercised rather than the tests only asserting defaults.
2026-09-14 21:53:59 -05:00