fix(tui): revoke the highlighted approval - #1721
Merged
Merged
Conversation
Aaronontheweb
marked this pull request as ready for review
July 31, 2026 17:11
Aaronontheweb
enabled auto-merge (squash)
July 31, 2026 17:12
Aaronontheweb
added a commit
to Aaronontheweb/netclaw
that referenced
this pull request
Aug 1, 2026
The Delete keybinding read ViewModel.SelectedProviderIndex, which only updates on Enter (SelectionConfirmed). Arrow-key navigation never syncs it, so Delete after navigating removed the wrong provider. Same bug class as the approvals revoke fix (netclaw-dev#1721). - Re-type the provider list to SelectionListNode<ProviderDisplayItem> so keybindings can read the live HighlightedItem (sentinel row matched by reference). - Delete now calls RemoveSelectedProvider(item) with the highlighted row. - VM RemoveSelectedProvider takes the target item directly; index out of the removal path. - RouteInputToActiveComponent no longer downcasts _lastFocusedList to SelectionListNode<string> (InvalidCastException with typed lists). - Add DeleteKey_OnSecondRow_RemovesHighlightedProvider regression test mirroring netclaw-dev#1721's RevokeKey_OnSecondRow test.
Aaronontheweb
added a commit
to Aaronontheweb/netclaw
that referenced
this pull request
Aug 1, 2026
The Delete keybinding read ViewModel.SelectedProviderIndex, which only updates on Enter (SelectionConfirmed). Arrow-key navigation never syncs it, so Delete after navigating removed the wrong provider. Same bug class as the approvals revoke fix (netclaw-dev#1721). - Re-type the provider list to SelectionListNode<ProviderDisplayItem> so keybindings can read the live HighlightedItem (sentinel row matched by reference). - Delete now calls RemoveSelectedProvider(item) with the highlighted row. - VM RemoveSelectedProvider takes the target item directly; index out of the removal path. - RouteInputToActiveComponent no longer downcasts _lastFocusedList to SelectionListNode<string> (InvalidCastException with typed lists). - Add DeleteKey_OnSecondRow_RemovesHighlightedProvider regression test mirroring netclaw-dev#1721's RevokeKey_OnSecondRow test.
Aaronontheweb
added a commit
to Aaronontheweb/netclaw
that referenced
this pull request
Aug 1, 2026
The Delete keybinding read ViewModel.SelectedProviderIndex, which only updates on Enter (SelectionConfirmed). Arrow-key navigation never syncs it, so Delete after navigating removed the wrong provider. Same bug class as the approvals revoke fix (netclaw-dev#1721). - Re-type the provider list to SelectionListNode<ProviderDisplayItem> so keybindings can read the live HighlightedItem (sentinel row matched by reference). - Delete now calls RemoveSelectedProvider(item) with the highlighted row. - VM RemoveSelectedProvider takes the target item directly; index out of the removal path. - RouteInputToActiveComponent no longer downcasts _lastFocusedList to SelectionListNode<string> (InvalidCastException with typed lists). - Add DeleteKey_OnSecondRow_RemovesHighlightedProvider regression test mirroring netclaw-dev#1721's RevokeKey_OnSecondRow test.
Aaronontheweb
added a commit
that referenced
this pull request
Aug 1, 2026
* feat: allow deleting providers from provider manager list * fix: route provider Delete to live highlighted row (not stale index) The Delete keybinding read ViewModel.SelectedProviderIndex, which only updates on Enter (SelectionConfirmed). Arrow-key navigation never syncs it, so Delete after navigating removed the wrong provider. Same bug class as the approvals revoke fix (#1721). - Re-type the provider list to SelectionListNode<ProviderDisplayItem> so keybindings can read the live HighlightedItem (sentinel row matched by reference). - Delete now calls RemoveSelectedProvider(item) with the highlighted row. - VM RemoveSelectedProvider takes the target item directly; index out of the removal path. - RouteInputToActiveComponent no longer downcasts _lastFocusedList to SelectionListNode<string> (InvalidCastException with typed lists). - Add DeleteKey_OnSecondRow_RemovesHighlightedProvider regression test mirroring #1721's RevokeKey_OnSecondRow test. * fix: clear ErrorMessage when starting provider remove After an unconfigured-row Delete shows 'Cannot remove an unconfigured provider type.', a subsequent successful removal leaves the stale red error on screen — the status bar renders error over success. Clear it in StartRemove, mirroring StartRename. Found by adversarial review: MEDIUM-1.
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.
Summary
Fixes #1703
Test Evidence
dotnet test src/Netclaw.Cli.Tests/Netclaw.Cli.Tests.csproj --filter FullyQualifiedName~ApprovalsManagerPageTestspassed 9 tests../scripts/smoke/run-smoke.sh approvalspassed three consecutive runs../scripts/smoke/run-smoke.sh lightpassed 22 tapes and 9 scenarios.dotnet slopwatch analyzepassed with zero issues.pwsh ./scripts/Add-FileHeaders.ps1 -Verifypassed.