Skip to content

Conversation

@jhaynie
Copy link
Member

@jhaynie jhaynie commented Jun 24, 2025

Summary by CodeRabbit

  • New Features

    • Files named biome.json are now automatically ignored by default during relevant operations.
  • Improvements

    • The application now avoids clearing the screen and displaying the logo in non-interactive or non-terminal environments, improving compatibility with automated workflows.
  • Bug Fixes

    • Adjusted ignore rules handling to ensure project-specific ignore patterns can be conditionally skipped or included as needed.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 24, 2025

Walkthrough

The changes introduce a boolean parameter to the createProjectIgnoreRules function to optionally skip adding project-specific ignore rules. The function is updated in both cloud and dev command files to use this new parameter. Additionally, a new default ignore pattern for biome.json files is added, and logo display is now conditional on terminal presence.

Changes

File(s) Change Summary
cmd/cloud.go, cmd/dev.go Updated calls to createProjectIgnoreRules to use new boolean parameter for skipping project ignores.
cmd/cloud.go Modified createProjectIgnoreRules to accept a skipProjectIgnore parameter and adjust logic accordingly.
internal/ignore/rules.go Added "**/biome.json" to default ignore rules in AddDefaults().
cmd/root.go Made logo display and screen clearing conditional on terminal (TTY) presence.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI
    participant Project
    participant IgnoreRules

    User->>CLI: Run dev or cloud command
    CLI->>Project: Load project config
    CLI->>IgnoreRules: createProjectIgnoreRules(dir, project, skipProjectIgnore)
    alt skipProjectIgnore is true
        IgnoreRules-->>CLI: Return rules with defaults and .gitignore only
    else skipProjectIgnore is false
        IgnoreRules->>Project: Get project-specific ignore rules
        IgnoreRules-->>CLI: Return rules with defaults, .gitignore, and project-specific ignores
    end
    CLI->>User: Continue deploy/dev workflow
Loading

Possibly related PRs

  • Add additional ignore rule defaults #357: Both PRs modify the AddDefaults() method in internal/ignore/rules.go to update the default ignore patterns, directly relating their changes at the code level.
  • Fixes for hot reload #376: The current PR extends the createProjectIgnoreRules function introduced in this PR by adding a boolean parameter to control project-specific ignore rule inclusion.

Poem

A hop and a skip through the code we go,
Now biome.json is hidden below.
With flags for ignores, the logic is neat—
Only show the logo if TTY’s complete!
Rabbits love tidy, so rules we refine,
In the warren of code, everything’s fine! 🐇


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0c54009 and b72181c.

📒 Files selected for processing (4)
  • cmd/cloud.go (3 hunks)
  • cmd/dev.go (1 hunks)
  • cmd/root.go (1 hunks)
  • internal/ignore/rules.go (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Build and Test (macos-latest)
  • GitHub Check: Test CLI Upgrade Path (windows-latest)
  • GitHub Check: Analyze (go)
🔇 Additional comments (6)
internal/ignore/rules.go (1)

95-95: LGTM! Good addition to default ignore patterns.

Adding biome.json to default ignore rules makes sense as these configuration files typically don't require hot reload triggers during development.

cmd/root.go (1)

173-176: LGTM! Proper TTY detection improves CLI behavior.

Conditionally displaying the logo and clearing the screen only when a TTY is present prevents visual artifacts in non-interactive environments like CI/CD pipelines.

cmd/dev.go (1)

210-210: Key fix for hot reload regression.

Passing true to skip project-specific ignore rules in dev mode allows the file watcher to monitor files that might have been incorrectly ignored, fixing the hot reload functionality for new bun/node templates.

cmd/cloud.go (3)

130-130: Function signature updated with clear parameter name.

The skipProjectIgnore parameter clearly indicates its purpose and allows different ignore rule behavior between dev and cloud contexts.


144-146: Clean early return logic for conditional behavior.

The early return when skipProjectIgnore is true provides a clean separation between base ignore rules (.gitignore + defaults) and project-specific rules.


476-476: Maintains existing cloud deployment behavior.

Passing false ensures cloud deployments continue to use project-specific ignore rules, preserving the existing deployment behavior while allowing dev mode to be more permissive.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in Comment
  • Commit Unit Tests in branch fix-devmode-hotreload

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@jhaynie jhaynie merged commit bd9984a into main Jun 24, 2025
14 checks passed
@jhaynie jhaynie deleted the fix-devmode-hotreload branch June 24, 2025 01:34
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