fix: 3386 Modified indicator shown incorrectly on collection, folder, and request tabs (including presets/Auth sections).
Jira link: https://usebruno.atlassian.net/browse/BRU-3386 https://usebruno.atlassian.net/browse/BRU-3421
Description
Fixes the false "modified" indicator dot shown on the Auth tab for requests and folders when auth mode is inherit. Previously the dot was driven purely by auth.mode !== 'none', which is always true for inherit — so the dot lit up even when the resolved inherited auth chain produced no actual auth.
The dot now reflects the effective auth: it follows the inherit chain up through parent folders to the collection root, and only shows when the resolved auth mode is set and not none.
Scope:
- HTTP, gRPC, WebSocket, and GraphQL request panes — auth indicator now resolves inherited auth before deciding to render the dot.
- Folder settings — same resolution applied to the folder's Auth tab indicator.
Refactor:
- Extracted the duplicated
getEffectiveAuthSource(collection, item)helper (previously inlined inRequestPane/Auth,GrpcAuth,WSAuth,HttpRequestPane, andFolderSettings/Auth) into a shared utility atpackages/bruno-app/src/utils/auth/index.js. The util handles both request and folder shapes and explicitly skips the item itself when walking the tree.
Filestore fix:
parseFolder.tswas returningrequest: nullfor folders that had no folder-level config on disk, causing inconsistent shape and downstream null-reference issues during save. The parser now always initializesrequestwith the default empty shape ({ headers: [], auth: toBrunoAuth(...), script, vars, tests }) — matching how the request parsers already behave.
Additionally fixes BRU-3421
This PR also resolves the three issues tracked in BRU-3421 — Auth inheritance issues in nested folders and No Auth selection state:
- Nested folder inheriting auth from an incorrect (non-immediate) parent folder.
- Child folder falling back to collection auth when its parent is set to No Auth.
- No Auth option not highlighted as the selected value in the auth dropdown.
See the linked ticket for full repro steps and expected vs. current behavior.
Contribution Checklist:
- [ ] I've used AI significantly to create this pull request
- [x] The pull request only addresses one issue or adds one feature.
- [x] The pull request does not introduce any breaking changes
- [x] I have added screenshots or gifs to help explain the change if applicable.
- [x] I have read the contribution guidelines.
- [x] 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
- Presets tab now shows an active indicator when a non-default preset type or URL is configured.
-
Bug Fixes
- Auth indicators consistently reflect effective/inherited authentication across requests, folders, and collections.
-
Tests
- Added E2E tests for presets indicator and expanded effective-auth coverage; added YAML fixtures and parsing tests.
- Test utilities extended with request-type selection and auth mode label constants.
-
Refactor
- Centralized auth-inheritance and supported-mode logic for consistent behavior.
[!NOTE]
Reviews paused
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
reviews.auto_review.auto_pause_after_reviewed_commitssetting.Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.Use the checkboxes below for quick actions:
- [ ] ▶️ Resume reviews
- [ ] 🔍 Trigger review
Walkthrough
Centralizes auth-inheritance logic, adds preset request-type constants and BrunoPresets types, updates filestore parsing and fixtures, wires effective-auth detection into request panes and settings for StatusDot indicators, and adds tests and test ids validating behavior.
Changes
Auth Inheritance and Presets Indicators
| Layer / File(s) | Summary |
|---|---|
Type definitions, constants, and converter imports packages/bruno-converters/src/opencollection/types.ts, packages/bruno-converters/src/opencollection/bruno-to-opencollection.ts, packages/bruno-converters/src/opencollection/opencollection-to-bruno.ts, packages/bruno-app/src/utils/common/constants.js, packages/bruno-app/src/components/CollectionSettings/index.js |
Introduce BrunoPresets and BrunoPresetsExtension types, add PRESET_REQUEST_TYPES and DEFAULT_PRESET_REQUEST_TYPE, and update converter imports and CollectionSettings to use the default preset constant. |
Filestore parsing, fixtures, and parse tests packages/bruno-filestore/src/formats/yml/parseCollection.ts, packages/bruno-filestore/src/formats/yml/parseFolder.ts, packages/bruno-filestore/src/types.ts, packages/bruno-filestore/src/formats/yml/tests/fixtures/presets/*, packages/bruno-filestore/src/formats/yml/tests/parseCollection.spec.js |
Add typed BrunoPresetsExtension, default presets.requestType/requestUrl to empty strings, initialize folder.request.auth during folder parsing, add multiple YAML fixtures, and add Jest tests for parseCollection presets behavior. |
Shared auth inheritance utilities packages/bruno-app/src/utils/auth/index.js |
Add getEffectiveAuthSource(collection, item) and hasEffectiveAuth(collection, item, supportedModes) to resolve inherited auth and to detect effective auth presence with optional supported-mode filtering. |
Folder and Request Auth views packages/bruno-app/src/components/FolderSettings/Auth/index.js, packages/bruno-app/src/components/RequestPane/Auth/index.js, packages/bruno-app/src/components/FolderSettings/index.js |
Replace local tree-walk inheritance logic with shared getEffectiveAuthSource, update imports, and use AUTH_MODES.NONE for comparisons; add data-testid="inherited-auth-mode". |
AuthMode test ids and StatusDot test id packages/bruno-app/src/components/CollectionSettings/Auth/AuthMode/index.js, packages/bruno-app/src/components/FolderSettings/AuthMode/index.js, packages/bruno-app/src/components/RequestPane/Auth/AuthMode/index.js, packages/bruno-app/src/components/StatusDot/index.js |
Add data-testid attributes for auth-mode selectors/labels and add data-testid="status-dot" to StatusDot. |
HTTP & GraphQL Request Pane indicators packages/bruno-app/src/components/RequestPane/HttpRequestPane/index.js, packages/bruno-app/src/components/RequestPane/GraphQLRequestPane/index.js |
Drive indicators/auth presence from hasEffectiveAuth(collection, item) and render StatusDot when effective auth exists; update memo deps. |
gRPC & WS Request Pane and auth components packages/bruno-app/src/components/RequestPane/GrpcRequestPane/*, packages/bruno-app/src/components/RequestPane/WSRequestPane/* |
Use shared SUPPORTED_GRPC_AUTH_MODES / SUPPORTED_WS_AUTH_MODES, import getEffectiveAuthSource/hasEffectiveAuth, and update validation/reset logic and inherit-mode rendering to rely on shared utilities. |
| RequestPane memo/dependency updates Various RequestPane files |
Update memo dependency lists to include derived hasAuth values (instead of raw auth.mode) so tab indicators remain in sync. |
Playwright tests and test utils tests/auth/*, tests/collection/presets-indicator.spec.ts, tests/utils/page/* |
Add E2E tests for effective auth resolution, auth modified indicator, Presets status dot behavior; add AUTH_MODE_LABELS, extend test actions to support requestType, and re-export constants for tests. |
Estimated code review effort
🎯 4 (Complex) | ⏱️ ~60 minutes
Possibly related PRs
- usebruno/bruno#6461: Related presets status-dot and parsing changes.
- usebruno/bruno#6389: Presets UI / StatusDot work in CollectionSettings.
- usebruno/bruno#6649: Related gRPC RequestPane/tab refactor affecting Auth tab rendering.
Suggested labels
size/L
Suggested reviewers
- lohit-bruno
- naman-bruno
- bijin-bruno
- helloanoop
Auth roots found by a single quest,
Presets lit when types diverge from rest.
Dots on tabs, tests that sing,
One shared path to rule the thing. ✨
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title accurately captures the main objective: fixing the modified indicator state across multiple UI components (collection, folder, request tabs and presets/auth sections). |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 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.
Comment @coderabbitai help to get the list of available commands and usage tips.