tftsr-devops_investigation/src/components
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
..
Kubernetes fix(kube): correct kubectl context, dialog close, icon visibility, cluster name 2026-06-07 18:58:16 -05:00
ui fix(kube): use current-context for kubectl auth; fix SelectValue label display 2026-06-07 19:40:53 -05:00
ChatWindow.tsx feat: inline file/screenshot attachment in triage chat 2026-03-31 08:40:36 -05:00
DocEditor.tsx fix: improve download button visibility and add DOCX export 2026-04-03 12:33:27 -05:00
HardwareReport.tsx fix: provider test FK error, model pull white screen, RECOMMENDED badge 2026-03-31 07:46:36 -05:00
ImageGallery.tsx fix: lint fixes and formatting cleanup 2026-04-09 20:42:40 -05:00
ModelSelector.tsx feat: initial implementation of TFTSR IT Triage & RCA application 2026-03-14 22:36:25 -05:00
PiiDiffViewer.tsx feat: initial implementation of TFTSR IT Triage & RCA application 2026-03-14 22:36:25 -05:00
ShellApprovalModal.tsx feat: add shell execution and kubeconfig management UI 2026-06-05 08:14:03 -05:00
TriageProgress.tsx feat: initial implementation of TFTSR IT Triage & RCA application 2026-03-14 22:36:25 -05:00