Repository navigation
Conversation
WalkthroughAfter saving a variable, the code now re-reads the Redux state and recomputes the variable's scopeInfo by locating the updated collection/item, then updates the local scopeInfo reference so subsequent interpolation and secret/reference handling use the refreshed value. Changes
Sequence Diagram(s)(No sequence diagrams generated — change is a localized client-side state refresh and does not introduce a multi-component control flow requiring visualization.) Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
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
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
🤖 Fix all issues with AI agents
In `@packages/bruno-app/src/utils/codemirror/brunoVarInfo.js`:
- Around line 517-526: The code re-fetches freshCollection but still calls
getVariableScope with the old collection, causing stale scopeInfo; update the
call to getVariableScope to pass freshCollection (and use freshItem looked up
from freshCollection when item is present), and add a guard that freshCollection
exists before calling findItemInCollectionByItemUid or getVariableScope so you
don't dereference null; replace the existing getVariableScope(collection,
freshItem) usage with getVariableScope(freshCollection, freshItem) and ensure
updatedScopeInfo assignment uses that result.
Description
Fixes a bug in the variable tooltip editor where editing a newly created variable multiple times (while the tooltip stays open) would create duplicate variables instead of updating the existing one.
JIRA
Contribution Checklist:
before:
https://github.com/user-attachments/assets/8d61caa7-dc78-4506-beab-f10d8d75e8f2
after:
https://github.com/user-attachments/assets/c6491012-b56b-48e6-83dc-8bd2b61e4c54
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.