Skip to content

fix: add reset action for network proxy edits - #1893

Open
neptune-me wants to merge 2 commits into
eigent-ai:mainfrom
neptune-me:fix/network-proxy-reset
Open

fix: add reset action for network proxy edits#1893
neptune-me wants to merge 2 commits into
eigent-ai:mainfrom
neptune-me:fix/network-proxy-reset

Conversation

@neptune-me

@neptune-me neptune-me commented Sep 2, 2026

Copy link
Copy Markdown

Pull Request

Related Issue

Closes #1728

Description

Adds a Reset action for unsaved Network Proxy edits.

  • Tracks the last successfully loaded or saved proxy URL separately from the editable value.
  • Enables Save only when the normalized proxy value has changed.
  • Enables Reset whenever the displayed value differs from the saved baseline, including whitespace-only edits.
  • Restores the saved value without writing or removing environment variables.
  • Updates the reset baseline only after a successful save.
  • Preserves URL validation, error handling, and the existing Restart to Apply behavior.
  • Uses the existing Button and Input primitives, semantic design tokens, and setting.reset translation.
  • Adds focused tests under the current unit-test structure.

Testing Evidence (REQUIRED)

Automated validation:

  • npm test -- test/unit/components/GeneralSettingsProxy.test.tsx — 1 test file passed, 9 tests passed.
  • npm run type-check — passed.
  • npx eslint src/components/Settings/General/index.tsx test/unit/components/GeneralSettingsProxy.test.tsx --no-warn-ignored — passed.
  • npm run check:design-token-usage — passed.
  • git diff --check — passed.
  • Repository pre-commit hooks — passed.

Focused tests cover loading a saved or empty proxy, editing and resetting without persistence writes, successful and failed save baselines, invalid URLs, whitespace-only edits, saving an empty proxy, and disabling Reset while a save is in flight.

Manual macOS verification:

  • Confirm the saved proxy loads with Save and Reset disabled.

  • Edit the proxy and confirm Save and Reset become enabled.

  • Click Reset and confirm the saved value is restored.

  • Save a valid edit and confirm Restart to Apply appears.

  • Attach a screenshot or screen recording below.
    https://drive.google.com/file/d/1vLOe4r7cfVhKAjO5--k3NpZ8L8SlfcNJ/view?usp=sharing

  • I have included human-verified testing evidence in this PR.

  • This PR includes frontend/UI changes, and I attached screenshot(s) or screen recording(s).

  • No frontend/UI changes in this PR.

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Contribution Guidelines Acknowledgement

@neptune-me
neptune-me marked this pull request as ready for review September 2, 2026 21:04

@Douglasymlai Douglasymlai 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.

@neptune-me Thanks for your contribution. LGTM

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.

[BUG] Reset Button for Proxy setting

2 participants