Skip to content

fix(settings): preserve multiline proxy bypass rules - #20957

Merged
AmethystLiang merged 1 commit into
mainfrom
jinjing/sta-7336-【网络设置】代理绕过规则是单行-input,换行分隔的多主机被静默合并成一条无效规则
Sep 16, 2026

Hidden character warning

The head ref may contain hidden characters: "jinjing/sta-7336-\u3010\u7f51\u7edc\u8bbe\u7f6e\u3011\u4ee3\u7406\u7ed5\u8fc7\u89c4\u5219\u662f\u5355\u884c-input\uff0c\u6362\u884c\u5206\u9694\u7684\u591a\u4e3b\u673a\u88ab\u9759\u9ed8\u5408\u5e76\u6210\u4e00\u6761\u65e0\u6548\u89c4\u5219"
Merged

AmethystLiang merged 1 commit into
mainfrom
jinjing/sta-7336-【网络设置】代理绕过规则是单行-input,换行分隔的多主机被静默合并成一条无效规则

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​125 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​125
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3

Summary

  • render proxy bypass rules with a multiline textarea so pasted newline-separated hosts are preserved
  • keep blur-time canonicalization to semicolon-separated rules and allow Enter/newline editing
  • add component and Electron E2E regression coverage

Validation

  • pnpm test src/renderer/src/components/settings/AdvancedNetworkSettingsSection.test.ts src/renderer/src/components/settings/AdvancedNetworkSettingsSection.interaction.test.tsx src/shared/network-proxy.test.ts
  • ORCA_BACKGROUND_LAUNCH=1 npx playwright test tests/e2e/network-proxy-bypass-rules.spec.ts --config tests/playwright.config.ts --project=electron-headless --workers=1
  • pnpm run check:code-quality:changed

Refs STA-7336

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

  • Multiline bypass-rules control — AdvancedNetworkSettingsSection.tsx swaps the bypass-rules Input for the Textarea primitive (rows={3}) and drops the onKeyDown Enter-to-blur handler, so pasted newline-separated hosts survive the browser's single-line flattening. The blur-time normalizeProxyBypassRules path (split on [;,\n], join with ;) and the existing comma/semicolon/newline helper text are unchanged, so this is a UI-only fix.
  • Component interaction test — new AdvancedNetworkSettingsSection.interaction.test.tsx pins the blur canonicalization (localhost\n127.0.0.1\n*.internal.corp → localhost;127.0.0.1;*.internal.corp) and that Enter keeps focus without committing. Both assertions fail against the old Input implementation, so they are real regression coverage rather than theatre.
  • SSR markup test — AdvancedNetworkSettingsSection.test.ts asserts the control renders as <textarea id="settings-http-proxy-bypass-rules"> and includes each host, which would also fail on the single-line input.
  • Electron E2E — new tests/e2e/network-proxy-bypass-rules.spec.ts does a full fill/blur/persist round-trip through window.api.settings, and restores the original persisted value in a finally block.

grep confirms this is the only proxy-bypass-rules edit site in the renderer, the canonicalization function was not touched, no i18n strings changed, and no other test/snapshot expects an Input here. I ran the focused vitest selection (16 tests passed) and pnpm run check:code-quality:changed (0 new findings across the 4 changed files).

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 6782bd85-fe8a-4bed-94d2-288bb8c568b0

📥 Commits

Reviewing files that changed from the base of the PR and between 357c978 and 947ff49.

📒 Files selected for processing (4)
  • src/renderer/src/components/settings/AdvancedNetworkSettingsSection.interaction.test.tsx
  • src/renderer/src/components/settings/AdvancedNetworkSettingsSection.test.ts
  • src/renderer/src/components/settings/AdvancedNetworkSettingsSection.tsx
  • tests/e2e/network-proxy-bypass-rules.spec.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The proxy bypass rules control changed from a single-line input to a three-row textarea. Enter now inserts a newline without blurring or committing settings. Blur still canonicalizes newline-separated rules to semicolon-separated values. Component, server-rendering, interaction, and end-to-end tests cover the new behavior.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 947ff

The multiline proxy bypass setting retains canonicalized persistence on blur and has targeted component and end-to-end coverage. No current merge-blocking risk is identified.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change and lists validation commands, but it omits most required template sections. It also lacks the required visual proof for a UI behavior change and uses "Refs STA-733… Add the required ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Review, Agent skill upstream boundary, Notes, and Checklist sections. Include before-and-after screenshots or a video, document manual testing and supported plat…
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: preserving multiline proxy bypass rules in settings.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the change and lists validation commands, but it omits most required template sections. It also lacks the required visual proof for a UI behavior change and uses "Refs STA-7336" instead of the required linked-issue format.

Resolution

Add the required ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Review, Agent skill upstream boundary, Notes, and Checklist sections. Include before-and-after screenshots or a video, document manual testing and supported platforms, use the required linked issue format such as "Fixes #...", and complete the applicable checklist items.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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.

@AmethystLiang
AmethystLiang merged commit b0d46e2 into main Sep 16, 2026
35 checks passed
ivanvykopal pushed a commit to ivanvykopal/orca that referenced this pull request Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant