Skip to content

feat(console): drill into a k8s fleet's roster instead of declining - #151

Merged
brettchien merged 1 commit into
mainfrom
orca/console-k8s-fleet-drilldown
Sep 7, 2026
Merged

feat(console): drill into a k8s fleet's roster instead of declining#151
brettchien merged 1 commit into
mainfrom
orca/console-k8s-fleet-drilldown

Conversation

@brettchien

Copy link
Copy Markdown
Contributor

Summary

studio#146 slice 4 of 4 — the final slice, and the console-side fix for the originally-reported bug: clicking a k8s-runtime fleet in the Fleets panel now actually opens Fleet detail and loads its roster, instead of selectFleet showing an info toast and refusing to switch.

  • source.ts: listDeployments/runtimeContext gain an optional fleet param, forwarded to the Tauri bridge (feat(src-tauri): forward a fleet arg through the roster/identity bridge commands #150) alongside cluster.
  • main.ts: selectFleet branches on fleet.runtime instead of declining for k8s — activeCluster becomes an unused "" sentinel for a k8s fleet (reads now go by fleet name, which oab-mcp resolves to the bound context/namespace, feat(studio-cp,oab-mcp): k8s roster observe + runtime_context dispatch #149), and the header label shows context/namespace instead of a cluster string. tick() now always passes activeFleet as fleet to listDeployments — a no-op for the no-fleet-selected case, and for an ecs fleet this only makes oab-mcp's existing member-side filtering redundant with the console's own filterByMembers (same result, not a behavior change).
  • types.ts: RuntimeContext.cluster is string | null now (null for a k8s-runtime fleet, with context/namespace set instead); FleetBinding gained optional context/namespace fields alongside the existing profile/region. runtimeContext() has no console call site yet (true before this change too) — this is type-contract parity with oab-mcp's tool, not new UI surface.

Not in scope (matches the issue body): start/stop (scale) for a k8s roster row isn't wired — scale() still calls scaleDeployment without a fleet arg, so it'll hit the ecs-only deploy_scale path and fail with a clear error toast (not silently) if attempted against a k8s deployment. That's a separate action-surface follow-up, not blocking this read-only roster view.

Test plan

  • npm test — 107/107 passing (no new tests: this is control-flow wiring over already-tested pure functions — filterByMembers/serviceName already have k8s-shaped-data coverage from the delete-fleet/member-name-preview work)
  • npm run typecheck — clean
  • npm run build — clean
  • Manual: no live k8s cluster in this sandbox to exercise end-to-end — same caveat feat(studio-cp,oab-mcp): k8s roster observe + runtime_context dispatch #149 already carries

Closes #146.

🤖 Generated with Claude Code

studio#146 slice 4 of 4 (final slice) — the console-side fix for the
originally-reported bug: clicking a k8s-runtime fleet in the Fleets panel
now actually opens Fleet detail and loads its roster, instead of
`selectFleet` showing an info toast and refusing to switch.

- `source.ts`: `listDeployments`/`runtimeContext` gain an optional `fleet`
  param, forwarded to the Tauri bridge (#150) alongside `cluster`.
- `main.ts`: `selectFleet` branches on `fleet.runtime` instead of
  declining for k8s — `activeCluster` becomes an unused "" sentinel for a
  k8s fleet (reads now go by `fleet` name, which oab-mcp resolves to the
  bound context/namespace, #149), and the header label shows
  `context/namespace` instead of a cluster. `tick()` now always passes
  `activeFleet` as `fleet` to `listDeployments` (a no-op for the
  no-fleet-selected case, and for an ecs fleet this only makes oab-mcp's
  existing member-side filtering redundant with the console's own
  `filterByMembers` — same result, not a behavior change).
- `types.ts`: `RuntimeContext.cluster` is `string | null` now (`null` for
  a k8s-runtime fleet, with `context`/`namespace` set instead); `FleetBinding`
  gained optional `context`/`namespace` fields alongside the existing
  `profile`/`region`. `runtimeContext()` itself has no console call site
  yet (true before this change too) — this is type-contract parity with
  oab-mcp's tool, not new UI.

**Not in scope** (matches the issue body): start/stop (scale) for a k8s
roster row isn't wired — `scale()` still calls `scaleDeployment` without a
`fleet` arg, so it'll hit the ecs-only `deploy_scale` path and fail with a
clear error toast (not silently) if attempted against a k8s deployment.
That's a separate action-surface follow-up, not blocking this read-only
roster view.

## Test plan

- `npm test`: 107/107 passing (no new tests — this is control-flow
  wiring over already-tested pure functions; `filterByMembers`/
  `serviceName` already have k8s-shaped-data coverage from the delete-fleet/
  member-name-preview work).
- `npm run typecheck`: clean.
- `npm run build`: clean.
- Manual: no live k8s cluster in this sandbox to exercise end-to-end —
  same caveat #149 already carries.

🤖 Generated with Claude Code
@brettchien
brettchien merged commit e0369f3 into main Sep 7, 2026
2 checks passed
@brettchien
brettchien deleted the orca/console-k8s-fleet-drilldown branch September 7, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant