Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ const RequestTabPanel = () => {
}

if (!activeTabUid || !focusedTab) {
return <div className="pb-4 px-4">An error occurred!</div>;
return <div className="pb-4 px-4">Loading...</div>;
Comment on lines 179 to +180
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Loading state conflates with valid “no active tab” state.

activeTabUid can be null in normal flows (e.g., when tabs are closed in packages/bruno-app/src/providers/ReduxStore/slices/tabs.js), so showing "Loading..." here can become a permanent misleading state.

Suggested fix
-  if (!activeTabUid || !focusedTab) {
-    return <div className="pb-4 px-4">Loading...</div>;
-  }
+  if (!activeTabUid) {
+    return <div className="pb-4 px-4">No tab selected</div>;
+  }
+
+  if (!focusedTab) {
+    return <div className="pb-4 px-4">Loading...</div>;
+  }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/bruno-app/src/components/RequestTabPanel/index.js` around lines 179
- 180, The current check treats activeTabUid being null (a valid "no active tab"
state) as a loading state; update RequestTabPanel to differentiate null vs
undefined: use activeTabUid === null (or !activeTabUid but explicitly check for
null) to render a "no active tab" / empty state and only render "Loading..."
when focusedTab is undefined (or when a real loading flag is set). Concretely,
change the condition that returns "Loading..." to only trigger when focusedTab
=== undefined (or a designated loading flag), and add a separate branch for
activeTabUid === null that returns an appropriate empty/no-tab UI; refer to the
RequestTabPanel component and the activeTabUid / focusedTab symbols when making
the change.

}

if (focusedTab.type === 'global-environment-settings') {
Expand Down
Loading