Fix MCP permissions focus and save interaction - #1694
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves the MCP tool permissions TUI by making focus/selection repaint without resetting the scroll container, standardizing selection visuals using the existing full-width highlight row treatment, and updating the staged-save confirmation UX to make Enter the visible default while keeping Y/N/Esc.
Changes:
- Split MCP permissions header rows vs tool rows into separate dynamic layout nodes to repaint focus without recreating the scroll container.
- Switch header/tool row rendering to
ConfigSelectionRowfor full-row focus highlighting. - Update save confirmation to support
[Enter/Y] Save, and add both headless rendered-background assertions plus a native tape for Enter-save.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tests/smoke/tapes/screenshots/mcp-permissions.tape | Adds a native regression path to exercise staged save using the default Enter action. |
| src/Netclaw.Cli/Mcp/McpToolPermissionsPage.cs | Refactors grid rendering to avoid scroll resets, adopts ConfigSelectionRow, and updates confirmation key handling + footer text. |
| src/Netclaw.Cli.Tests/Mcp/McpToolPermissionsPageTests.cs | Adds background-render regression assertions and a test covering Enter→Enter save confirmation flow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+28
to
+29
| private readonly TextNode _confirmSaveFooterNode = new TextNode( | ||
| "Save changes? [Enter/Y] Save [N] Discard [Esc] Continue editing") |
Aaronontheweb
enabled auto-merge (squash)
July 18, 2026 20:56
Aaronontheweb
commented
Jul 18, 2026
Aaronontheweb
left a comment
Collaborator
Author
There was a problem hiding this comment.
LGTM - reviewed the tape footage and it looks like what I'd expect going forward.
Merged
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
Validation
dotnet test src/Netclaw.Cli.Tests/Netclaw.Cli.Tests.csproj --filter FullyQualifiedName~McpToolPermissionsPageTests --no-restore(15 passed)dotnet slopwatch analyze(0 issues)pwsh ./scripts/Add-FileHeaders.ps1 -Verify(passed)mcp-permissionsscreenshot tape completed Down, Space, confirmation, and Enter-save successfullymcp-permissions-tool-gridscreenshot baseline for the intentional full-row highlightScope
This intentionally changes only the MCP permissions screen and its focused automated proof. It does not modify Termina or other NetClaw configuration screens.