Skip to content

Conversation

@MihalyToth20
Copy link
Collaborator

@MihalyToth20 MihalyToth20 commented Nov 11, 2025

Summary by CodeRabbit

  • New Features

    • Added support for JavaScript and JSON test configuration files for advanced assertions.
    • Improved internal documentation generation with better path handling and link resolution.
  • Bug Fixes

    • Fixed minor issues in internal documentation generation.
  • Chores

    • Updated release workflow configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 11, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Two changesets document package updates including a feature for processing JavaScript and JSON testconfig files and internal documentation fixes. Updated release workflow to ignore CodeRabbit outputs. Enhanced test configuration loading in CLI. Refactored documentation link and path resolution with new helper functions for cleaner path handling.

Changes

Cohort / File(s) Summary
Changesets
.changeset/brown-pugs-add.md, .changeset/salty-parrots-matter.md
Document patch bumps for @calycode/core and @calycode/cli with fix notes for internal documentation generation; minor version bump for @calycode/cli with feature for processing JS/JSON testconfig files.
Release Workflow
.github/workflows/release.yml
Updated publish step title to include ignore tag; removed changesets logging and docs upload workflow steps.
CLI Test Configuration
packages/cli/src/commands/test/implementation/test.ts
Added node:path import; introduced loadTestConfig helper function to load test configuration from .json, .js, or .ts files; replaced direct config reading with helper call.
Core Documentation Link Resolution
packages/core/src/features/internal-docs/index.ts, packages/core/src/implementations/generate-internal-docs.ts
Introduced removeLeadingSrc helper to strip leading "./" or "src/" prefixes; added getParentDir helper to extract parent directories; expanded fixMarkdownLinks signature to accept current_path parameter; updated folder README path generation and link resolution logic for consistent path handling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • File diversity: Changes span multiple domains (changesets, CI/CD, CLI, and core documentation logic) requiring separate reasoning contexts.
  • Logic complexity: Path manipulation and link resolution in core documentation involves multiple helper functions with conditional logic; moderate cognitive load.
  • Areas requiring attention:
    • Verify loadTestConfig error handling for unsupported file types and edge cases (e.g., missing files, invalid JSON/JS).
    • Ensure fixMarkdownLinks signature updates are propagated correctly across all call sites; check for any missed invocations.
    • Validate that removeLeadingSrc and getParentDir handle edge cases (empty strings, trailing slashes, absolute paths).
    • Confirm workflow changes don't unintentionally suppress important CI/CD signals.

Poem

🐰 A rabbit hops through paths anew,
Helper functions, clean and true!
Links resolved with care so fine,
Config files in harmony align,
Documentation dances in the light! 🌟

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main feature addition of supporting .js test config files for custom assertions, which is central to the changeset.

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ad3b969 and dc47f47.

📒 Files selected for processing (6)
  • .changeset/brown-pugs-add.md (1 hunks)
  • .changeset/salty-parrots-matter.md (1 hunks)
  • .github/workflows/release.yml (1 hunks)
  • packages/cli/src/commands/test/implementation/test.ts (3 hunks)
  • packages/core/src/features/internal-docs/index.ts (4 hunks)
  • packages/core/src/implementations/generate-internal-docs.ts (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
packages/cli/src/commands/test/implementation/test.ts (1)
packages/cli/src/node-config-storage.ts (1)
  • readFile (269-271)
🔍 Remote MCP DeepWiki

Summary of Relevant Context for PR Review

Based on my research of the repository, here are the key insights for reviewing this PR:

Test Configuration Enhancement

The current test configuration system loads JSON files specified via the --test-config-path option, parsing them with JSON.parse() to define API endpoints, methods, headers, query parameters, request bodies, and custom assertions.

PR Impact: This PR extends that capability by allowing .js and .ts test config files (per the AI summary), enabling developers to programmatically define test configurations and implement custom assertions through JavaScript modules rather than static JSON. This is a significant feature enhancement that aligns with the changeset entry referencing "processing JavaScript and JSON testconfig files to enable advanced assertions."

Internal Documentation Generation Changes

The internal documentation generation creates Docsify-powered documentation by transforming workspace schema into browsable sites, with fixMarkdownLinks handling path normalization and ensuring README.md references resolve correctly with trailing slashes for Docsify directory-based navigation.

PR Impact: The changes to path handling (removeLeadingSrc, adjusting folder README paths) and link generation appear to fix inconsistencies in how documentation paths are resolved, particularly for folder-level README files. This aligns with the "minor fixes for the internal documentation generation" mentioned in the first changeset.

Release Workflow Changes

The Release workflow publishes packages to npm via the Changesets action and conditionally uploads documentation to GCP Storage only if packages were successfully published.

PR Impact: Removing the "Log Changesets outputs" and "Upload docs" steps (with the publish step now tagged with [@coderabbitai ignore]) suggests a deliberate shift—likely to streamline the workflow or move documentation updates to a separate process. This warrants verification that documentation deployment isn't impacted or that an alternative mechanism is in place.

🔇 Additional comments (10)
.changeset/salty-parrots-matter.md (1)

1-5: LGTM!

The changeset entry correctly documents the new feature with an appropriate minor version bump for the CLI package.

.github/workflows/release.yml (1)

49-49: LGTM!

The addition of the [@coderabbitai ignore] tag to the release step title is appropriate for excluding automated review of release PRs.

.changeset/brown-pugs-add.md (1)

1-6: LGTM!

The changeset entry correctly documents the internal documentation fixes with appropriate patch version bumps.

packages/cli/src/commands/test/implementation/test.ts (2)

2-2: LGTM!

The path import is correctly added to support the new test config loading functionality.


103-103: LGTM!

The integration of loadTestConfig into the test execution flow is correct, with proper await usage.

packages/core/src/features/internal-docs/index.ts (2)

217-219: LGTM!

The removeLeadingSrc helper correctly normalizes various path formats by stripping leading src/ prefixes, which is essential for consistent documentation path resolution.


242-242: LGTM!

The path normalization using removeLeadingSrc and the formatting improvement (added newline before "## Contents:") enhance the consistency and readability of generated folder documentation.

Also applies to: 260-262

packages/core/src/implementations/generate-internal-docs.ts (3)

26-33: LGTM!

The getParentDir helper correctly extracts the parent directory from a path, properly handling trailing slashes and edge cases.


42-77: LGTM!

The enhanced fixMarkdownLinks function now properly resolves relative links using the current file's context. The improved README.md handling ensures correct Docsify navigation with appropriate trailing slashes.


122-122: LGTM!

The updated function call correctly passes item.path to enable context-aware relative link resolution in the markdown content.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 11, 2025

Note

Docstrings generation - SUCCESS
Generated docstrings for this pull request at #168

Docstrings generation was requested by @MihalyToth20.

* #167 (comment)

The following files were modified:

* `packages/cli/src/commands/test/implementation/test.ts`
* `packages/core/src/features/internal-docs/index.ts`
* `packages/core/src/implementations/generate-internal-docs.ts`
@MihalyToth20 MihalyToth20 merged commit 3e1306e into main Nov 11, 2025
2 checks passed
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