Skip to content

[scanner] fix: resolve button and action consistency issues - #22398

Open
kubestellar-hive[bot] wants to merge 9 commits into
mainfrom
scanner/fix-22394
Open

[scanner] fix: resolve button and action consistency issues#22398
kubestellar-hive[bot] wants to merge 9 commits into
mainfrom
scanner/fix-22394

Conversation

@kubestellar-hive

Copy link
Copy Markdown
Contributor

Fixes #22394

Replace no-op <button> elements in the GitOps integration info panel with proper <a> links pointing to ArgoCD and Flux official documentation.

Problem

The GitOpsIntegrationInfo component rendered two <button> elements ("Configure ArgoCD" and "Configure Flux") with no onClick handler and no type attribute. These buttons were non-functional UI elements that:

  • Triggered the Auto-QA button/action consistency check (Layer 5)
  • Had no accessible action when clicked
  • Defaulted to type="submit" (browser default), which is incorrect for non-form buttons

Fix

  • Replace raw <button> elements with <a href> links to official documentation
  • Add named constants ARGOCD_DOCS_URL and FLUX_DOCS_URL (no magic strings)
  • Add ExternalLink icon to signal external navigation
  • Use target="_blank" rel="noopener noreferrer" for security

— hive: agent=scanner backend=copilot model=auto

Replace no-op <button> elements in GitOps integration info panel with
proper <a> links to ArgoCD and Flux documentation. The buttons had no
onClick handlers and no type attribute, making them non-functional UI
elements that triggered the Auto-QA button/action consistency check.

Changes:
- Add ARGOCD_DOCS_URL and FLUX_DOCS_URL named constants
- Convert <button> to <a href> with target=_blank and rel=noopener
- Add ExternalLink icon to signal external navigation
- Import ExternalLink from lucide-react

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Scanner <scanner@kubestellar.io>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Aug 11, 2026
@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit 46764d5
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6a7b297eae7a750008369fbf
😎 Deploy Preview https://deploy-preview-22398.console-deploy-preview.kubestellar.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mikespreitzer for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions github-actions Bot added the ai-generated Pull request generated by AI label Aug 11, 2026
@kubestellar-prow kubestellar-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@github-actions

Copy link
Copy Markdown
Contributor

Auto Test Generator

The following new files have no corresponding test file:

  • web/src/components/gitops/GitOps.parts.tsx

Please add tests or apply the needs-tests label to track this PR.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Test Coverage Check

All new source files in this PR have corresponding test files.

Checked web/src/hooks/ and web/src/components/ against origin/main.

@github-actions

Copy link
Copy Markdown
Contributor

♿ Accessibility Audit (WCAG 2.1 AA)

✅ No WCAG 2.1 AA violations detected in audited routes.


Powered by axe-core. Target: WCAG 2.1 AA compliance.

@github-actions

Copy link
Copy Markdown
Contributor

❌ Playwright Tests Failed

📊 View Full Report

Download the playwright-report artifact from the workflow run for screenshots and detailed traces.

To view the report locally:

# Download and extract playwright-report.zip
npx playwright show-report path/to/playwright-report

kubestellar-hive Bot and others added 8 commits August 11, 2026 09:53
… (#22381)

Second follow-up to #22377/#22379 (CardLayout sibling primitives).
Adds dedicated unit tests for two more card-layout primitives that
are consumed by many card components but had no direct coverage:

- CardListItem: children rendering; default vs. success/warning/
  error/info variant classes; bgClass/borderClass overrides win;
  no button semantics when onClick is absent; role='button',
  tabindex, cursor-pointer when onClick is present; click fires
  emitCardListItemClicked + onClick; Enter/Space activate,
  unrelated keys are ignored; chevron appears only when clickable
  and showChevron is not false; title and data-tour forwarding.
- CardControlsRow: empty row with canonical layout classes; custom
  className merge; each section (clusterIndicator, clusterFilter,
  cardControls, extra) renders only when its prop is provided;
  prop forwarding to CardClusterIndicator, CardClusterFilter and
  CardControls UI; documented render order.

Every consumer test (AlertRules, AppStatus, ArgoCDApplications,
ArgoCDApplicationSets, ActiveAlerts, AgenticDetectionRuns, ...)
currently redeclares its own vi.mock() stub for these primitives.
These dedicated tests give a single source of truth so a silent
regression to the canonical Tailwind classes or to the click/
keyboard/analytics behaviour is now caught.

Fixes #22379

Signed-off-by: kubestellar-hive[bot] <223556219+Copilot@users.noreply.github.com>
Co-authored-by: kubestellar-hive[bot] <223556219+Copilot@users.noreply.github.com>
…22376)

Adds docs/hive-advisory-report.md to explain the purpose of the living
advisory report issue, how advisory-only agents work, how the governor
posts digest comments, and what contributors should do with findings.

Fixes #22335

Signed-off-by: kubestellar-hive[bot] <280983584+kubestellar-hive[bot]@users.noreply.github.com>
Co-authored-by: kubestellar-hive[bot] <280983584+kubestellar-hive[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add comprehensive test coverage for three uncovered hooks:
- useCachedEPPStatus: pure function tests (summarizeEPPStatus, getDemoEPPStatus),
  fetcher tests (filtering, error propagation), and hook tests (isDemoData
  suppression during loading, field forwarding)
- useCachedModelEndpointHealth: pure function tests (summarizeModelEndpointHealth
  covering all health states and replica counting), fetcher tests, hook tests
  (isDemoFallback suppression, field forwarding)
- useDrillDown.actions: behavioral tests for all Phase 2 actions (GitOps, policy/
  compliance, alerting, cost/RBAC/operator), additional Phase 1 resource actions,
  and all multi-cluster summary actions; also tests normalizeComplianceFilterStatus
  via drillToCompliance (passing→pass, failing→fail, warning/skipped→other)

88 new tests, all passing.

Signed-off-by: scanner <scanner@kubestellar.io>
Co-authored-by: scanner <scanner@kubestellar.io>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…y} (#22389)

Adds unit tests for three Drasi hooks that were missing coverage
as identified in the web/src/hooks/ audit follow-up to #22383.
Each test verifies the createCachedHook factory wiring, the
isDemoData alias (mapped from isDemoFallback), loading state,
and data shape.

Fixes #22384

Signed-off-by: Scanner <scanner@kubestellar.io>
Co-authored-by: Scanner <scanner@kubestellar.io>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rebases PR #22345 onto main, resolving the merge conflict by merging
the 2026-08-09 daily auto-qa-tuner update with main's 2026-08-08 data.

- Updated last_updated to 2026-08-09T03:31:41Z
- Updated operator category: merged 827->834
- Updated sre category: merged 543->548
- Added 2026-08-09 history entry

Fixes #22345

Signed-off-by: Scanner <scanner@kubestellar.io>
Co-authored-by: Scanner <scanner@kubestellar.io>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds table-driven tests for previously untested pure functions in
pkg/api/handlers/gitops/drift.go:

- extractYAMLParseError: 11 cases covering nil, non-yaml, and every
  yaml marker
- detectKubectlErrors: 7 cases (empty, no errors, error keyword,
  forbidden, multiple, case-insensitive, admission webhook)
- getString: 5 cases (present, wrong type, nil, empty, missing)
- validateHelmVersion: 9 cases (semver, prerelease, build metadata,
  leading dash, space, shell metacharacter, path traversal char)
- validateBranchName: 9 cases (simple, slash, dot, leading dash,
  double dot, space, shell metacharacter, tilde)

Coverage: pkg/api/handlers/gitops 30.5% → 34.4%.

Fixes #22391

Signed-off-by: quality-bot <quality@hive.local>
Co-authored-by: quality-bot <quality@hive.local>
… advisory #22387) (#22399)

Add comprehensive unit tests for 6 previously uncovered HTTP handlers in
pkg/api/handlers/stellar:

  - ListActions  — empty list, pagination fields, status filter
  - CreateAction — success path, missing description/cluster/actionType,
                   invalid JSON, invalid scheduledAt, notification side-effect
  - GetAction    — returns created action, 404 for unknown ID
  - ApproveAction — non-destructive success, conflict on double-approve, 404
  - RejectAction  — success with reason, success with empty reason,
                    ActionRejected notification side-effect
  - DeleteAction  — 204 on existing action, subsequent GET returns 404

Each test uses an isolated SQLite database via newActionsCRUDTestApp so tests
are hermetic and parallelisable.

Addresses advisory finding: pkg/api/handlers/stellar/actions.go — 8 of 9
handlers at 0% test coverage (quality agent, issue #22387).

Signed-off-by: Scanner <scanner@kubestellar.io>
Co-authored-by: Scanner <scanner@kubestellar.io>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace empty onClick={() => {}} no-op handlers in CardListItem tests
with vi.fn() mocks, consistent with the pattern used throughout the
test file. This resolves the Auto-QA button/action consistency check
that flagged these as no-op button handlers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Scanner <scanner@kubestellar.io>
@kubestellar-prow kubestellar-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 11, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

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.

@kubestellar-prow kubestellar-prow Bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated Pull request generated by AI dco-signoff: yes Indicates the PR's author has signed the DCO. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. scanner-checks-failing size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. tier/2-standard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Auto-QA] Button and action consistency issues

0 participants