Skip to content

Improve sidebar UI and project interactions#73

Open
Junyi-99 wants to merge 6 commits into
mainfrom
feature/ui-priority-improvements
Open

Improve sidebar UI and project interactions#73
Junyi-99 wants to merge 6 commits into
mainfrom
feature/ui-priority-improvements

Conversation

@Junyi-99

@Junyi-99 Junyi-99 commented Jul 19, 2026

Copy link
Copy Markdown
Member

Summary

  • collapse the idle Summary card when no agents are available and disable Generate
  • window overflowing vertical tabs around the focused session while keeping the menu pinned
  • add New local session to the global menu, responsive Header, and the configurable n shortcut
  • show live Projects and Agents counts in the responsive Header; keep the New action accent-only with no filled background
  • make Agent and remote-session status colors semantic and distinguish Unknown without relying on color
  • replace the persistent version footer with contextual shortcuts and focus labels
  • simplify section dividers to local / host names without the @ prefix
  • rename the project Close action, remove menu-based Move Up / Move Down, and reorder projects by dragging
  • preserve click-to-switch behavior and persist one local or remote order update when a drag is released
  • show an accent-colored source and drop-target indicator throughout a project drag
  • choose context-menu highlight text by measured contrast so light and dark themes remain readable
  • use the framework-agnostic drag geometry added in Add sectioned row drag tracking deck-support/ratatui-sectioned-list#1

Validation

  • cargo test --all-features (438 passed in CI)
  • cargo clippy --all-targets -- -D warnings
  • rustfmt on all changed Rust files
  • TestBackend render checks for responsive Header/Footer, hit regions, status glyphs, drag indicators, unfilled New action, and light-theme menu contrast
  • contrast checks enforce at least 4.5:1 for context-menu highlights across every bundled theme
  • mouse action and reducer coverage for click/drag/release, direct reorder, lane boundaries, and modal isolation
  • isolated tmux TUI verification for narrow vertical tabs

Copilot AI review requested due to automatic review settings July 19, 2026 09:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refines the sidebar’s behavior in constrained/empty states: it collapses and disables the Agents “Summary” card when no agents exist, introduces a windowed vertical tab bar that keeps the ≡ menu button pinned, and adds a “New local session” entry as the first item in the global context menu.

Changes:

  • Collapse the idle Summary card to a compact empty-state when no agents are available, and disable the Generate action in that state.
  • Replace the vertical tab bar geometry with a windowed layout around the focused session, keeping the menu button pinned and hit-testing consistent.
  • Add NewLocalSession to the global menu and wire it to open the local new-session picker.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/unit/ui/sidebar.rs Adds UI regression tests for compact idle Summary-without-agents and overflowed tab bar/menu pinning.
tests/unit/ui/layout.rs Updates tab layout tests to validate windowing/pinned-menu geometry and display-width accounting.
tests/unit/model/state.rs Adjusts Summary height invariants and adds coverage for the “collapsed until agent exists” behavior.
tests/unit/app/action/reduce.rs Updates global menu expectations and adds test coverage for new global “New local session” action.
src/ui/sidebar/tabs.rs Switches rendering to tab_bar_layout() output and draws overflow markers + pinned menu.
src/ui/sidebar/sessions.rs Disables Generate when no agents, and renders a compact idle empty-state (“No agents detected”).
src/ui/sidebar/mod.rs Re-exports MENU_LABEL from geometry and derives can_generate from agent_entries.
src/model/state/mod.rs Updates vertical/tabs click hit-testing to use tab_bar_layout() visible ranges.
src/model/state/layout.rs Collapses idle Summary card height to 3 rows when there are no agents.
src/model/menu.rs Adds MenuItem::NewLocalSession and places it first in the global context menu list.
src/model/geometry.rs Introduces TabBarLayout/VisibleTab and the tab_bar_layout() windowing logic; adds shared MENU_LABEL.
src/app/action/reduce/menu.rs Handles MenuItem::NewLocalSession in the global menu confirm path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ui/sidebar/tabs.rs
Comment on lines +60 to +67
pad_to(1, &mut spans, &mut cursor);
if layout.left_clipped {
spans.push(Span::styled(
format!("{TAB_OVERFLOW_MARKER} "),
Style::default().fg(theme.dim).bg(theme.bg),
));
cursor += 2;
}
Comment thread src/ui/sidebar/tabs.rs
Comment on lines +123 to +129
if layout.right_clipped {
spans.push(Span::styled(
format!(" {TAB_OVERFLOW_MARKER}"),
Style::default().fg(theme.dim).bg(theme.bg),
));
cursor += 2;
}
Comment thread src/model/geometry.rs
Comment on lines +175 to +181
fn tab_run_width(labels: &[&str], start: usize, end: usize) -> u32 {
let tabs = (start..end)
.map(|i| u32::from(tab_width(i, labels[i])))
.sum::<u32>();
let separators = end.saturating_sub(start + 1) as u32;
u32::from(TAB_LEADING_PAD)
+ if start > 0 {
@Junyi-99 Junyi-99 changed the title Improve sidebar UI for empty and narrow states Improve sidebar UI and project interactions Jul 19, 2026
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.

2 participants