fix(src-tauri): register missing Tauri command bridges for k8s onboarding tools (studio#104) - #117
Merged
Merged
Conversation
…ding tools (studio#104)
Real bug, caught by Brett actually running the app: the console called
invoke("list_namespaces", ...) etc., and oab-mcp had the underlying MCP
tools, but nothing bridged them — Tauri requires every command explicitly
registered via #[tauri::command] + generate_handler![], and this layer was
never built for list_aws_profiles/list_k8s_contexts/list_namespaces/
list_service_accounts/k8s_fleet_config_write. Symptom: "Command
list_namespaces not found" in the running app, exactly what showed up.
Adds the five missing bridges, mirroring the existing fleet_config/
fleet_config_write pattern exactly (lock the core client, call_tool, log +
propagate errors). Also extends deploy_provision's bridge with
provider/context/expected_principal so the k8s dispatch path (already wired
server-side in oab-mcp) is actually reachable once console's "k8s not
available yet" block is lifted — not reachable yet today since that block
is still in place, but there's no point fixing the tool-listing bridges
without also completing this one, since it's the same class of gap.
Verification note: this crate (src-tauri, package studio-desktop) is NOT a
member of the root Cargo workspace — it's Tauri's own project, building the
macOS desktop shell specifically (CI's bundle-macos job, not build-test).
Confirmed it can't be locally compiled in this environment at all (missing
system glib-2.0/GTK dev packages this sandbox doesn't have, unrelated to
the aws-sdk-ec2 OOM constraint hit everywhere else this session) — every
new function here mechanically mirrors an already-working sibling
(fleet_config_write's exact shape), hand-verified against it line by line.
CI's bundle-macos job, which already builds this exact crate on a real
macOS runner, is the actual gate.
Ref: studio#104.
brettchien
added a commit
that referenced
this pull request
Aug 28, 2026
…io#104) (#118) Removes the client-side "Kubernetes provisioning isn't available yet" block in deploy.ts's identity step — the backend dispatch (deploy_ provision's provider="k8s" path) and Tauri bridges have been reachable since #117, this just connects the wizard's submit handler to them. deployForm's submit now branches on provider: k8s calls deploy_provision with provider/context/expected_principal (built from the selected namespace + service account, in the system:serviceaccount:<ns>:<name> form provision_from_library_k8s expects), then persists the new fleet to fleets-k8s.toml via a new read/write pair — k8s_fleet_config (MCP tool + Tauri bridge, mirroring fleet_config) plus the existing k8s_fleet_config_ write, since appending a block requires reading the current file first and no such read tool existed yet. Rust changes are hand-verified line by line, not locally compiled — this environment reliably OOM-kills on aws-sdk-ec2 regardless of -j/codegen settings (a known, pre-existing limitation, not new to this change); TS side is verified for real (typecheck + 106/106 tests + build all pass).
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
Real bug, caught by Brett running the actual app: "New fleet" wizard with provider=Kubernetes showed
namespace list unavailable: Command list_namespaces not found.Root cause: Tauri requires every frontend-callable command explicitly registered (
#[tauri::command]+generate_handler![...]) — a separate bridge layer between the console'sinvoke()calls and theoab-mcpsidecar's MCP tools. #104/#111's work added 5 new MCP tools (list_aws_profiles,list_k8s_contexts,list_namespaces,list_service_accounts,k8s_fleet_config_write) and the console code that calls them, but never added this bridge layer. Verification earlier in this effort checked the MCP tool layer and the frontend call sites, but missed this middle layer entirely — there was no way to catch it without actually running the desktop app, which this environment can't do.Fix
Adds the 5 missing bridge commands, each mechanically mirroring the existing
fleet_config/fleet_config_writepattern (lock the sidecar client,call_tool, log + propagate errors on failure). Also extendsdeploy_provision's bridge withprovider/context/expected_principalso the k8s dispatch path (already wired server-side) is reachable once console's "Kubernetes provisioning isn't available yet" block is eventually lifted — not reachable today (that block is still in place), included here since it's the same class of gap and there's no reason to leave it half-fixed.Verification
src-tauri(packagestudio-desktop) is not a member of the root Cargo workspace — it's Tauri's own project, building the macOS desktop shell (CI'sbundle-macosjob, distinct frombuild-test). Confirmed this environment can't compile it at all — missing systemglib-2.0/GTK dev packages (a different, unrelated blocker from theaws-sdk-ec2OOM hit everywhere else in this effort). Every new function here is a mechanical mirror of an already-working sibling (fleet_config_write), hand-verified line by line against it. CI'sbundle-macosjob already builds this exact crate on a real macOS runner — that's the actual gate, more so than usual given the total lack of local signal here.Ref #104.