Skip to content

K8s fleet roster/observe UI — console can't drill into an existing k8s fleet #146

Description

@brettchien

Problem

Clicking a k8s-runtime fleet in the Fleets panel doesn't drill into its member roster. selectFleet (console/src/main.ts:448-463) explicitly declines and shows an info toast — this is a known, intentional stopgap (see PR #145's description), not a regression. Before #145 (2026-09-06) k8s fleets weren't even visible in the Fleets list, so this is newly reachable but was never wired.

Root cause (confirmed by reading current main, 2026-09-07)

The entire roster/observe read path is ECS-only, several layers deep:

  • oab-mcp's target() (crates/oab-mcp/src/lib.rs:449-459) hard-errors for a k8s-runtime fleet: "fleet {name} is a k8s-runtime fleet; this tool only supports ecs fleets".
  • t_runtime_context (crates/oab-mcp/src/lib.rs:850) unconditionally calls scp::observe_identity(&aws) (AWS/STS) — never branches to the already-existing observe_k8s_identity (crates/studio-cp/src/lib.rs:281, built in Phase 1 / studio#63 slice 3e) even though RuntimeContext's shape is already unified across both drivers.
  • There is no k8s-side roster tool at all — deploy_list/t_list has no equivalent of "list Deployments in this namespace, mapped to the console's Deployment shape" the way ECS's roster_over_mcp (src-tauri/src/lib.rs:261) does.
  • console/src/main.ts's tick(), and source.ts's listDeployments/runtimeContext, are cluster-keyed throughout — no context/namespace equivalent path exists on the console side either.

ProvisionDriver (crates/oabctl/src/driver.rs) only has apply/scale/delete — no list/observe method on the trait, so there's no existing seam to hang a k8s roster read off of.

Scope (rough slices, same shape as studio#63/#104's phased delivery)

  1. studio-cp: a k8s roster read — list Deployments in a (context, namespace), scoped to a fleet's members (mirroring crates/oabctl/src/k8s_driver.rs's existing kube client setup), mapped to a shape the console can render alongside ECS's Deployment type (replicas/ready vs ECS's desired/running count, image, etc.).
  2. oab-mcp: fix t_runtime_context to dispatch on binding.runtime (observe_k8s_identity for k8s, existing path for ecs); add the new roster tool from (1); relax target()'s hard error only for the calls that now support both runtimes (identity/roster), not for the ones that genuinely stay ecs-only (apply/scale/delete stay behind the existing k8s dispatch added in studio#104/feat(studio-cp,oabctl): k8s deploy_provision dispatch (studio#104, resumed after #111) #114 instead, not this trait).
  3. src-tauri: extend deploy_list/runtime_context bridge commands (or add k8s-specific ones) to pass context+namespace instead of cluster when the target fleet is k8s. New bridge commands need the usual "no local signal, bundle-macos CI only" caveat ([[studio-tauri-bridge-layer-gotcha]]).
  4. console: main.ts's selectFleet/tick branch on fleet.runtime instead of declining; source.ts interface + Deployment/RuntimeContext types grow the k8s-shaped fields; fixtures/tests updated.

Not in scope

Scaling/starting/stopping k8s deployments from the console — that's a separate action surface (ProvisionDriver::scale/delete already exist for k8s via studio#104/#114's provider dispatch on the create path; wiring the existing-fleet scale/delete buttons to it is a follow-on, not blocking the read-only roster view this issue is about).

🤖 Filed by Orca

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions