feat(tui): navigate panels via Up/Down arrow overflow at list boundaries#2287
Open
varshaprasad96 wants to merge 1 commit into
Open
feat(tui): navigate panels via Up/Down arrow overflow at list boundaries#2287varshaprasad96 wants to merge 1 commit into
varshaprasad96 wants to merge 1 commit into
Conversation
When at the bottom of a panel's item list, pressing Down/j now moves focus to the next panel instead of being a silent no-op. Likewise, pressing Up/k at the top moves to the previous panel with the cursor on its last item. Empty panels are skipped and the ring wraps around. Closes NVIDIA#2273 Signed-off-by: Varsha Prasad Narsing <vnarsing@nvidia.com> Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com>
|
Thank you for your submission! We ask that you sign our Developer Certificate of Origin before we can accept your contribution. You can sign the DCO by adding a comment below using this text: I have read the DCO document and I hereby sign the DCO. You can retrigger this bot by commenting recheck in this Pull Request. Posted by the DCO Assistant Lite bot. |
Author
|
I have read the DCO document and I hereby sign the DCO. |
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
When the cursor reaches the boundary of a TUI dashboard panel list, Up/Down arrow keys now overflow into the adjacent panel instead of clamping silently. Down at the bottom of a panel moves focus to the next panel (cursor at first item); Up at the top moves to the previous panel (cursor at last item). Empty panels are skipped. The ring wraps: Gateways → Providers/GlobalSettings → Sandboxes → Gateways.
Related Issue
Closes #2273
Changes
DASHBOARD_PANELSconst array defining the panel ring orderpanel_item_count()helper that returns item count for any panel, respecting the active middle-pane tab (Providers vs GlobalSettings)set_panel_cursor()helper to set the selected index for any paneloverflow_focus_down()andoverflow_focus_up()methods that walk the panel ring to find the next/previous non-empty panelhandle_gateways_key,handle_providers_key,handle_global_settings_key,handle_sandboxes_key) to call overflow helpers at list boundaries instead of clampingTesting
rustfmt --edition 2024 --checkpassescargo check -p openshell-tuicompiles cleanlyApp::newrequires a gRPC client, making isolated unit tests impractical without test infrastructure changesChecklist