✨ Add kkc-agent local agent for kubeconfig bridging#2
Conversation
- Fix auth.setup.ts to use mocked authentication instead of real OAuth - Update AIMode.spec.ts to add auth mocking in beforeEach hook - Update Settings page selectors to match actual UI (AI Usage Mode) - Add data-testid attributes to Layout components for better testing - Fix Tour component onboarding button reference Tests passing: - Login: 7/7 - Dashboard: 17/17 - AIMode: 16/16 Co-Authored-By: Claude Opus 4.5 <[email protected]> Signed-off-by: Andrew Anderson <[email protected]>
- Add proper auth mocking to AIRecommendations.spec.ts - Add proper auth mocking to CardChat.spec.ts - Fix localStorage access issue (must navigate to page first) - Create setupAuthAndNavigate helper for consistent auth setup Tests now passing: - AIRecommendations: 13/13 ✅ - CardChat: 16/16 ✅ Total AI tests passing: 45/45 Co-Authored-By: Claude Opus 4.5 <[email protected]> Signed-off-by: Andrew Anderson <[email protected]>
Moved TourProvider and tour components from App.tsx to Layout.tsx so they only render on authenticated routes. This fixes the blank login page that occurred when TourProvider tried to render during the login flow. Co-Authored-By: Claude Opus 4.5 <[email protected]> Signed-off-by: Andrew Anderson <[email protected]>
Added onClick handler and visual feedback for the Sync Now button: - Added handleSync function to simulate sync operation - Shows spinner animation while syncing - Displays toast notifications for sync status - Updates app state to show as synced after completion - Disabled button during sync to prevent double-clicks Co-Authored-By: Claude Opus 4.5 <[email protected]> Signed-off-by: Andrew Anderson <[email protected]>
- Add null check in DashboardDropZone before filtering dashboards - Add null check in Dashboard before accessing dashboards.length - Add null coalesce in useDashboards to ensure array is never null Fixes "Cannot read properties of null" errors when API returns null instead of an empty array. Co-Authored-By: Claude Opus 4.5 <[email protected]> Signed-off-by: Andrew Anderson <[email protected]>
- Use single route handler with URL-based switching for MCP mocks - Prevents mock route order conflicts - Update Clusters test selector to match actual DOM structure - Re-add auth mocking to reverted test files Test results: 149/152 passing (98%) Remaining 3 failures need component fixes: - Clusters ARIA labels (accessibility) - Events warnings-only toggle (filter logic) - Settings form labels (accessibility) Co-Authored-By: Claude Opus 4.5 <[email protected]> Signed-off-by: Andrew Anderson <[email protected]>
Changed the overlay approach to use box-shadow only for the cutout effect. Previously both the parent bg-black/70 and the cutout's box-shadow were creating overlays, causing the highlighted area to be double-darkened. Now the highlighted target area stays clear/visible while the rest of the screen has the dark overlay. Co-Authored-By: Claude Opus 4.5 <[email protected]> Signed-off-by: Andrew Anderson <[email protected]>
Implements Phase 1-2 of local agent: - WebSocket server on localhost:8585 - Kubeconfig discovery and multi-context support - kubectl command proxy (read-only commands only) - Health endpoint for browser detection The agent runs on user's laptop and bridges the cluster Console UI with local kubeconfig, enabling multi-cluster management without storing credentials in the cluster. Usage: kkc-agent # Start on default port 8585 kkc-agent --port 9000 # Custom port curl localhost:8585/health # Test Co-Authored-By: Claude Opus 4.5 <[email protected]> Signed-off-by: Andrew Anderson <[email protected]>
|
Welcome to KubeStellar! 🚀 Thank you for submitting this Pull Request. Before your PR can be merged, please ensure: ✅ DCO Sign-off - All commits must be signed off with ✅ PR Title - Must start with an emoji: ✨ (feature), 🐛 (bug fix), 📖 (docs), 🌱 (infra/tests), Getting Started with KubeStellar: Contributor Resources:
🌟 Help KubeStellar Grow - We Need Adopters! Our roadmap is driven entirely by adopter feedback. Whether you're using KubeStellar yourself or know someone who could benefit from multi-cluster Kubernetes: 📋 Take our Multi-Cluster Survey - Share your use cases and help shape our direction! A maintainer will review your PR soon. Feel free to ask questions in the comments or on Slack! |
- Auto-detect Claude Code installation
- Read token usage from ~/.claude/
- Expose in health endpoint for browser UI
Example response:
{
"claude": {
"installed": true,
"version": "2.1.9",
"tokenUsage": { "session": {...}, "today": {...} }
}
}
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: Andrew Anderson <[email protected]>
- Add npm run preview & wait-on steps before running tests in all CI jobs - Add wait-on as dev dependency for proper server startup detection - Create comprehensive Tour/Onboarding E2E tests The CI was failing because PLAYWRIGHT_BASE_URL was set (which disables the webServer config in playwright.config.ts) but no server was actually started. This fix ensures the Vite preview server starts before tests run. Co-Authored-By: Claude Opus 4.5 <[email protected]> Signed-off-by: Andrew Anderson <[email protected]>
- Fix invalid combined CSS/text selector - Use simpler assertion for normal event filtering Co-Authored-By: Claude Opus 4.5 <[email protected]> Signed-off-by: Andrew Anderson <[email protected]>
- Read token usage from stats-cache.json for cumulative (thisMonth) data - Parse session transcript .jsonl files for real-time session/today usage - Use buffered scanner to handle large transcript files - Filter today's usage by timestamp prefix matching Co-Authored-By: Claude Opus 4.5 <[email protected]> Signed-off-by: Andrew Anderson <[email protected]>
|
/lgtm |
|
/approve |
|
@clubanderson: you cannot LGTM your own PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: clubanderson The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
🎉 Thank you for your contribution! Your PR has been successfully merged. 🌟 Help KubeStellar Grow - We Need Adopters! Our roadmap is driven entirely by adopter feedback - nothing else. Whether you're using KubeStellar yourself or know organizations that could benefit from multi-cluster Kubernetes, we need your help: 📋 Take our Multi-Cluster Survey - Share your use cases and help shape our direction! 🗣️ Spread the word - Tell colleagues, write blog posts, present at meetups 💬 Share feedback on Slack #kubestellar-dev Every adopter story helps us prioritize what matters most. Thank you for being part of the KubeStellar community! |
✨ Spec builder for go-1.24.3
✨ Spec builder for go-1.24.3
…dentation - Revert package-lock.json peer flag pollution (Critical kubestellar#2) - Revert AddCardModal.tsx re-indentation, keep only catalog entries (Critical kubestellar#3) - Revert cardRegistry.ts formatting noise (restore original comment) (kubestellar#6) - Revert unrelated BuildpacksStatus.tsx i18n changes (kubestellar#8) - Add backend proxy handler for Artifact Hub API to fix CORS (kubestellar#5) - Wire isDemoFallback through useCardLoadingState for proper demo badge (kubestellar#4) - Convert all artifact-hub_status files to 2-space indentation (kubestellar#7) - Add i18n keys for relative time strings (justNow, minutesAgo, etc.) (kubestellar#9) - Remove unrelated buildpacksStatus i18n keys from en/cards.json (kubestellar#8) Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Aaradhy Chinche <[email protected]>
- Use Set instead of arrays for word-overlap scoring to prevent duplicate word inflation (Copilot #2) - Use >= instead of > for threshold comparison so missions scoring exactly 0.6 are accepted (Copilot #1) - Restrict cncfProject shortcut to installer missions only — solutions use slug/title matching as before (Copilot #3) Signed-off-by: Andrew Anderson <[email protected]>
- Use Set instead of arrays for word-overlap scoring to prevent duplicate word inflation (Copilot #2) - Use >= instead of > for threshold comparison so missions scoring exactly 0.6 are accepted (Copilot #1) - Restrict cncfProject shortcut to installer missions only — solutions use slug/title matching as before (Copilot #3) Signed-off-by: Andrew Anderson <[email protected]>
Fix 5 categories of errors identified via GA4 error tracking: 1. crypto.subtle.digest unhandled rejection (13 events): - crypto.subtle is unavailable in insecure contexts (HTTP) - Add FNV-1a hash fallback in analytics.ts for user ID hashing - Add Math.random fallback in useActiveUsers.ts for session IDs 2. React error #185 on /operators page (18 events): - useOperatorSubscriptions had infinite re-render loop - Demo mode path didn't set fetchInProgressRef guard - clusterCount state changes cascaded into synchronous state updates - Fix: set fetchInProgressRef immediately, use ref for clusterCount, trigger refetch via fetchVersion instead of dependency array 3. Undefined .includes() / .toLowerCase() crashes (9 events): - getStatusSeverity/getStatusColors crashed on undefined status - PodIssues card accessed issue.issues without null guard - Fix: accept null/undefined in status functions, guard array access 4. Maximum call stack exceeded (28 events): - Likely caused by the operator infinite loop cascading - Fixed by the same re-entrancy guard in fix #2 5. Chunk load errors (46 events): - Already handled by ChunkErrorBoundary auto-reload mechanism - 146 successful recoveries tracked in same period Signed-off-by: Andrew Anderson <[email protected]>
Fix 5 categories of errors identified via GA4 error tracking: 1. crypto.subtle.digest unhandled rejection (13 events): - crypto.subtle is unavailable in insecure contexts (HTTP) - Add FNV-1a hash fallback in analytics.ts for user ID hashing - Add Math.random fallback in useActiveUsers.ts for session IDs 2. React error #185 on /operators page (18 events): - useOperatorSubscriptions had infinite re-render loop - Demo mode path didn't set fetchInProgressRef guard - clusterCount state changes cascaded into synchronous state updates - Fix: set fetchInProgressRef immediately, use ref for clusterCount, trigger refetch via fetchVersion instead of dependency array 3. Undefined .includes() / .toLowerCase() crashes (9 events): - getStatusSeverity/getStatusColors crashed on undefined status - PodIssues card accessed issue.issues without null guard - Fix: accept null/undefined in status functions, guard array access 4. Maximum call stack exceeded (28 events): - Likely caused by the operator infinite loop cascading - Fixed by the same re-entrancy guard in fix #2 5. Chunk load errors (46 events): - Already handled by ChunkErrorBoundary auto-reload mechanism - 146 successful recoveries tracked in same period Signed-off-by: Andrew Anderson <[email protected]>
…DME (#8207) Fixes #8207 Addresses all 6 Copilot review comments from PR #8203 (security docs bundle). Verified each claim against source before applying: - Verified InitializeProviders (pkg/agent/registry.go:283) registers only CLI-based tool agents and explicitly excludes API-key HTTP providers (claude/openai/gemini/groq/openrouter/open-webui). - Verified update_checker.go lives in pkg/agent/ (local kc-agent), not in the Go backend server pod. - Verified DEV_MODE is read in cmd/kc-agent/main.go:18 while KC_DEV_MODE=1 is only used in pkg/agent/server_http.go:2202 for the backend-driven agent restart path. Changes: 1. README.md (finding #1): The "security model" paragraph no longer claims users can point an OpenAI-compatible local LLM at kc-agent via GROQ_BASE_URL / OPENROUTER_BASE_URL / OPEN_WEBUI_URL today. Reframed as a planned follow-up; currently supported path is the CLI-based agents. 2. SECURITY-MODEL.md §1 data flow (finding #2): Replaced the single-sentence "Key consequence" block with the two-path distinction (CLI tool agents vs direct HTTP providers). Notes that CLI agents can exfiltrate cluster data indirectly via kubectl/helm tool output; direct HTTP providers are not registered at runtime today. 3. SECURITY-MODEL.md §2 Posture B (finding #3): Rewrote the restricted-egress section to match runtime reality. AI gating is by registered CLI agent availability, not by API-key env vars. Setting *_API_KEY does not by itself enable AI. Settings → API Keys modal documented as non-operative. 4. SECURITY-MODEL.md §1 "leaves the cluster" (finding #5): Corrected the update_checker.go reference. The local kc-agent (not the backend pod) performs any GitHub update polling. In-cluster backend deployments do not poll GitHub from the server pod. 5. SECURITY-MODEL.md §3 Local/Self-hosted LLMs (finding #4): Added a prominent "current registration status" subsection stating that Groq/OpenRouter/Open WebUI provider implementations exist but are NOT registered by InitializeProviders. Relabeled the Ollama / vLLM / LM Studio / internal-gateway recipes as "planned follow-up" (not operative today). Base-URL env vars noted as "parsed, not wired". Retained the mermaid diagrams from PR #8206 and framed them as the intended direction. 6. SECURITY-MODEL.md §4 env var cheat sheet (finding #6): Split the KC_DEV_MODE row into two entries — DEV_MODE (general kc-agent dev/logging toggle, read in cmd/kc-agent/main.go) and KC_DEV_MODE (backend-driven restart/dev path in pkg/agent/server_http.go) — so operators don't set the wrong variable. Docs-only change. web build + lint pass. Signed-off-by: Andy Anderson <[email protected]>
…DME (#8207) (#8223) Fixes #8207 Addresses all 6 Copilot review comments from PR #8203 (security docs bundle). Verified each claim against source before applying: - Verified InitializeProviders (pkg/agent/registry.go:283) registers only CLI-based tool agents and explicitly excludes API-key HTTP providers (claude/openai/gemini/groq/openrouter/open-webui). - Verified update_checker.go lives in pkg/agent/ (local kc-agent), not in the Go backend server pod. - Verified DEV_MODE is read in cmd/kc-agent/main.go:18 while KC_DEV_MODE=1 is only used in pkg/agent/server_http.go:2202 for the backend-driven agent restart path. Changes: 1. README.md (finding #1): The "security model" paragraph no longer claims users can point an OpenAI-compatible local LLM at kc-agent via GROQ_BASE_URL / OPENROUTER_BASE_URL / OPEN_WEBUI_URL today. Reframed as a planned follow-up; currently supported path is the CLI-based agents. 2. SECURITY-MODEL.md §1 data flow (finding #2): Replaced the single-sentence "Key consequence" block with the two-path distinction (CLI tool agents vs direct HTTP providers). Notes that CLI agents can exfiltrate cluster data indirectly via kubectl/helm tool output; direct HTTP providers are not registered at runtime today. 3. SECURITY-MODEL.md §2 Posture B (finding #3): Rewrote the restricted-egress section to match runtime reality. AI gating is by registered CLI agent availability, not by API-key env vars. Setting *_API_KEY does not by itself enable AI. Settings → API Keys modal documented as non-operative. 4. SECURITY-MODEL.md §1 "leaves the cluster" (finding #5): Corrected the update_checker.go reference. The local kc-agent (not the backend pod) performs any GitHub update polling. In-cluster backend deployments do not poll GitHub from the server pod. 5. SECURITY-MODEL.md §3 Local/Self-hosted LLMs (finding #4): Added a prominent "current registration status" subsection stating that Groq/OpenRouter/Open WebUI provider implementations exist but are NOT registered by InitializeProviders. Relabeled the Ollama / vLLM / LM Studio / internal-gateway recipes as "planned follow-up" (not operative today). Base-URL env vars noted as "parsed, not wired". Retained the mermaid diagrams from PR #8206 and framed them as the intended direction. 6. SECURITY-MODEL.md §4 env var cheat sheet (finding #6): Split the KC_DEV_MODE row into two entries — DEV_MODE (general kc-agent dev/logging toggle, read in cmd/kc-agent/main.go) and KC_DEV_MODE (backend-driven restart/dev path in pkg/agent/server_http.go) — so operators don't set the wrong variable. Docs-only change. web build + lint pass. Signed-off-by: Andy Anderson <[email protected]>
- Issue #1 (FIXED): Cluster name strict-mode violation — added .first() to lines 91-93 - Issue #2 (INVESTIGATING): Filter tabs not rendering in webkit/firefox tests - Issue #3 (INVESTIGATING): Multiple dashboard-page testid elements cause strict-mode - Triggered targeted Clusters.spec.ts run to validate fix - PR #10782 enabled spec_filter workflow capability Co-authored-by: Copilot <[email protected]> Signed-off-by: Copilot <[email protected]>
…n, type signatures - feedback_config.go: add resolveGitHubUIBase() for GHE-aware web link construction - feedback_github.go: use resolveGitHubUIBase() for SHA commit link (#11177 follow-up) - ComplianceReports.tsx: clear selectedCluster when it's filtered out by reachability (was only auto-set when empty, leaving stale selection pointing to hidden cluster) - ComplianceReports.tsx + ControlPlaneHealth.tsx: fix misleading 'only reachable' comments — predicate c.reachable !== false also includes undefined (not-yet-checked) - dedup.ts: widen shareMetricsBetweenSameServerClusters signature to ClusterInfo[] | null | undefined to match the runtime guard already in the body (#11184 medium) - shared.ts: fix dedup priority comment — reachability is criterion #1, not #2 Co-authored-by: Copilot <[email protected]> Signed-off-by: Copilot <[email protected]>
* 🐛 Fix incorrect assertion in agentFetch 401 retry test Co-authored-by: Copilot <[email protected]> Signed-off-by: Copilot <[email protected]> * test: batch 16 coverage — preflightCheck, useClusterContext, sampleData (#11192) * test: add batch 16 coverage tests for preflightCheck, useClusterContext, sampleData Add 116 tests across 3 files to push line coverage past 90.50%: - preflightCheck-coverage (67 tests): classifyKubectlError, resolveRequiredTools, runToolPreflightCheck - useClusterContext-coverage (17 tests): operator name stripping, helm chart parsing, pod issues - sampleData-coverage (32 tests): field heuristics, detectFieldFormat edge cases Signed-off-by: Andrew Anderson <[email protected]> * fix: change savedCards/sharedDashboards to let for reassignment in resetShareRegistries Signed-off-by: Andrew Anderson <[email protected]> --------- Signed-off-by: Andrew Anderson <[email protected]> * 🐛 Fix medium Copilot comments: GHE commit URL, stale cluster selection, type signatures - feedback_config.go: add resolveGitHubUIBase() for GHE-aware web link construction - feedback_github.go: use resolveGitHubUIBase() for SHA commit link (#11177 follow-up) - ComplianceReports.tsx: clear selectedCluster when it's filtered out by reachability (was only auto-set when empty, leaving stale selection pointing to hidden cluster) - ComplianceReports.tsx + ControlPlaneHealth.tsx: fix misleading 'only reachable' comments — predicate c.reachable !== false also includes undefined (not-yet-checked) - dedup.ts: widen shareMetricsBetweenSameServerClusters signature to ClusterInfo[] | null | undefined to match the runtime guard already in the body (#11184 medium) - shared.ts: fix dedup priority comment — reachability is criterion #1, not #2 Co-authored-by: Copilot <[email protected]> Signed-off-by: Copilot <[email protected]> --------- Signed-off-by: Copilot <[email protected]> Signed-off-by: Andrew Anderson <[email protected]> Co-authored-by: Copilot <[email protected]>
KICK #2 full reviewer pass findings: - Coverage: 89.54% lines (90% badge), target 91%, gap ~1.5pp - CI: Nightly Test Suite GREEN; Playwright/UX Journeys RED (scanner) - Release: 3 cancelled runs (arm64 pre-fix); v0.3.24-nightly.20260503 fresh ✓ - Build+Deploy: all 5 builds passing; vllm-d/pok-prod ✓ on main runs - Helm chart version frozen at 0.0.0 (known gap) - Brew: fresh ✓ Co-authored-by: Copilot <[email protected]> Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com>
- Issue kubestellar#1 (FIXED): Cluster name strict-mode violation — added .first() to lines 91-93 - Issue kubestellar#2 (INVESTIGATING): Filter tabs not rendering in webkit/firefox tests - Issue kubestellar#3 (INVESTIGATING): Multiple dashboard-page testid elements cause strict-mode - Triggered targeted Clusters.spec.ts run to validate fix - PR kubestellar#10782 enabled spec_filter workflow capability Co-authored-by: Copilot <[email protected]> Signed-off-by: Copilot <[email protected]> Signed-off-by: lightyagami2109 <[email protected]>
…1202) * 🐛 Fix incorrect assertion in agentFetch 401 retry test Co-authored-by: Copilot <[email protected]> Signed-off-by: Copilot <[email protected]> * test: batch 16 coverage — preflightCheck, useClusterContext, sampleData (kubestellar#11192) * test: add batch 16 coverage tests for preflightCheck, useClusterContext, sampleData Add 116 tests across 3 files to push line coverage past 90.50%: - preflightCheck-coverage (67 tests): classifyKubectlError, resolveRequiredTools, runToolPreflightCheck - useClusterContext-coverage (17 tests): operator name stripping, helm chart parsing, pod issues - sampleData-coverage (32 tests): field heuristics, detectFieldFormat edge cases Signed-off-by: Andrew Anderson <[email protected]> * fix: change savedCards/sharedDashboards to let for reassignment in resetShareRegistries Signed-off-by: Andrew Anderson <[email protected]> --------- Signed-off-by: Andrew Anderson <[email protected]> * 🐛 Fix medium Copilot comments: GHE commit URL, stale cluster selection, type signatures - feedback_config.go: add resolveGitHubUIBase() for GHE-aware web link construction - feedback_github.go: use resolveGitHubUIBase() for SHA commit link (kubestellar#11177 follow-up) - ComplianceReports.tsx: clear selectedCluster when it's filtered out by reachability (was only auto-set when empty, leaving stale selection pointing to hidden cluster) - ComplianceReports.tsx + ControlPlaneHealth.tsx: fix misleading 'only reachable' comments — predicate c.reachable !== false also includes undefined (not-yet-checked) - dedup.ts: widen shareMetricsBetweenSameServerClusters signature to ClusterInfo[] | null | undefined to match the runtime guard already in the body (kubestellar#11184 medium) - shared.ts: fix dedup priority comment — reachability is criterion kubestellar#1, not kubestellar#2 Co-authored-by: Copilot <[email protected]> Signed-off-by: Copilot <[email protected]> --------- Signed-off-by: Copilot <[email protected]> Signed-off-by: Andrew Anderson <[email protected]> Co-authored-by: Copilot <[email protected]> Signed-off-by: lightyagami2109 <[email protected]>
KICK kubestellar#2 full reviewer pass findings: - Coverage: 89.54% lines (90% badge), target 91%, gap ~1.5pp - CI: Nightly Test Suite GREEN; Playwright/UX Journeys RED (scanner) - Release: 3 cancelled runs (arm64 pre-fix); v0.3.24-nightly.20260503 fresh ✓ - Build+Deploy: all 5 builds passing; vllm-d/pok-prod ✓ on main runs - Helm chart version frozen at 0.0.0 (known gap) - Brew: fresh ✓ Co-authored-by: Copilot <[email protected]> Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com> Signed-off-by: lightyagami2109 <[email protected]>
Summary
kkc-agent- a local agent that runs on user's laptopFeatures
Usage
Architecture
Security
Next Steps
Test plan
🤖 Generated with Claude Code