tftsr-devops_investigation/src-tauri
Shaun Arman a2cff014e9
Some checks failed
Test / rust-tests (pull_request) Successful in 14m31s
PR Review Automation / review (pull_request) Has been cancelled
Test / frontend-typecheck (pull_request) Successful in 1m35s
Test / frontend-tests (pull_request) Successful in 1m40s
Test / rust-fmt-check (pull_request) Successful in 11m1s
Test / rust-clippy (pull_request) Successful in 12m39s
fix(kube): use current-context for kubectl auth; fix SelectValue label display
## kubectl credentials still failing after --context fix

Root cause: both extract_context() (kube.rs) and upload_kubeconfig() (shell.rs)
ignored the kubeconfig's current-context field and always picked contexts[0] from
the contexts array. If a kubeconfig has multiple contexts and current-context
points to entry N>0, we silently used the wrong context — one that may have empty
or expired credentials — causing the 401 "the server has asked for the client to
provide credentials" error on every kubectl call.

Fixes:
- extract_context(): read current-context field first; fall back to contexts[0]
  only when current-context is absent or empty.
- extract_current_context_name(): new helper in kubeconfig.rs using the same
  line-scanner approach as parse_kubeconfig_contexts (no extra dependencies).
- upload_kubeconfig(): use current-context to select the matching context entry
  when storing context name in kubeconfig_files; falls back to first entry.

NOTE: existing kubeconfig rows in the database have the old (wrong) context
stored. Re-uploading kubeconfig files after deploying this build will fix them.

## Cluster dropdown still showing UUID

Root cause: SelectValue rendered ctx.value (the raw UUID passed to SelectItem's
value prop) instead of the display label (SelectItem's children). The custom
Select component had no mechanism to mirror a selected item's children into the
trigger area.

Fix: Select now builds a value→label Map by walking the children tree at render
time (collectLabels). The map is memoised on children. SelectValue reads the
display label from the map; if found, shows the label; otherwise falls back to
the raw value so existing behaviour is preserved for callers that don't need it.
2026-06-07 19:40:53 -05:00
..
.cargo fix: resolve clippy format-args failures and OpenSSL vendoring issue 2026-04-04 15:05:13 -05:00
capabilities feat: full copy from apollo_nxt-trcaa with complete sanitization 2026-06-05 14:12:43 -05:00
gen/schemas feat(kube): add Kubernetes management support 2026-06-06 11:41:23 -05:00
icons feat: full copy from apollo_nxt-trcaa with complete sanitization 2026-06-05 14:12:43 -05:00
resources/ollama feat(ui): fix model dropdown, auth prefill, PII persistence, theme toggle, and Ollama bundle 2026-04-05 19:30:41 -05:00
src fix(kube): use current-context for kubectl auth; fix SelectValue label display 2026-06-07 19:40:53 -05:00
tests/kube feat(k8s): implement clean-room Kubernetes management GUI 2026-06-06 20:27:39 -05:00
build.rs fix: remove invalid --locked flag from cargo commands and fix format string 2026-04-14 20:50:47 -05:00
Cargo.lock feat(kube): add Kubernetes management support 2026-06-06 11:41:23 -05:00
Cargo.toml chore: remove hackathon files from git 2026-06-06 15:46:19 -05:00
tauri.conf.json chore: remove hackathon files from git 2026-06-06 15:46:19 -05:00