Skip to content

fix(tui): use reverse video for active tab indicator - #210

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/tui-reverse-video-active-tab
Aug 3, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
fix/tui-reverse-video-active-tab

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

Summary

  • Replace the underline treatment on the bottom panel's active tab (Run/Tasks/Diagnostics/Terminal/Activity) with a solid reverse-video block: bg(theme::accent_color()) + fg(theme::background_color()), matching the tmux/htop convention.
  • Added theme::background_color() alongside the other *_color() accessors, and a dedicated theme::active_tab_reverse() style — scoped to the bottom panel only, leaving the sidebar's theme::active_tab() (Task/Context/Runtime) untouched since it's a separate tab set not covered by this task.
  • Reworked the tab-bar span layout so the styled background covers exactly "N Label" (e.g. "4 Terminal") with square corners — surrounding whitespace is now unstyled instead of being baked into the styled span, so the reverse-video block no longer bleeds into the tab bar's padding.
  • Inactive tabs are unchanged (theme::inactive_tab()).
  • Tab switching (numbered shortcuts, cycling) is unchanged — it's pure state (BottomPanelState::active) that the render function reads fresh each draw, so no state-management changes were needed.

Test plan

  • cargo fmt --all -- --check
  • cargo test --package forge-tui --lib (701 passed), including new active_tab_uses_reverse_video_block_matching_label_width which renders each tab as active and asserts the reverse-video background covers exactly that tab's "N Label" text and nothing else.
  • git diff --check

@github-actions
github-actions Bot enabled auto-merge (squash) August 3, 2026 13:56
@github-actions
github-actions Bot merged commit a551b50 into main Aug 3, 2026
7 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