Skip to content

fix: remaining CodeRabbit + SonarCloud review issues - #624

Merged
alfredo1996 merged 1 commit into
release/2.0from
fix/remaining-review-issues
Apr 27, 2026
Merged

fix: remaining CodeRabbit + SonarCloud review issues#624
alfredo1996 merged 1 commit into
release/2.0from
fix/remaining-review-issues

Conversation

@alfredo1996

@alfredo1996 alfredo1996 commented Apr 27, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes all remaining CodeRabbit and SonarCloud findings from merged PRs.

Fixes

Source File Issue Fix
CodeRabbit #615 plugins/index.ts KNOWN_CONNECTORS hardcoded Import from @neoboard/connection CONNECTOR_TYPES
CodeRabbit #615 connector-plugin.ts Duplicate-key check leaks undefined continue on invalid field before duplicate check
CodeRabbit #613 circle-packing-chart.tsx hierarchy.sum() double-counts parents Only sum leaf nodes (no children)
SonarCloud #615 manifest.ts Math.random() security hotspot Replace with crypto.randomUUID()

Test plan

  • App: 167/167 (2224 tests)
  • CLI: 22/22 (186 tests)
  • Component: 83/83 (1259 tests)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Fixed circle packing chart layout calculations to properly weight leaf and internal nodes for accurate circle sizing
    • Plugin form field validation now correctly handles invalid form field entries
  • Improvements

    • Enhanced connector compatibility validation by using standardized connector types

CodeRabbit fixes:
- plugins/index.ts: KNOWN_CONNECTORS reads from @neoboard/connection
  CONNECTOR_TYPES instead of hardcoded array
- connector-plugin.ts: skip duplicate-key check when field.key is
  falsy (prevents misleading "duplicate undefined" warning)
- circle-packing-chart.tsx: hierarchy.sum() only counts leaf nodes
  (prevents double-counting parent values)

SonarCloud fix:
- manifest.ts: replace Math.random() with crypto.randomUUID() for
  temp file naming (resolves security hotspot)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alfredo1996
alfredo1996 merged commit 882295b into release/2.0 Apr 27, 2026
@coderabbitai

coderabbitai Bot commented Apr 27, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d56a59cc-4188-4665-8955-29cfd48ea710

📥 Commits

Reviewing files that changed from the base of the PR and between ed05b64 and 24d5d96.

📒 Files selected for processing (4)
  • app/src/plugins/index.ts
  • cli/src/lib/manifest.ts
  • component/src/charts/circle-packing-chart.tsx
  • connection/src/generalized/connector-plugin.ts

Walkthrough

Updated connector type validation to use canonical CONNECTOR_TYPES from the connection package, modified temporary manifest file naming to use UUID generation, adjusted circle packing node weighting logic, and added validation short-circuiting for malformed connector form fields.

Changes

Cohort / File(s) Summary
Connector & Plugin Validation
app/src/plugins/index.ts, connection/src/generalized/connector-plugin.ts
Sourced compatibleWith validation against canonical CONNECTOR_TYPES instead of hardcoded set; added early loop continuation for malformed formFields entries (missing key, label, or type) to prevent downstream duplicate-key checks.
Manifest Write Flow
cli/src/lib/manifest.ts
Replaced composite timestamp/random string with randomUUID() for generating temporary write filenames in atomicWriteJson.
Circle Packing Chart
component/src/charts/circle-packing-chart.tsx
Adjusted node weighting: internal nodes with children assigned weight 0, leaf nodes continue using d.value ?? 0, altering computed hierarchy values for circle radius derivation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

bug, pkg:app, pkg:component

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/remaining-review-issues

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants