Skip to content

fix: response viewer not updating when focused (read-only editors)#7218

Open
sanjaikumar-bruno wants to merge 1 commit intousebruno:mainfrom
sanjaikumar-bruno:fix/response-viewer-update-when-focused
Open

fix: response viewer not updating when focused (read-only editors)#7218
sanjaikumar-bruno wants to merge 1 commit intousebruno:mainfrom
sanjaikumar-bruno:fix/response-viewer-update-when-focused

Conversation

@sanjaikumar-bruno
Copy link
Member

@sanjaikumar-bruno sanjaikumar-bruno commented Feb 19, 2026

Fixes: #7176

Summary by CodeRabbit

  • Bug Fixes
    • Fixed an issue where read-only editors (such as response viewers) were not displaying updated content when values changed while the editor had focus.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 19, 2026

No actionable comments were generated in the recent review. 🎉


Walkthrough

This PR fixes the CodeEditor component's update condition to ensure read-only editors (like response viewers) properly reflect prop-driven value changes. It adds a readOnly guard to prevent cached values from blocking updates when editors are focused, resolving stale response display issues.

Changes

Cohort / File(s) Summary
CodeEditor Update Logic
packages/bruno-app/src/components/CodeEditor/index.js
Tightened componentDidUpdate condition to add readOnly guard. Read-only editors now update values even when focused, fixing stale response display in Raw/JSON view.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • PR #7098: Prior modification to CodeEditor.componentDidUpdate's focus-aware logic that this PR refines with the readOnly guard.

Suggested labels

size/M

Suggested reviewers

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

Poem

📝 A focused fix for weary eyes,
Read-only viewers now realize—
Fresh responses flow through, no cache to deny,
Raw data shines without a sigh! ✨

🚥 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 clearly describes the specific fix: addressing response viewer update issues in read-only editors when focused, which directly aligns with the main change in the CodeEditor component.
Linked Issues check ✅ Passed The code changes fix the root cause of issue #7176 by modifying CodeEditor's update logic to properly handle value changes in read-only editors (response viewers) when focused, ensuring they reflect new server responses immediately.
Out of Scope Changes check ✅ Passed The changes are tightly scoped to the CodeEditor component's update condition logic, directly addressing the read-only editor behavior described in the linked issue with no extraneous modifications.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

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.

Response not updating in Raw/JSON view (no preview) when using Authorization Bearer + multipart/form-data

1 participant

Comments