Skip to content

fix: handle ellipsis folder names during Postman import - #8846

Closed
Ms-Kulkarni wants to merge 1 commit into
usebruno:mainfrom
Ms-Kulkarni:fix/ellipsis-import-issue-8845
Closed

Ms-Kulkarni wants to merge 1 commit into
usebruno:mainfrom
Ms-Kulkarni:fix/ellipsis-import-issue-8845

Conversation

@Ms-Kulkarni

@Ms-Kulkarni Ms-Kulkarni commented Aug 2, 2026 •

Copy link
Copy Markdown

Description

This PR fixes the Postman import issue where folders named ... (ellipsis) cause structural corruption in Bruno's collection tree. The fix replaces ... with _ during the sanitization process, ensuring proper folder naming and preserving the collection structure.

Problem

When importing a Postman collection that contains folders named ..., Bruno mishandles these folders, causing:

  • Folders to appear in incorrect parent-child relationships
  • Structural corruption in the collection tree
  • Confusion for users migrating from Postman

Fix #8845

The sanitizeName function in filesystem.js has been updated to replace ... with _ (underscore) during the import process:

Screenshots

| Before
brunofile

| After |
630227609-7d685c74-2484-4a43-80b7-0f6cf9813ae8.png

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.
  • I've run the claude code review skill locally.

Summary by CodeRabbit

  • Bug Fixes
    • Improved name sanitization by safely handling sequences of consecutive periods.
    • Preserved existing cleanup for invalid characters, whitespace, hyphens, and trailing punctuation.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The filesystem name sanitizer now replaces ... sequences with _ before applying existing cleanup rules.

Changes

Name sanitization

Layer / File(s) Summary
Normalize ellipsis names
packages/bruno-electron/src/utils/filesystem.js
sanitizeName replaces each ... sequence with _ before existing invalid-character, whitespace, hyphen, and trailing punctuation cleanup.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested reviewers: bijin-bruno

Poem

Ellipses meet the name guard,
Three small dots become one mark.
Cleanup follows, neat and bright,
Filesystem names now align right.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The change sanitizes ... folder names during import, addressing the collection-tree corruption reported in issue #8845.
Out of Scope Changes check ✅ Passed The change is limited to the requested sanitizeName behavior and contains no unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the fix for ellipsis folder names during Postman import.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
packages/bruno-electron/src/utils/filesystem.js (1)

244-244: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add regression coverage for ellipsis names.

Line 244 changes the sanitizer contract, but the adjacent packages/bruno-electron/src/utils/filesystem.test.js suite does not test this behavior. Add cases for an exact ... name and an embedded sequence such as parent...child.

Proposed test
+  it('should replace ellipsis sequences with underscores', () => {
+    expect(sanitizeName('...')).toEqual('_');
+    expect(sanitizeName('parent...child')).toEqual('parent_child');
+  });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/bruno-electron/src/utils/filesystem.js` at line 244, Add regression
cases in the filesystem sanitizer tests for an exact "..." name and an embedded
"parent...child" sequence, asserting both are sanitized to underscores according
to the replacement in the name-sanitization logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@packages/bruno-electron/src/utils/filesystem.js`:
- Line 244: Add regression cases in the filesystem sanitizer tests for an exact
"..." name and an embedded "parent...child" sequence, asserting both are
sanitized to underscores according to the replacement in the name-sanitization
logic.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d32b3e02-0d35-4387-948c-9c0e8307dd90

📥 Commits

Reviewing files that changed from the base of the PR and between 2b2512e and a0c8637.

📒 Files selected for processing (1)
  • packages/bruno-electron/src/utils/filesystem.js

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a0c8637136

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


const sanitizeName = (name) => {
const invalidCharacters = /[<>:"/\\|?*\x00-\x1F]/g;
name = name.replace(/\.\.\./g, '_');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Limit ellipsis rewrite to empty path segments

When importing a Postman collection with sibling items such as api...v1 and api_v1, this global replacement maps both names to api_v1. Embedded periods were already safe because only trailing dots are stripped below, and the import paths use the sanitized name directly when creating folders/files, so this can turn previously distinct folders or requests into the same filesystem path and merge or overwrite their contents. Restrict the special case to names that would otherwise sanitize to empty, such as exactly ..., or deduplicate after sanitization.

Useful? React with 👍 / 👎.

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.

Problematic import of Postman collections with inner directories named ellipsis (...)

1 participant