feat(console): drill into a k8s fleet's roster instead of declining - #151
Merged
Conversation
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
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
selectFleetshowing an info toast and refusing to switch.source.ts:listDeployments/runtimeContextgain an optionalfleetparam, forwarded to the Tauri bridge (feat(src-tauri): forward a fleet arg through the roster/identity bridge commands #150) alongsidecluster.main.ts:selectFleetbranches onfleet.runtimeinstead of declining for k8s —activeClusterbecomes an unused""sentinel for a k8s fleet (reads now go byfleetname, 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 showscontext/namespaceinstead of a cluster string.tick()now always passesactiveFleetasfleettolistDeployments— 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 ownfilterByMembers(same result, not a behavior change).types.ts:RuntimeContext.clusterisstring | nullnow (nullfor a k8s-runtime fleet, withcontext/namespaceset instead);FleetBindinggained optionalcontext/namespacefields alongside the existingprofile/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 callsscaleDeploymentwithout afleetarg, so it'll hit the ecs-onlydeploy_scalepath 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/serviceNamealready have k8s-shaped-data coverage from the delete-fleet/member-name-preview work)npm run typecheck— cleannpm run build— cleanCloses #146.
🤖 Generated with Claude Code