Repository navigation
fix(proxy): refresh cached PAC content on demand - #8173
Conversation
WalkthroughThis PR adds a PAC (Proxy Auto-Config) cache refresh feature across the renderer, Redux, Electron main process, and test layers. Users can now click a "Refetch" button in ProxySettings to clear cached PAC and HTTP/HTTPS agent state, ensuring the latest PAC script is read and applied. The system proxy refresh handler also clears these caches after refreshing proxy variables. ChangesPAC Cache Refresh Feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/bruno-app/src/components/Preferences/ProxySettings/index.js`:
- Around line 460-468: Replace the non-focusable <span> used for "Refetch" with
a semantic <button> so it becomes keyboard-accessible and add a test id;
specifically, in the conditional that checks formik.values.pac.source, change
the span that renders the IconRefresh and text to a <button type="button">
preserving the existing className and onClick handler (handleRefreshPac), add a
data-testid (e.g. data-testid="refetch-pac"), and optionally include an
aria-label for clarity; ensure IconRefresh usage and layout remain the same so
behavior and styling are unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1823c070-4ad7-4630-8153-76dafd569cc0
📒 Files selected for processing (4)
packages/bruno-app/src/components/Preferences/ProxySettings/index.jspackages/bruno-app/src/providers/ReduxStore/slices/app.jspackages/bruno-electron/src/ipc/preferences.jspackages/bruno-requests/src/utils/pac-resolver.spec.ts
Description
JIRA
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
New Features
Tests