Repository navigation
fix(variables): show folder scope for folder vars used in folder settings - #9679
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Folder scope lookup packages/bruno-app/src/utils/collections/index.js, packages/bruno-app/src/utils/collections/index.spec.js |
Folder items skip request-variable lookup. The test checks that the selected folder variable resolves with type: 'folder' and includes the folder in scopeInfo.data. |
Priority:
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix
Possibly related PRs
- usebruno/bruno#9532: Updates
getVariableScopebehavior for folder-variable scope resolution used by sensitive-field tooltips.
Suggested labels: size/XS
Suggested reviewers: sachin-thakur-bruno, sid-bruno
Merge Risk: 
Minimal · up to 9cff2
-
The change correctly resolves folder variables as folder-scoped, and the focused test covers this behavior.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 2 files.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Folders keep their scope in view
Request lookup steps aside
A test confirms the folder
Its variable resolves there
Scope data points the way
Comment @coderabbitai help to get the list of available commands.
Description
BRU-4903
Fixes the scope shown in the variable info popup for folder variables used in the same folder's settings.
Problem
Hovering
{{folderVar}}in a folder's Auth tab showed the scope as Request, and the source link did not open the folder Vars tab.Fix
getVariableScopeskips the request-scope check when the item is a folder, so folder vars resolve asfolder. Added a unit test.Screenshots
Before

After

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