Conversation
WalkthroughThe PR adds tag persistence by dispatching Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (4)
packages/bruno-app/src/components/RequestTabs/index.js (1)
172-189: Cursor affordance change looks goodAdding
cursor-pointerto the plus-tab container improves the click affordance and doesn’t affect existing behavior or tests relying on.short-tab.tests/utils/page/locators.ts (1)
78-81: Centralized tag locators are consistent and usefulThe new
tagsgroup (input()anditem(tagName)) is consistent with other locator groups and will simplify tag‑related tests. This aligns well with the move toward shared locator utilities.tests/collection/moving-requests/tag-persistence.spec.ts (2)
11-71: First tag persistence test correctly leverages shared locators
- Using
buildCommonLocators(page)pluslocators.plusMenu,locators.modal,locators.sidebar,locators.tabs, andlocators.tagsmakes the flow much easier to follow and less brittle than raw selectors.- The final check
await expect(locators.tags.item('smoke')).toBeVisible()after selecting the Settings tab is a clear assertion that tags persist after intra‑collection reordering.You might later consider replacing
page.waitForTimeout(...)calls here with explicit waits on the relevant elements (e.g., active tab or tag input) to reduce timing sensitivity, but the current behavior is acceptable for now.
73-162: Folder move tag persistence test matches new locator patterns
- The test now consistently uses
buildCommonLocators(page)for collections, folders, requests, and modals, which aligns well with the shared locator utilities and reduces selector duplication.- Tag interactions via
locators.tags.input()andlocators.tags.item('smoke')clearly validate that the tag is created, saved, and still present after draggingrequest-2fromfolder-1tofolder-2.- Waiting for
locators.tabs.requestTab('request-2')before asserting on the tag is a good guard against race conditions when switching the active request.As with the first test, some of the short
waitForTimeoutcalls could eventually be replaced with explicit expectations on specific locators to make the test less timing-based, but that’s an incremental improvement rather than a blocker.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
packages/bruno-app/src/components/RequestPane/Settings/Tags/index.js(3 hunks)packages/bruno-app/src/components/RequestTabs/index.js(1 hunks)tests/collection/moving-requests/tag-persistence.spec.ts(3 hunks)tests/utils/page/actions.ts(1 hunks)tests/utils/page/locators.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{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()notfunc ()
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-app/src/components/RequestTabs/index.jstests/utils/page/actions.tstests/utils/page/locators.tstests/collection/moving-requests/tag-persistence.spec.tspackages/bruno-app/src/components/RequestPane/Settings/Tags/index.js
tests/**/**.*
⚙️ CodeRabbit configuration file
tests/**/**.*: Review the following e2e test code written using the Playwright test library. Ensure that:
Follow best practices for Playwright code and e2e automation
Try to reduce usage of
page.waitForTimeout();in code unless absolutely necessary and the locator cannot be found using existingexpect()playwright callsAvoid using
page.pause()in codeUse locator variables for locators
Avoid using test.only
Use multiple assertions
Promote the use of
test.stepas much as possible so the generated reports are easier to readEnsure that the
fixtureslike the collections are nested inside thefixturesfolderFixture Example*: Here's an example of possible fixture and test pair
. ├── fixtures │ └── collection │ ├── base.bru │ ├── bruno.json │ ├── collection.bru │ ├── ws-test-request-with-headers.bru │ ├── ws-test-request-with-subproto.bru │ └── ws-test-request.bru ├── connection.spec.ts # <- Depends on the collection in ./fixtures/collection ├── headers.spec.ts ├── persistence.spec.ts ├── variable-interpolation │ ├── fixtures │ │ └── collection │ │ ├── environments │ │ ├── bruno.json │ │ └── ws-interpolation-test.bru │ ├── init-user-data │ └── variable-interpolation.spec.ts # <- Depends on the collection in ./variable-interpolation/fixtures/collection └── subproto.spec.ts
Files:
tests/utils/page/actions.tstests/utils/page/locators.tstests/collection/moving-requests/tag-persistence.spec.ts
🧠 Learnings (2)
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Use consistent patterns and helper utilities where they improve clarity. Prefer shared test utilities over copy-pasted setup code, but only when it actually reduces complexity
Applied to files:
tests/collection/moving-requests/tag-persistence.spec.ts
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.test.{js,jsx,ts,tsx} : Add tests for any new functionality or meaningful changes. If code is added, removed, or significantly modified, corresponding tests should be updated or created
Applied to files:
tests/collection/moving-requests/tag-persistence.spec.ts
🧬 Code graph analysis (1)
tests/collection/moving-requests/tag-persistence.spec.ts (2)
tests/utils/page/locators.ts (1)
buildCommonLocators(3-106)tests/utils/page/actions.ts (1)
selectRequestPaneTab(715-715)
⏰ 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 - macOS
- GitHub Check: SSL Tests - Windows
- GitHub Check: Unit Tests
- GitHub Check: SSL Tests - Linux
- GitHub Check: Playwright E2E Tests
- GitHub Check: CLI Tests
🔇 Additional comments (2)
tests/utils/page/actions.ts (1)
146-151: Shorter toast wait is reasonableReducing the toast visibility timeout to 2000 ms keeps this as a best‑effort synchronization point (thanks to the
.catch) while trimming unnecessary idle time when the toast is missing or already gone.packages/bruno-app/src/components/RequestPane/Settings/Tags/index.js (1)
20-43: Tag add/remove now correctly mark the tab as permanentDispatching
makeTabPermanent({ uid: item.uid })after bothaddRequestTag(only when a new tag is added) anddeleteRequestTagensures any tag edits mark the tab as permanent, which aligns with the tag persistence behavior. TheuseCallbackdependency arrays remain valid with the new usage.
Description
Fix failing tests for tag persistence
Jira
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
Release Notes
Bug Fixes
User Interface
Tests & Infrastructure
✏️ Tip: You can customize this high-level summary in your review settings.