Conversation
WalkthroughCentralized Changes
Sequence Diagram(s)sequenceDiagram
participant UI as CreateCollection UI
participant App as Renderer (App)
participant IPC as Electron IPC
participant Filestore as `@usebruno/filestore`
participant Worker as Filestore Worker
UI->>App: user selects format / creates collection (uses DEFAULT_COLLECTION_FORMAT)
App->>IPC: send create/import collection (format default from constant)
IPC->>Filestore: invoke parse/stringify with format (DEFAULT_COLLECTION_FORMAT)
Filestore->>Worker: enqueueTask / parseRequest (format forwarded)
Worker-->>Filestore: parsed/stringified payload
Filestore-->>IPC: result
IPC-->>App: result
App-->>UI: show success/failure
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
bijin-bruno
left a comment
There was a problem hiding this comment.
@naman-bruno
I think we have to handle additional places like
- import collection
- in several places in codease, we have format defaults to
'bru'. Let's put this as a constant at a common place and use in those places.
etc
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/bruno-electron/src/utils/parse.js (1)
3-10:⚠️ Potential issue | 🟡 MinorUpdate JSDoc to match the new default format.
The comment still says the default is
'bru', but the function now defaults toDEFAULT_COLLECTION_FORMAT('yml').📝 Suggested doc fix
- * `@param` {string} format - Collection format, defaults to 'bru' + * `@param` {string} format - Collection format, defaults to DEFAULT_COLLECTION_FORMAT ('yml')
🤖 Fix all issues with AI agents
In `@packages/bruno-filestore/src/index.ts`:
- Around line 41-46: The default format constant DEFAULT_COLLECTION_FORMAT is
'yml' but parseRequestAndRedactBody only accepts 'bru', causing an error when no
format is passed; update the default to 'bru' so the function's default matches
supported formats. Locate the DEFAULT_COLLECTION_FORMAT definition and change
its value to 'bru' (or alternatively change the function signature/default
options for parseRequestAndRedactBody to use { format: 'bru' }) so
parseRequestAndRedactBody(content, options?) will use 'bru' by default and call
bruRequestParseAndRedactBodyData without throwing.
🧹 Nitpick comments (1)
packages/bruno-app/src/components/Sidebar/CreateCollection/index.js (1)
94-106: Add a brief JSDoc forAdvancedOptions.It’s a new abstraction; a short doc comment clarifies intent and props usage.
As per coding guidelines: Add JSDoc comments to abstractions for additional details.✍️ Suggested JSDoc
- const AdvancedOptions = forwardRef((props, ref) => { + /** + * Advanced options dropdown trigger for the Create Collection dialog. + */ + const AdvancedOptions = forwardRef((props, ref) => {
| @@ -1,5 +1,7 @@ | |||
| export type CollectionFormat = 'bru' | 'yml'; | |||
|
|
|||
| export const DEFAULT_COLLECTION_FORMAT: CollectionFormat = 'yml'; | |||
There was a problem hiding this comment.
Since this is not a type, I think we should move DEFAULT_COLLECTION_FORMAT to ./constants.ts
Description
Contribution Checklist:
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
UI Updates
Changes