Skip to content

feat: add dual-focus navigation with interactive action execution#27

Merged
utkarsh232005 merged 4 commits into
KDM-cli:mainfrom
utkarsh232005:feat/interactive-dashboard-actions
Jun 5, 2026
Merged

feat: add dual-focus navigation with interactive action execution#27
utkarsh232005 merged 4 commits into
KDM-cli:mainfrom
utkarsh232005:feat/interactive-dashboard-actions

Conversation

@utkarsh232005

@utkarsh232005 utkarsh232005 commented Jun 1, 2026

Copy link
Copy Markdown
Member

Summary

Fixes the issue where actions on the Dashboard (and all other screens) were rendered as static text with no way to select or execute them.

Changes

  1. state.rs:
    • Added FocusPane enum (Sidebar, Main).
    • Added focus and selected_action index to UiState.
    • Added helper methods for navigating actions and retrieving available actions for the current screen.
  2. dashboard.rs:
    • Added render_action_list widget helper that displays actions with focus-aware borders, keyboard hints, and visual active indicators.
    • Updated render_settings and render_deployments to split screens and include the new interactive action list.
    • Updated handle_key to support dual-focus navigation:
      • Tab / BackTab and Left / Right arrow keys switch focus between Sidebar and Main panel.
      • Up / Down arrows navigate the action list when the main panel is focused.
      • Enter key executes the selected action when the main panel is focused.
  3. palette.rs:
    • Added actions_for_screen helper to filter actions by screen.

Verification

  • Built with cargo build.
  • Ran unit tests with cargo test (all 130 tests pass).

- Add FocusPane enum (Sidebar/Main) and selected_action index to UiState
- Tab/BackTab toggles focus between sidebar and main panel
- Left/Right arrows switch focus for discoverability
- Up/Down navigates action list when main panel is focused
- Enter executes selected action when main panel is focused
- All 8 screens now render selectable action lists via render_action_list()
- Visual focus indicators: accent borders, dot marker on focused pane title
- Selected actions highlighted with triangle marker and bold accent style
- Disabled actions shown with muted style and '(unavailable)' suffix
- Action selection resets when switching screens via sidebar

Fixes: Dashboard and screen actions were previously static text with no
way to select or execute them from the UI. Users had to use Ctrl+P
command palette or keyboard shortcuts as the only way to run actions.
@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@utkarsh232005, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 26 minutes and 4 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ec4b6887-32bd-4c74-a387-a43ce18b5dbf

📥 Commits

Reviewing files that changed from the base of the PR and between 8e71a8e and ba7bf2f.

📒 Files selected for processing (4)
  • src/ui/dashboard.rs
  • src/ui/mod.rs
  • src/ui/state.rs
  • src/ui/welcome.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.61421% with 167 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/ui/dashboard.rs 27.27% 136 Missing ⚠️
src/ui/welcome.rs 91.09% 17 Missing ⚠️
src/ui/state.rs 12.50% 14 Missing ⚠️

📢 Thoughts on this report? Let us know!

- Move welcome and scanning phase screens to new welcome.rs module
- Introduce render_capability_screen to remove duplication across 5 layouts
- Simplify run_loop key handler by extracting logic and sub-helpers
- Simplify render_action_list by splitting into 3 specific layout helpers
codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Health Improved (1 files improve in Code Health)

Our agent can fix these. Install it.

Gates Passed
3 Quality Gates Passed

View Improvements
File Code Health Impact Categories Improved
dashboard.rs 8.68 → 8.96 Complex Method, Bumpy Road Ahead, Deep, Nested Complexity, Excess Number of Function Arguments

Quality Gate Profile: The Bare Minimum
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@utkarsh232005 utkarsh232005 merged commit b047db9 into KDM-cli:main Jun 5, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant