feat(tui): navigate panels via Up/Down arrow overflow at list boundaries#2287
feat(tui): navigate panels via Up/Down arrow overflow at list boundaries#2287varshaprasad96 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>
|
All contributors have signed the DCO ✍️ ✅ |
|
I have read the DCO document and I hereby sign the DCO. |
|
recheck |
PR Review StatusValidation: This is a small, concentrated TUI enhancement implementing the clear user path in #2273. The change stays within the dashboard navigation subsystem and covers the Providers/Global Settings middle-pane variant. Head SHA: Thanks @johntmyers — I checked the current head after your recheck comment, including the full diff, surrounding list-refresh behavior, linked issue requirements, docs impact, and existing checks. Review findings:
Docs: Missing for this direct user-facing keyboard behavior. Please add a short dashboard-navigation note to E2E: No Next state: |
|
/ok to test b3251b8 |
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