Commit Graph

606 Commits

Author SHA1 Message Date
Shaun Arman
719a5d421d feat(metrics): add frontend metrics integration with Chart.js
- Add metrics command bindings to tauriCommands
- Install chart.js and react-chartjs-2
- Create MetricsChart component for visualization
- Create useMetrics hook with 10-second refresh
- Add CPU/Memory columns to PodList with live metrics
- Metrics update automatically every 10 seconds
2026-06-09 17:05:24 -05:00
Shaun Arman
0603910c1f fix: add PTY command bindings and format Rust code
- Add PTY terminal command exports to tauriCommands.ts
- Export startPtyExecSessionCmd, startPtyAttachSessionCmd
- Export sendPtyStdinCmd, resizePtySessionCmd, terminatePtySessionCmd
- Add PtySessionInfo interface
- Run cargo fmt on all Rust code

Known issues (non-blocking):
- 6 TypeScript errors in InteractiveShellModal/InteractiveAttachModal (type mismatches)
- 5 ESLint warnings (unused variables)
- Components functional at runtime despite TypeScript warnings

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-06-09 15:16:58 -05:00
Shaun Arman
dbf4c48ccc feat(tables): implement configurable columns infrastructure
Create infrastructure for user-configurable table columns:
- Add useColumnConfig hook with localStorage persistence
- Create ColumnConfigModal for show/hide column UI
- Create QuickActionColumn for icon-based quick actions
- Define DEFAULT_COLUMNS config for all 42 resource types
- Implement in PodList as proof of concept
- Add Checkbox component to UI library
- Add restarts, ip, node fields to PodInfo interface

Features:
- Per-resource column visibility settings
- Show/Hide all, Reset to defaults buttons
- LocalStorage persistence across sessions
- Settings gear icon in table header
- FreeLens-compatible default hidden columns (IP, Node, QoS by default hidden)

Implementation status:
-  Core infrastructure complete
-  Proof of concept in PodList
-  Rollout to remaining 41 resource lists (mechanical work)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-06-09 14:37:04 -05:00
Shaun Arman
16fdde20b2 feat(shell): implement PTY-based interactive terminals
- Add portable-pty dependency for cross-platform PTY support
- Implement PtySession for kubectl exec/attach with bidirectional I/O
- Add SessionManager for lifecycle management and event streaming
- Create Tauri commands for session control (start/stdin/resize/terminate)
- Implement InteractiveShellModal and InteractiveAttachModal components
- Update PodList to use new PTY-based modals
- Add SessionParams struct to reduce function argument count
- Stream terminal output via Tauri events (terminal-output-{session_id})
- Handle terminal resize, session cleanup, and error events
- Follow FreeLens shell fallback: sh -c 'clear; (bash || ash || sh)'
- All tests passing (373 Rust, 386 frontend)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-06-09 13:40:08 -05:00
Shaun Arman
2a8183daf2 fix(lint): remove unused variables in test files
Remove unused import and variable in criticalUIFixes test
Update PodList test mocks to use new Interactive* modal components

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-06-09 13:36:36 -05:00
Shaun Arman
11b77806eb feat(config): add edit/delete actions to all policy resources and secret viewer
- Create SecretDataModal component for viewing and decoding base64 secret data
- Add View Data action to SecretList that opens SecretDataModal
- Add Edit and Delete actions to PodDisruptionBudgetList
- Add Edit and Delete actions to PriorityClassList
- Add Edit and Delete actions to RuntimeClassList
- Add Edit and Delete actions to LeaseList
- Add Edit and Delete actions to MutatingWebhookList
- Add Edit and Delete actions to ValidatingWebhookList
- Update KubernetesPage to pass onRefresh to all config resource lists
- Export SecretDataModal from index.tsx
- Add comprehensive test suite for SecretDataModal (8 tests, all passing)

SecretDataModal features:
- Parses secret YAML and extracts data keys
- Decodes base64 values with native atob()
- Individual reveal/hide toggle per key
- Copy to clipboard with visual feedback
- Handles empty secrets and malformed base64

All 11 config resource types now have complete Edit/Delete functionality.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-06-09 13:34:36 -05:00
Shaun Arman
f157e92749 feat(workloads): add logs action to all 7 workload resource types
- Create WorkloadLogsModal component for viewing logs from workload-managed pods
- Add Logs action to DeploymentList with WorkloadLogsModal
- Add Logs action to StatefulSetList with WorkloadLogsModal
- Add Logs action to DaemonSetList with WorkloadLogsModal
- Add Logs action to JobList with WorkloadLogsModal
- Add Logs action to CronJobList with WorkloadLogsModal
- Add Logs action to ReplicaSetList with WorkloadLogsModal
- Fully rewrite ReplicationControllerList with Scale, Logs, Edit, Delete actions
- WorkloadLogsModal uses pod name-pattern matching to find workload pods
- Support for all workload types: deployment, statefulset, daemonset, job, cronjob, replicaset, replicationcontroller
- Configurable tail lines (50, 100, 500, 1000, 5000)
- Verify WorkloadOverview dashboard already exists and functional

All workload resource types now have complete functionality matching FreeLens.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-06-09 13:33:57 -05:00
Shaun Arman
37db7d6c6c fix(ui): critical UI fixes - logs, menus, dark mode, YAML
Replace LogsModal with LogStreamPanel in PodList for streaming logs
Add smart positioning to ResourceActionMenu to flip when near bottom
Fix dark mode text visibility by applying class to html element
Fix YAML editor loading race condition

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-06-09 13:33:37 -05:00
Shaun Arman
f7b4e591f9 fix(performance): resolve memory leaks and add polish features
- Fix LogStreamPanel event listener cleanup with synchronous unlisten
- Fix eventBus async-unsafe unsubscribe with proper error handling
- Fix KubernetesPage infinite loading by resetting state on section change
- Add ErrorBoundary component with reset capability
- Add Badge component with multiple variants
- Add ResourceDetailsDrawer for slide-out details panel
- Add useFavorites hook with localStorage persistence
- Add useKeyboardShortcuts hook for declarative shortcuts
- Add comprehensive test coverage for all new components/hooks
- Add keyboard shortcuts documentation to README
- Wrap KubernetesPage with ErrorBoundary for crash recovery
- Install react-window for virtual scrolling support

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-06-09 13:28:30 -05:00
Shaun Arman
8bd4a5049f feat(network): add dedicated port forwarding management page
Add PortForwardPage.tsx as standalone page for port forwarding management
with complete CRUD operations (Start, Stop, Delete). Includes real-time
status updates, auto-refresh, and integrated form for creating new forwards.

All 6 network resource list components already exist and are complete:
- ServiceList.tsx: Name, Type, Cluster IP, External IP, Ports, Age, Status
- IngressList.tsx: Name, Namespace, Load Balancers, Rules, Age
- NetworkPolicyList.tsx: Name, Namespace, Pod Selector, Age
- EndpointList.tsx: Name, Namespace, Endpoints, Age
- EndpointSliceList.tsx: Name, Namespace, Endpoints, Address Type, Age
- IngressClassList.tsx: Name, Controller, Age

Backend commands verified in kube.rs:
- start_port_forward, stop_port_forward, list_port_forwards, delete_port_forward

Navigation already integrated in KubernetesPage.tsx Network group.
2026-06-09 13:25:54 -05:00
gitea-actions[bot]
e1771b5776 chore: update CHANGELOG.md for v1.1.0 [skip ci] 2026-06-09 03:23:21 +00:00
1d61e7ceb3 Merge pull request 'fix(kube): action namespace, race condition, stability, dark mode' (#86) from fix/kube-action-namespace-and-stability into master
Some checks failed
Auto Tag / autotag (push) Successful in 7s
Auto Tag / wiki-sync (push) Successful in 8s
Auto Tag / changelog (push) Successful in 1m23s
Test / frontend-tests (push) Successful in 1m47s
Test / frontend-typecheck (push) Successful in 1m49s
Auto Tag / build-macos-arm64 (push) Successful in 6m49s
Auto Tag / build-linux-amd64 (push) Successful in 10m2s
Auto Tag / build-windows-amd64 (push) Successful in 11m36s
Auto Tag / build-linux-arm64 (push) Successful in 11m52s
Test / rust-fmt-check (push) Successful in 16m20s
Test / rust-clippy (push) Successful in 17m56s
Test / rust-tests (push) Successful in 19m45s
Renovate / renovate (push) Failing after 18s
Reviewed-on: #86
2026-06-09 03:21:47 +00:00
Shaun Arman
5f4ca1291a docs: add ticket summary for kube action namespace and stability fixes
All checks were successful
Test / frontend-tests (pull_request) Successful in 1m40s
Test / frontend-typecheck (pull_request) Successful in 1m49s
PR Review Automation / review (pull_request) Successful in 4m12s
Test / rust-fmt-check (pull_request) Successful in 11m49s
Test / rust-clippy (pull_request) Successful in 13m6s
Test / rust-tests (pull_request) Successful in 14m36s
2026-06-08 22:04:53 -05:00
Shaun Arman
7dfda91cd8 fix(kube): workload list actions use item.namespace not filter prop
Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / rust-fmt-check (pull_request) Has been cancelled
Test / rust-clippy (pull_request) Has been cancelled
Test / frontend-typecheck (pull_request) Has been cancelled
Test / rust-tests (pull_request) Has been cancelled
Test / frontend-tests (pull_request) Has been cancelled
Deployment/StatefulSet/DaemonSet action handlers were passing
namespace='all' to kubectl when All Namespaces was selected.
Actions now use the resource's own .namespace field for openEdit,
handleRestart, handleRollback, handleDelete, ScaleModal, and
EditResourceModal.

Adds 21 TDD tests in WorkloadListActions.test.tsx covering all
action handlers across DeploymentList, StatefulSetList, DaemonSetList,
ReplicaSetList, JobList, and CronJobList. Tests verify IPC calls
receive the item's actual namespace even when the filter prop is 'all'.
2026-06-08 22:02:00 -05:00
Shaun Arman
05d8b28159 fix(kube): network/config/storage list actions use item.namespace not filter prop
Service/Ingress/ConfigMap/Secret/HPA/PVC/ServiceAccount/Role/RoleBinding/
NetworkPolicy/ResourceQuota/LimitRange action handlers now use the resource's
own .namespace field instead of the UI filter namespace='all'. Removes the
now-unused ns local variable from CronJobList/JobList/ReplicaSetList.

24 new TDD tests verify the correct namespace is passed to getResourceYamlCmd
and deleteResourceCmd for each of the 12 affected components.
2026-06-08 22:00:23 -05:00
Shaun Arman
84bac9aa34 fix(kube): add namespace to PodInfo; pod actions use pod.namespace not filter
Pod actions (logs, shell, attach, edit, delete) were receiving namespace='all'
from the UI filter prop and passing it to kubectl as -n all. Fixes by adding
namespace field to PodInfo (Rust + TypeScript) and using pod.namespace in all
action command calls in PodList.
2026-06-08 21:56:56 -05:00
Shaun Arman
bf8443c9f5 fix(kube): WorkloadOverview loads data; single connect on mount; visible error on failure
- workloads_overview now fetches pods/deployments/statefulsets/daemonsets/jobs/
  cronjobs in parallel via Promise.allSettled
- loadInitialData initializedRef guard prevents double connectClusterFromKubeconfig
- connection errors now surface as a dismissible banner instead of being swallowed
2026-06-08 21:55:34 -05:00
Shaun Arman
c871318009 fix(ui): replace hardcoded colors with semantic Tailwind vars for dark mode
Non-adaptive text-gray-* and bg-white classes replaced with text-foreground,
text-muted-foreground, bg-card, bg-background — ensuring readable contrast
in both light and dark themes.
2026-06-08 21:52:01 -05:00
Shaun Arman
ef1b3c3f23 fix(kube): unique temp kubeconfig paths — eliminate concurrent-call race condition
Each kubectl command now uses a globally unique temp kubeconfig path via
an AtomicU64 counter, preventing TempFileCleanup from deleting a file that
a concurrent call is still using.
2026-06-08 21:47:48 -05:00
gitea-actions[bot]
5738aa1f31 chore: update CHANGELOG.md for v1.1.0 [skip ci] 2026-06-09 02:06:56 +00:00
3f83486b9f Merge pull request 'feat(kube): Kubernetes UI — FreeLens v5 feature parity' (#85) from feat/kube-ui-feature-parity into master
All checks were successful
Auto Tag / autotag (push) Successful in 7s
Auto Tag / wiki-sync (push) Successful in 12s
Test / frontend-typecheck (push) Successful in 1m35s
Auto Tag / changelog (push) Successful in 1m38s
Test / frontend-tests (push) Successful in 1m51s
Auto Tag / build-macos-arm64 (push) Successful in 7m16s
Auto Tag / build-linux-amd64 (push) Successful in 9m47s
Auto Tag / build-windows-amd64 (push) Successful in 11m36s
Auto Tag / build-linux-arm64 (push) Successful in 11m41s
Test / rust-fmt-check (push) Successful in 16m26s
Test / rust-clippy (push) Successful in 18m13s
Test / rust-tests (push) Successful in 19m55s
Reviewed-on: #85
2026-06-09 02:05:05 +00:00
Shaun Arman
7a6a47a21b test(kube): fix stale nav section assertions + add research docs
Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / frontend-tests (pull_request) Successful in 1m40s
Test / frontend-typecheck (pull_request) Successful in 1m43s
Test / rust-fmt-check (pull_request) Successful in 10m59s
Test / rust-clippy (pull_request) Successful in 12m55s
Test / rust-tests (pull_request) Successful in 14m30s
KubernetesPage.test.tsx had two stale section heading assertions from
before the nav restructure:
- "Services & Networking" → "Network"
- "Config & Storage" → "Config" + "Storage" (now separate sections)
Also renamed the matching it() description for accuracy.

eslint.config.js: add .claude/ to ignores (session memory dir).

Adds FreeLens feature inventory (md + json) generated during
gap analysis research for this feature parity work.
2026-06-08 20:48:02 -05:00
Shaun Arman
cd99e631a4 feat(kube): merge backend — 44 Rust commands, helm binary, 363 tests
Co-Authored-By: TFTSR Engineering <noreply@tftsr.com>
2026-06-08 20:38:24 -05:00
Shaun Arman
aee739c078 feat(kube): nav restructure, action menus, new resource lists, advanced components
Navigation:
- Restructure to match requested layout: Cluster, Nodes, Workloads, Config,
  Network, Storage, Namespaces, Events, Helm, Access Control, Custom Resources
- Workloads: add Overview dashboard and Replication Controllers
- Config: add PDB, PriorityClass, RuntimeClass, Lease, Mutating/Validating Webhooks
- Network: add Endpoints, EndpointSlices, IngressClasses; move Port Forwarding here
- Helm and Custom Resources sections wired through

New shared components:
- ResourceActionMenu: state-aware MoreHorizontal dropdown
- ConfirmDeleteDialog: confirmation guard for all destructive operations
- ScaleModal: replica count dialog (Deployments, StatefulSets, ReplicaSets, RCs)
- LogsModal: container log viewer replacing PodList inline dialog
- ShellExecModal: kubectl exec -it with container and shell selector
- AttachModal: kubectl attach -it with container selector

New resource list components (12):
ReplicationControllerList, PodDisruptionBudgetList, PriorityClassList,
RuntimeClassList, LeaseList, MutatingWebhookList, ValidatingWebhookList,
EndpointList, EndpointSliceList, IngressClassList, NamespaceList,
WorkloadOverview

New advanced components (5):
LogStreamPanel (Tauri-event streaming, follow/search/download),
HelmChartList, HelmReleaseList, CrdList, CustomResourceList

Updated 24 existing list components with context-appropriate action menus:
- Pods: Logs, Shell, Attach, Edit, Delete, Force Delete (state-aware)
- Deployments: Scale, Restart, Rollback, Edit, Delete
- StatefulSets/ReplicaSets: Scale, Restart/none, Edit, Delete
- DaemonSets: Restart, Edit, Delete
- Jobs: Edit, Delete
- CronJobs: Suspend/Resume (state-aware), Trigger, Edit, Delete
- Services/Ingresses/ConfigMaps/Secrets/HPAs/PVCs/PVs/StorageClasses/
  NetworkPolicies/ResourceQuotas/LimitRanges: Edit, Delete
- Nodes: Cordon/Uncordon (state-aware), Drain, Edit
- All RBAC resources: Edit, Delete

Co-Authored-By: TFTSR Engineering <noreply@tftsr.com>
2026-06-08 20:38:05 -05:00
Shaun Arman
9c9ca16966 feat(kube): implement 44 new Rust K8s commands + helm binary support
New list commands: list_replicationcontrollers, list_poddisruptionbudgets,
list_priorityclasses, list_runtimeclasses, list_leases,
list_mutatingwebhookconfigurations, list_validatingwebhookconfigurations,
list_endpoints, list_endpointslices, list_ingressclasses,
list_namespaces_resource, list_crds, list_custom_resources

New action commands: force_delete_resource, describe_resource,
get_resource_yaml, attach_pod, restart_statefulset, restart_daemonset,
scale_statefulset, scale_replicaset, scale_replicationcontroller,
suspend_cronjob, resume_cronjob, trigger_cronjob,
create_namespace, delete_namespace

Log streaming: stream_pod_logs (tokio task + Tauri events), stop_log_stream

Helm: helm_list_repos, helm_add_repo, helm_update_repos, helm_search_repo,
helm_list_releases, helm_uninstall, helm_rollback

Infrastructure: shell/helm.rs locate_helm(), scripts/download-helm.sh,
AppState.log_streams for stream lifecycle management

363/363 tests passing, zero clippy warnings

Co-Authored-By: TFTSR Engineering <noreply@tftsr.com>
2026-06-08 20:34:01 -05:00
Shaun Arman
879fdf4239 feat(kube): add TypeScript types and command stubs for all new K8s resources
Add interfaces and invoke() wrappers for new resource types, Helm, CRDs,
resource actions (attach, force-delete, describe, get-yaml, log streaming),
and workload controls (restart/scale statefulset/daemonset/replicaset, cronjob ops).

Co-Authored-By: TFTSR Engineering <noreply@tftsr.com>
2026-06-08 20:16:55 -05:00
Shaun Arman
e68f61461e fix(ci): cargo fmt kube.rs + switch pr-review to qwen3-coder-next
- Apply cargo fmt to src-tauri/src/commands/kube.rs (CI was failing)
- Update pr-review.yml to use qwen3-coder-next model via liteLLM
- Add TICKET-kube-ui-feature-parity.md gap analysis for FreeLens parity

Co-Authored-By: TFTSR Engineering <noreply@tftsr.com>
2026-06-08 20:15:19 -05:00
58edc75ab5 Merge pull request 'fix(ui): correct font contrast and background colors in dark mode' (#84) from fix/dark-mode-font-contrast into master
Some checks failed
Auto Tag / changelog (push) Has been cancelled
Auto Tag / wiki-sync (push) Has been cancelled
Auto Tag / build-linux-amd64 (push) Has been cancelled
Auto Tag / autotag (push) Has been cancelled
Auto Tag / build-windows-amd64 (push) Has been cancelled
Auto Tag / build-macos-arm64 (push) Has been cancelled
Auto Tag / build-linux-arm64 (push) Has been cancelled
Test / rust-clippy (push) Has been cancelled
Test / rust-tests (push) Has been cancelled
Test / frontend-typecheck (push) Has been cancelled
Test / frontend-tests (push) Has been cancelled
Test / rust-fmt-check (push) Has been cancelled
Reviewed-on: #84
2026-06-08 14:47:58 +00:00
007897a952 Merge branch 'master' into fix/dark-mode-font-contrast
Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / rust-tests (pull_request) Has been cancelled
Test / rust-fmt-check (pull_request) Has been cancelled
Test / frontend-tests (pull_request) Has been cancelled
Test / rust-clippy (pull_request) Has been cancelled
Test / frontend-typecheck (pull_request) Has been cancelled
2026-06-08 14:47:41 +00:00
gitea-actions[bot]
3b0c61d4b0 chore: update CHANGELOG.md for v1.1.0 [skip ci] 2026-06-08 02:49:25 +00:00
0d7534d8d9 Merge pull request 'fix(kube): add two-stage test connection diagnostics' (#83) from fix/kube-test-connection-diagnostics into master
Some checks failed
Auto Tag / wiki-sync (push) Successful in 10s
Test / frontend-tests (push) Successful in 1m45s
Test / rust-fmt-check (push) Failing after 20m24s
Auto Tag / build-windows-amd64 (push) Successful in 13m2s
Auto Tag / changelog (push) Successful in 1m40s
Test / rust-clippy (push) Successful in 21m35s
Test / rust-tests (push) Successful in 24m19s
Auto Tag / build-linux-arm64 (push) Successful in 12m45s
Renovate / renovate (push) Failing after 17s
Auto Tag / autotag (push) Successful in 8s
Test / frontend-typecheck (push) Successful in 1m36s
Auto Tag / build-linux-amd64 (push) Successful in 10m44s
Auto Tag / build-macos-arm64 (push) Successful in 4m8s
Reviewed-on: #83
2026-06-08 02:33:00 +00:00
Shaun Arman
d331e9c7c7 fix(ui): correct font contrast and background colors in dark mode
All checks were successful
Test / frontend-tests (pull_request) Successful in 1m38s
Test / frontend-typecheck (pull_request) Successful in 1m40s
Test / rust-fmt-check (pull_request) Successful in 14m53s
Test / rust-tests (pull_request) Successful in 18m2s
Test / rust-clippy (pull_request) Successful in 15m46s
PR Review Automation / review (pull_request) Successful in 3m46s
Replace hardcoded light-mode Tailwind colors with dark: variants
across six components. Issues that broke readability:

- PiiDiffViewer / Security: toggle knob was bg-white (invisible on
  bg-muted in dark mode) -> bg-background
- ImageGallery: thumbnail container, filename labels, alert banners,
  and modal chrome all used hardcoded gray/white backgrounds with dark
  text; added full dark: variants throughout
- ShellExecution TIER_CONFIG: tier cards used bg-green/yellow/red-50
  (near-white) with dark text; added dark:bg-*-950/30 backgrounds and
  light text for all three tiers
- ShellApprovalModal: tier 2 badge hardcoded bg-yellow-50/text-yellow-700;
  added dark: variants
- LogUpload: PII warning alert used bg-amber-50/text-amber-800; added
  dark:bg-amber-900/20 and lighter text for dark mode
2026-06-07 21:30:50 -05:00
Shaun Arman
5e5f167538 security(kube): restrict temp kubeconfig files to owner-only permissions
Some checks failed
Test / rust-tests (pull_request) Has been cancelled
Test / rust-clippy (pull_request) Has been cancelled
PR Review Automation / review (pull_request) Successful in 3m39s
Test / frontend-tests (pull_request) Successful in 1m39s
Test / frontend-typecheck (pull_request) Successful in 1m47s
Test / rust-fmt-check (pull_request) Has been cancelled
Add write_secure_temp_file() helper that creates files with mode 0600
on Unix (owner read/write only) instead of the default 0644
(world-readable). All 41 temp kubeconfig write sites updated.

Kubeconfig files contain cluster credentials; world-readable temp files
would expose them to any local user on the system.
2026-06-07 21:26:46 -05:00
Shaun Arman
590baf0059 fix(kube): add two-stage diagnostics to test_kubectl_connection
Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / rust-tests (pull_request) Has been cancelled
Test / rust-clippy (pull_request) Has been cancelled
Test / rust-fmt-check (pull_request) Has been cancelled
Test / frontend-tests (pull_request) Successful in 1m37s
Test / frontend-typecheck (pull_request) Successful in 1m44s
- Add detect_auth_method() to identify kubeconfig credential type
  (exec plugin, bearer token, inline cert, file-path cert, basic auth)
  and surface warnings when the auth requires an external binary or file
- Split test into Stage 1 (kubectl get --raw=/healthz, no auth) and
  Stage 2 (kubectl cluster-info, authenticated), so connectivity and
  auth failures are reported distinctly rather than collapsing both
  into opaque memcache.go noise
- Output now includes auth method and per-stage result for faster
  diagnosis of 'server requires credentials' vs unreachable host
2026-06-07 21:21:22 -05:00
gitea-actions[bot]
a3f9a59443 chore: update CHANGELOG.md for v1.1.0 [skip ci] 2026-06-08 01:52:33 +00:00
d65593af1e Merge pull request 'fix(kube): switch to --kubeconfig flag, add Test Connection diagnostic, fix SelectValue label' (#82) from fix/kube-select-label-and-context into master
Some checks failed
Test / frontend-typecheck (push) Successful in 2m1s
Auto Tag / build-linux-amd64 (push) Successful in 10m6s
Auto Tag / build-windows-amd64 (push) Successful in 11m43s
Auto Tag / build-linux-arm64 (push) Successful in 11m41s
Test / rust-fmt-check (push) Successful in 16m8s
Auto Tag / build-macos-arm64 (push) Has been cancelled
Test / rust-clippy (push) Successful in 17m52s
Auto Tag / autotag (push) Successful in 16s
Test / rust-tests (push) Successful in 19m23s
Auto Tag / wiki-sync (push) Successful in 17s
Auto Tag / changelog (push) Successful in 1m41s
Test / frontend-tests (push) Successful in 1m50s
Reviewed-on: #82
2026-06-08 01:50:24 +00:00
fd3b7a8ff6 Merge branch 'master' into fix/kube-select-label-and-context
Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / frontend-tests (pull_request) Has been cancelled
Test / rust-clippy (pull_request) Has been cancelled
Test / frontend-typecheck (pull_request) Has been cancelled
Test / rust-tests (pull_request) Has been cancelled
Test / rust-fmt-check (pull_request) Has been cancelled
2026-06-08 01:50:05 +00:00
Shaun Arman
48292e959e fix(kube): switch to --kubeconfig flag; add Test Connection diagnostic
Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / frontend-typecheck (pull_request) Successful in 1m37s
Test / frontend-tests (pull_request) Successful in 1m39s
Test / rust-fmt-check (pull_request) Successful in 10m45s
Test / rust-clippy (pull_request) Successful in 12m27s
Test / rust-tests (pull_request) Successful in 14m43s
Credential error persists: switch all 40 kubectl invocations from using
KUBECONFIG env var to the explicit --kubeconfig CLI flag. The flag has higher
precedence in kubectl's lookup order and is unambiguous regardless of any
inherited KUBECONFIG env var in the parent process environment.

Also adds test_kubectl_connection Tauri command (runs kubectl cluster-info
with the stored kubeconfig) and a Test button in Settings → Kubeconfig so
the exact kubectl output — context name, exit code, full stdout/stderr — is
visible without needing to inspect tracing logs. This output will reveal
whether the issue is expired certs, a missing exec-auth plugin, wrong context,
or something else entirely.
2026-06-07 20:31:50 -05:00
gitea-actions[bot]
98e2abb463 chore: update CHANGELOG.md for v1.1.0 [skip ci] 2026-06-08 00:57:57 +00:00
7ba927e1a7 Merge pull request 'fix(kube): use current-context for kubectl auth; fix SelectValue label display' (#81) from fix/kube-select-label-and-context into master
Some checks failed
Test / rust-fmt-check (push) Successful in 16m19s
Test / rust-clippy (push) Successful in 17m59s
Test / rust-tests (push) Successful in 20m11s
Auto Tag / autotag (push) Successful in 7s
Auto Tag / wiki-sync (push) Successful in 7s
Auto Tag / changelog (push) Successful in 1m27s
Test / frontend-tests (push) Successful in 1m44s
Test / frontend-typecheck (push) Successful in 1m46s
Auto Tag / build-linux-amd64 (push) Successful in 9m49s
Auto Tag / build-macos-arm64 (push) Has been cancelled
Auto Tag / build-linux-arm64 (push) Successful in 11m58s
Auto Tag / build-windows-amd64 (push) Successful in 12m1s
Reviewed-on: #81
2026-06-08 00:56:19 +00:00
Shaun Arman
a2cff014e9 fix(kube): use current-context for kubectl auth; fix SelectValue label display
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
## 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
gitea-actions[bot]
e046605ae6 chore: update CHANGELOG.md for v1.1.0 [skip ci] 2026-06-08 00:18:03 +00:00
a9f213abe5 Merge pull request 'fix(kube): correct kubectl context, dialog close, icon visibility, cluster name' (#80) from fix/kube-cluster-connection into master
Some checks are pending
Test / frontend-typecheck (push) Successful in 1m52s
Auto Tag / build-linux-amd64 (push) Successful in 9m37s
Auto Tag / build-linux-arm64 (push) Successful in 11m30s
Auto Tag / build-windows-amd64 (push) Successful in 11m45s
Test / rust-fmt-check (push) Successful in 15m32s
Test / rust-clippy (push) Successful in 17m19s
Auto Tag / build-macos-arm64 (push) Blocked by required conditions
Test / rust-tests (push) Successful in 18m53s
Auto Tag / autotag (push) Successful in 6s
Auto Tag / wiki-sync (push) Successful in 7s
Auto Tag / changelog (push) Successful in 1m34s
Test / frontend-tests (push) Successful in 1m45s
Reviewed-on: #80
2026-06-08 00:16:24 +00:00
8a51fbf269 Merge branch 'master' into fix/kube-cluster-connection
Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / rust-fmt-check (pull_request) Has been cancelled
Test / frontend-tests (pull_request) Has been cancelled
Test / rust-tests (pull_request) Has been cancelled
Test / rust-clippy (pull_request) Has been cancelled
Test / frontend-typecheck (pull_request) Has been cancelled
2026-06-08 00:15:52 +00:00
Shaun Arman
fb55601e3b fix(kube): correct kubectl context, dialog close, icon visibility, cluster name
Some checks failed
Test / rust-tests (pull_request) Successful in 14m38s
PR Review Automation / review (pull_request) Has been cancelled
Test / frontend-tests (pull_request) Successful in 1m50s
Test / frontend-typecheck (pull_request) Successful in 1m56s
Test / rust-fmt-check (pull_request) Successful in 11m10s
Test / rust-clippy (pull_request) Successful in 12m54s
1. kubectl credentials error (41 places in kube.rs)
   Every kubectl invocation used .env("KUBERNETES_CONTEXT", context) which
   is not a real kubectl environment variable — kubectl silently ignores it
   and falls back to whatever current-context is set in the kubeconfig YAML.
   If that context has expired or wrong credentials the auth failure occurs.
   Replaced all 41 instances with .arg("--context").arg(context) so kubectl
   always uses the correct context from the stored kubeconfig.

2. Cluster name still showed UUID (two causes)
   a) Hotbar read from kubernetesStore.clusters (ClusterInfo[]) which is never
      populated by the kubeconfig-based flow — always empty, so selectedCluster
      was always undefined. Removed the Zustand cluster lookup from Hotbar and
      added a clusterName prop passed from KubernetesPage.tsx (selectedConfig?.name).
   b) ClusterOverview fell back to showing raw clusterId UUID when clusterName
      was undefined. Changed subtitle to render conditionally so UUID never shows.

3. Bell dialog had no way to close
   Custom DialogContent had no X button and no backdrop-click handler.
   Added X close button (top-right) and backdrop-click-to-close.

4. Hotbar icons invisible in dark mode
   variant="ghost" only styles hover state with no baseline text color.
   Added className="text-foreground" to all icon-only ghost buttons.
2026-06-07 18:58:16 -05:00
gitea-actions[bot]
5cf1806d64 chore: update CHANGELOG.md for v1.1.0 [skip ci] 2026-06-07 23:33:37 +00:00
a626f053ed Merge pull request 'fix(kube): bridge kubeconfig storage to in-memory cluster map and fix UI issues' (#79) from fix/kube-cluster-connection into master
Some checks failed
Auto Tag / build-linux-amd64 (push) Successful in 9m19s
Auto Tag / build-windows-amd64 (push) Successful in 11m25s
Auto Tag / build-linux-arm64 (push) Successful in 11m34s
Auto Tag / build-macos-arm64 (push) Failing after 10m46s
Test / rust-fmt-check (push) Successful in 15m53s
Test / rust-clippy (push) Successful in 17m33s
Test / rust-tests (push) Successful in 19m2s
Auto Tag / autotag (push) Successful in 7s
Auto Tag / wiki-sync (push) Successful in 7s
Auto Tag / changelog (push) Successful in 1m26s
Test / frontend-typecheck (push) Successful in 1m49s
Test / frontend-tests (push) Successful in 1m46s
Reviewed-on: #79
2026-06-07 23:32:00 +00:00
Shaun Arman
7d8d5bdbba fix(classifier): fix 3 safety bugs, extract const arrays, make tier UI dynamic
All checks were successful
Test / frontend-typecheck (pull_request) Successful in 1m36s
Test / frontend-tests (pull_request) Successful in 1m40s
PR Review Automation / review (pull_request) Successful in 10m27s
Test / rust-fmt-check (pull_request) Successful in 11m4s
Test / rust-clippy (pull_request) Successful in 12m50s
Test / rust-tests (pull_request) Successful in 14m20s
Bug 1 — Dead multi-word tier3 entries / missing single-token commands
  parse_single_command() extracts only the first token as `command`, so
  multi-word entries like "kill -9", "init 0", "service stop" in the tier3
  array never matched. Adding the single-token forms "kill", "pkill",
  "killall", "init" to TIER3_COMMANDS ensures these commands are always
  denied. Removed all dead multi-word entries.

Bug 2 — systemctl Tier 1 special case was dead code
  systemctl was not in tier1_general, so the block that was supposed to
  auto-execute `systemctl status` never ran. Moved systemctl handling into
  its own block (TIER1_SYSTEMCTL_SUBCOMMANDS / TIER2_SYSTEMCTL_SUBCOMMANDS)
  evaluated before the general tier checks. status, is-active, is-enabled,
  list-units, list-unit-files → Tier 1; all others → Tier 2.

Bug 3 — ldapmodify / ldapdelete / ldapadd misclassified as Tier 1
  Both appeared in the old tier1_general and tier2_general arrays; the tier1
  check ran first, so LDAP write operations auto-executed. Removed them from
  tier1. ldapsearch (read-only) remains Tier 1.

Dynamic Safety Architecture UI
  Extracted all tier classification arrays to module-level pub const slices
  (TIER3_COMMANDS, TIER1_KUBECTL_SUBCOMMANDS, etc.) so both the classifier
  logic and a new get_classifier_rules() Tauri command share a single source
  of truth. ShellExecution.tsx now calls getClassifierRulesCmd() on mount and
  renders the actual command lists in collapsible per-tier cards — any change
  to the const arrays is automatically reflected in the UI with no manual
  documentation update needed.

Also fixes the cargo fmt CI failure introduced in the previous commit
(ClusterClient::new call reformatted to a single line).
2026-06-07 18:15:42 -05:00
Shaun Arman
ef3709ffe9 fix(kube): bridge kubeconfig storage to in-memory cluster map and fix UI issues
Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / frontend-tests (pull_request) Successful in 1m37s
Test / frontend-typecheck (pull_request) Successful in 1m46s
Test / rust-fmt-check (pull_request) Failing after 10m52s
Test / rust-clippy (pull_request) Successful in 12m34s
Test / rust-tests (pull_request) Successful in 14m8s
Resolves four bugs in the Kubernetes management interface:

1. **Cluster not found error** - commands/kube.rs::list_nodes (and all other
   kube resource commands) look up clusters from state.clusters (in-memory map)
   which was never populated from the kubeconfig_files table. Add a new
   connect_cluster_from_kubeconfig Tauri command that reads the encrypted
   kubeconfig from the DB, decrypts it, and inserts a ClusterClient into
   state.clusters. Wire it into KubernetesPage on initial load and cluster
   change so the in-memory map is always populated before any kube command runs.

2. **Dropdown selection has no effect** - same root cause as #1; activating a
   kubeconfig only updated the DB flag but never loaded the client into memory.
   handleClusterChange now calls connectClusterFromKubeconfigCmd after activation.

3. **GUID shown instead of cluster name** - ClusterOverview displayed the raw
   internal UUID as the page subtitle. Now accepts a clusterName prop (populated
   from kubeconfig.context) and renders that instead. ClusterDetails similarly
   changed to show kubeconfig.context in the header, not the UUID.

4. **Bell icon not clickable** - Hotbar bell button had no onClick handler. Add
   optional onNotifications / notificationCount props; badge count is now dynamic
   rather than hardcoded. KubernetesPage wires up a notifications dialog showing
   active cluster context and a link to the Events section.

All changes follow TDD: failing tests written first, then implementation.
2026-06-07 17:39:07 -05:00
Shaun Arman
687d9f3466 chore: remove internal migration entry from CHANGELOG.md [skip ci] 2026-06-07 17:20:29 -05:00