Skip to content

feat: status indicator for pre and post request scripts#6865

Merged
sid-bruno merged 1 commit intousebruno:mainfrom
Pragadesh-45:feat/status-indicator-for-scripts
Jan 21, 2026
Merged

feat: status indicator for pre and post request scripts#6865
sid-bruno merged 1 commit intousebruno:mainfrom
Pragadesh-45:feat/status-indicator-for-scripts

Conversation

@Pragadesh-45
Copy link
Contributor

@Pragadesh-45 Pragadesh-45 commented Jan 20, 2026

fixes: #6255
Jira

Description

This PR implements the logic of adding the content indicator for the Pre and Post request scripts

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.

Summary by CodeRabbit

  • Improvements
    • Script tabs now show visual status indicators when Pre Request or Post Response scripts exist.
    • The active script tab auto-selects the most relevant tab (pre-request or post-response) based on which script is present.
    • Tab selection resets appropriately when switching collections, folders, or individual requests for consistent navigation.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

Walkthrough

Adds StatusDot indicators to Pre Request and Post Response tabs in three script editors; chooses initial active tab based on script presence and resets tab when the associated collection/folder/item UID changes.

Changes

Cohort / File(s) Summary
Collection Script UI
packages/bruno-app/src/components/CollectionSettings/Script/index.js
Import StatusDot; compute initial tab via getInitialTab(); track prevCollectionUidRef and reset active tab when collection UID changes; show status dot on tab headers when scripts exist.
Folder Script UI
packages/bruno-app/src/components/FolderSettings/Script/index.js
Import StatusDot; replace hard-coded initial tab with getInitialTab(); add prevFolderUidRef and effect to reset active tab on folder UID change; render StatusDot for pre-request/post-response when present.
Request Pane Script UI
packages/bruno-app/src/components/RequestPane/Script/index.js
Import StatusDot; add getInitialTab() and prevItemUidRef; reset active tab on item UID change; introduce hasPreRequestScript/hasPostResponseScript flags; show StatusDot on tabs and preserve existing CodeMirror refresh behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

size/L

Suggested reviewers

  • helloanoop
  • lohit-bruno
  • naman-bruno
  • bijin-bruno

Poem

🔵 Tiny dots now mark each tab's face,
Pre and Post scripts find their place.
UID shifts reset the chosen view,
Little lights show what’s old or new. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the primary change: adding status indicators (dots) for pre and post request scripts across three components.
Linked Issues check ✅ Passed The PR successfully implements the core requirement from issue #6255: adding status indicators for script presence in Pre-request and Post-response tabs.
Out of Scope Changes check ✅ Passed All changes are focused on implementing status indicators for script presence and error states in three Script components; no out-of-scope modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@packages/bruno-app/src/components/RequestPane/Script/index.js`:
- Around line 76-90: The StatusDot in the RequestPane Script tabs isn't
receiving error state from the item, so update the two TabsTrigger usages
(value="pre-request" and value="post-response") to pass type="error" to
StatusDot when the corresponding error message exists: use
item.preRequestScriptErrorMessage for the pre-request tab and
item.postResponseScriptErrorMessage for the post-response tab (alongside the
existing hasPreRequestScript/hasPostResponseScript checks) so StatusDot renders
the red error state like HttpRequestPane does.

@Pragadesh-45 Pragadesh-45 marked this pull request as draft January 20, 2026 19:26
@Pragadesh-45 Pragadesh-45 marked this pull request as ready for review January 20, 2026 20:17
@Pragadesh-45 Pragadesh-45 force-pushed the feat/status-indicator-for-scripts branch from 73c15ad to 2b48d87 Compare January 21, 2026 08:50
@sid-bruno sid-bruno merged commit 2288121 into usebruno:main Jan 21, 2026
13 of 14 checks passed
FraCata00 pushed a commit to FraCata00/bruno that referenced this pull request Feb 9, 2026
@coderabbitai coderabbitai bot mentioned this pull request Feb 17, 2026
5 tasks
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.

Dots for "script presence" in tabs pre-request and post response

2 participants