fix(RequestTabPanel): update loading message for better user feedback#7492
Conversation
WalkthroughA single user-facing message in RequestTabPanel is updated from "An error occurred!" to "Loading..." when no active or focused tab exists. No control flow or error handling logic is modified. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/bruno-app/src/components/RequestTabPanel/index.js`:
- Around line 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.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 6d524af0-5b1a-44d4-bd99-86f8d7c7d43f
📒 Files selected for processing (1)
packages/bruno-app/src/components/RequestTabPanel/index.js
| if (!activeTabUid || !focusedTab) { | ||
| return <div className="pb-4 px-4">An error occurred!</div>; | ||
| return <div className="pb-4 px-4">Loading...</div>; |
There was a problem hiding this comment.
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.
…usebruno#7492) Co-authored-by: Chirag Chandrashekhar <cchirag85@gmail.com>
Description
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