feat(src-tauri): forward a fleet arg through the roster/identity bridge commands - #150
Merged
Merged
Conversation
…ge commands studio#146 slice 3 of 4. `deploy_list` and `runtime_context` (the two Tauri bridge commands backing the console's roster/identity reads) gain an optional `fleet: Option<String>` parameter, forwarded to the underlying `deploy_list`/`deploy_get`/`runtime_context` MCP tool calls alongside `cluster`. This is what a k8s-runtime fleet's roster/identity needs to reach oab-mcp's new k8s dispatch (studio#146 slice 2, PR #149) — `cluster` alone has no k8s equivalent to resolve against. No Rust compile-time dependency on slice 2 — the MCP call is JSON/string dispatched, not typed, so this only needs the tool arg *contract* (stable, defined in #149) not its merge. `fleet` is a new trailing optional parameter on two already-registered `#[tauri::command]`s, so no `generate_handler!` change is needed, and existing callers that omit it keep their exact current (cluster-only) behavior — nothing in the console passes `fleet` yet, that's slice 4. Per studio-tauri-bridge-layer-gotcha: this layer has no local build signal in this sandbox (`studio-desktop` isn't a workspace member, needs macOS/GTK system libs this environment doesn't have) — reviewed by hand against the surrounding bridge functions' existing pattern (the `params["provider"] = json!(p)` idiom `deploy_provision_agent`'s bridge already uses), only `bundle-macos` CI verifies it actually builds. 🤖 Generated with Claude Code
4 tasks
brettchien
added a commit
that referenced
this pull request
Sep 7, 2026
…151) 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
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 3 of 4 (k8s fleet roster/observe UI).
deploy_listandruntime_context(the Tauri bridge commands backing the console's roster/identity reads,src-tauri/src/lib.rs) gain an optionalfleet: Option<String>parameter, forwarded to the underlyingdeploy_list/deploy_get/runtime_contextMCP tool calls alongsidecluster.This is the plumbing a k8s-runtime fleet's roster/identity needs to reach oab-mcp's k8s dispatch added in slice 2 (#149) —
clusteralone has no k8s equivalent (a k8s fleet resolves bycontext+namespace, carried on the fleet binding, not a bare cluster string).No Rust compile-time dependency on #149 — the bridge calls the MCP tool by string name with a JSON args object (
client.call_tool("deploy_list", json!({...}))), not a typed Rust function, so this only needs the tool's arg contract (stable, defined in #149) rather than #149 actually being merged. Opened directly offmain, not stacked on #149's branch.fleetis a new trailing optional parameter on two already-registered#[tauri::command]s — nogenerate_handler!change needed. Existing callers that omit it (the whole console, today) get their exact current cluster-only behavior; nothing consumes the new parameter yet — that's slice 4 (console/src/main.ts+source.ts).Test plan
studio-desktop/src-tauriisn't a workspace member and needs macOS/GTK system libs this sandbox doesn't have — per [[studio-tauri-bridge-layer-gotcha]]). Reviewed by hand against the surrounding bridge functions' existing pattern (theparams["provider"] = json!(p)idiomdeploy_provision_agent's bridge already uses for the same "conditionally add a JSON key" shape). Only thebundle-macosCI job (on a real macOS runner) verifies this actually compiles.git grep/reading thatdeploy_list/runtime_contextare the only two Tauri commands the console's roster/identity path calls (deploy_gethas no separate bridge command —roster_over_mcpcalls the MCP tooldeploy_getdirectly per service, not through its own Tauri command), so no other bridge function needed this parameter.🤖 Generated with Claude Code