Skip to content

fix: opencollection format registration on collection import#6735

Merged
bijin-bruno merged 1 commit intousebruno:mainfrom
naman-bruno:fix/yml-import
Jan 7, 2026
Merged

fix: opencollection format registration on collection import#6735
bijin-bruno merged 1 commit intousebruno:mainfrom
naman-bruno:fix/yml-import

Conversation

@naman-bruno
Copy link
Collaborator

@naman-bruno naman-bruno commented Jan 7, 2026

Description

Issue: #6732

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

Summary by CodeRabbit

New Features

  • Collections created or imported now include version information in their configuration, enabling proper format tracking and compatibility.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 7, 2026

Walkthrough

A new opencollection = '1.0.0' property is assigned to the brunoConfig object during YAML serialization in two collection IPC handlers: renderer:create-collection and renderer:import-collection. No functional logic changes occur.

Changes

Cohort / File(s) Summary
YAML Collection Initialization
packages/bruno-electron/src/ipc/collection.js
Injects opencollection = '1.0.0' into brunoConfig before YAML generation in both create-collection and import-collection handlers

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • PR #6322 — Modifies collection YAML serialization in the same file to handle opencollection field parsing and stringify behavior
  • PR #6533 — Changes import/create YAML flow handling in the same IPC collection file for import filename and format processing

Suggested reviewers

  • helloanoop
  • lohit-bruno
  • bijin-bruno

Poem

✨ A version born in YAML's embrace,
1.0.0 finds its rightful place,
Collections open, marked with care,
One simple field, declared with flair! 📦

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding opencollection property registration during YAML collection import operations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

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

🤖 Fix all issues with AI agents
In @packages/bruno-electron/src/ipc/collection.js:
- Around line 936-939: When exporting/importing YAML (format === 'yml') ensure
brunoConfig does not keep a legacy version field: remove brunoConfig.version
(delete the property) before setting brunoConfig.opencollection = '1.0.0' and
calling stringifyCollection(collection.root, brunoConfig, { format }); this
mirrors renderer:create-collection behavior and prevents both version and
opencollection from coexisting.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0b436e2 and 8669d01.

📒 Files selected for processing (1)
  • packages/bruno-electron/src/ipc/collection.js
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation. No tabs, just spaces
Stick to single quotes for strings. For JSX/TSX attributes, use double quotes (e.g., )
Always add semicolons at the end of statements
No trailing commas
Always use parentheses around parameters in arrow functions, even for single params
For multiline constructs, put opening braces on the same line, and ensure consistency. Minimum 2 elements for multiline
No newlines inside function parentheses
Space before and after the arrow in arrow functions. () => {} is good
No space between function name and parentheses. func() not func ()
Semicolons go at the end of the line, not on a new line
Names for functions need to be concise and descriptive
Add in JSDoc comments to add more details to the abstractions if needed
Add in meaningful comments instead of obvious ones where complex code flow is explained properly

Files:

  • packages/bruno-electron/src/ipc/collection.js
🧠 Learnings (2)
📚 Learning: 2025-12-16T07:16:23.647Z
Learnt from: sanish-bruno
Repo: usebruno/bruno PR: 6090
File: tests/scripting/hooks/init-user-data/ui-state-snapshot.json:1-8
Timestamp: 2025-12-16T07:16:23.647Z
Learning: For e2e tests in the bruno repository: Collections that are shared between CLI and UI tests (comprehensive test suites testing core functionality) should be placed in `packages/bruno-tests/` to avoid duplication. The `tests/**/fixtures/collection` pattern should be used for test-specific collections that test particular UI behaviors or are specific to a single test file.

Applied to files:

  • packages/bruno-electron/src/ipc/collection.js
📚 Learning: 2025-12-17T21:41:24.730Z
Learnt from: naman-bruno
Repo: usebruno/bruno PR: 6407
File: packages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.js:5-41
Timestamp: 2025-12-17T21:41:24.730Z
Learning: Do not suggest PropTypes validation for React components in the Bruno codebase. The project does not use PropTypes, so reviews should avoid proposing PropTypes and rely on the existing typing/validation approach (e.g., TypeScript or alternative runtime checks) if applicable. This guideline applies broadly to all JavaScript/JSX components in the repo.

Applied to files:

  • packages/bruno-electron/src/ipc/collection.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: SSL Tests - Linux
  • GitHub Check: SSL Tests - Windows
  • GitHub Check: SSL Tests - macOS
  • GitHub Check: Unit Tests
  • GitHub Check: CLI Tests
  • GitHub Check: Playwright E2E Tests

@bijin-bruno bijin-bruno merged commit 9483dbf into usebruno:main Jan 7, 2026
10 of 11 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Feb 3, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants