Repository navigation
fix(common): require an explicit yes before overwriting config - #277
Merged
Merged
Conversation
When PacketProxyHub pushes a config, ConfigHttpServer asks the user to confirm the overwrite, but it only rejected NO_OPTION. Closing the dialog with Esc or the close button returns CLOSED_OPTION, which fell through, dropped the existing config and imported the remote one. Treat anything other than YES_OPTION as a refusal, so dismissing the dialog keeps the current config. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 task done
toku-sa-n
marked this pull request as ready for review
November 5, 2026 10:32
Contributor
|
ありがとうございます。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PacketProxyHubから設定をダウンロードするとき、
ConfigHttpServerは「設定を上書きしますか?」と確認しますが、「いいえ」(NO_OPTION)のときだけ拒否していました。そのため、ダイアログをEscや閉じるボタンで閉じた場合(CLOSED_OPTION)は、拒否したつもりでも既存の設定が消され、受け取った設定で上書きされていました。「はい」(
YES_OPTION)のとき以外はすべて拒否(401)するように変えました。ダイアログを閉じた場合は、今の設定がそのまま残ります。確認したこと
./gradlew compileJava testとspotlessCheckが通ることを確認しました。単体テストは追加していません。この判定は
ConfigHttpServerの中で Swing の確認ダイアログを直接呼んでいて、今の構造ではテストから差し替えられないためです。By placing an "x" in the box, I hereby understand, accept and agree to be bound by the terms and conditions of the Contribution License Agreement.
🤖 Generated with Claude Code