Repository navigation
panels: disarm the pending delete on the network toggle key - #163
Merged
Merged
Conversation
Pressing m toggles the network setting. It left an armed delete confirmation alive, so the next d deleted the box without the second press the prompt promises. Clear p.confirm on m like the navigation keys do. A delete now fires only when the d follows the d that armed it. Signed-off-by: tianxingjian2406 <2550975@tongji.edu.cn>
tianxingjian2406
requested review from
codeyevsky and
qarademir
as code owners
October 26, 2026 21:26
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
codeyevsky
approved these changes
Oct 26, 2026
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.
Fixes #153
What
In the sandbox panel, pressing
m(network toggle) now clears a pending delete confirmation, the way the navigation keys already do.Why
darms a two-press delete confirmation.mleft that state armed, so afterma singleddeleted the box without the second press the prompt promises.up/downand the edit keys already cleared the state;mwas the one gap.How
One line in
packages/tui/panels/sandbox_keys.go: clearp.confirmin themcase, before the save command. A delete now fires only when thedfollows thedthat armed it.Tests
TestSandboxKeyMDisarmsPendingDelete. Red before the fix: afterm,confirmstayed"001"and the nextdreturned a delete command. Green after:mdisarms the state, and the nextdre-arms instead of firing.go test ./panels/targeted: TestSandboxKeyNavigation, TestSandboxKeyDRequiresConfirmation, TestSandboxKeyDNoCurrentEntryIsNoOp, TestSandboxKeyMNoCurrentEntryIsNoOp, and the new test all pass (go1.26.10, windows/amd64).go build ./...andgo vet ./...are clean inpackages/tui. The changed lines are gofmt clean.go test ./...inpackages/tuion Windows shows 18 failures. They are identical on a clean checkout ofmain: the tests isolate state through$HOME, which Windows ignores, so they share one store. Not caused by this change; CI runs them on ubuntu.