Skip to content

feat(core): add bold styling to terminal pane title when focused#32462

Merged
FrozenPandaz merged 1 commit intomasterfrom
copilot/fix-6677c723-45f5-4f2b-a717-aac7ef6a6867
Sep 9, 2025
Merged

feat(core): add bold styling to terminal pane title when focused#32462
FrozenPandaz merged 1 commit intomasterfrom
copilot/fix-6677c723-45f5-4f2b-a717-aac7ef6a6867

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Aug 21, 2025

Current Behavior

Terminal panes in the TUI show focus state through color changes only - focused panes display the task name in primary foreground color while unfocused panes use secondary foreground color.

Expected Behavior

Terminal panes should provide stronger visual feedback when focused by making the title bold in addition to the existing color change, consistent with other TUI components like the dependency view.

Related Issue(s)

This enhancement improves the visual hierarchy and makes it easier for users to identify which terminal pane currently has focus, especially in multi-pane layouts.

Changes Made

  • Modified the title styling logic in TerminalPane::render() to conditionally apply Modifier::BOLD when the pane is focused
  • Added a test to verify the focus state behavior is correctly implemented
  • The change follows the existing pattern used in other components and maintains backward compatibility

The implementation uses a conditional modifier that applies bold styling only when state.is_focused is true, leaving unfocused panes unchanged. This provides consistent visual feedback across the TUI while preserving existing functionality.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nx-dev Ready Ready Preview Sep 8, 2025 10:20pm

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Aug 21, 2025

View your CI Pipeline Execution ↗ for commit f691453

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 5m 26s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 2m 1s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 7s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 6s View ↗
nx documentation ✅ Succeeded 2m 37s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-09 18:50:54 UTC

Copilot AI changed the title [WIP] In the rust terminal pane, lets bold the title when its focused in addition to the color swap feat(tui): add bold styling to terminal pane title when focused Aug 21, 2025
Copilot AI requested a review from AgentEnder August 21, 2025 22:27
@AgentEnder
Copy link
Copy Markdown
Member

@copilot combine the to ternaries, should be able to do something like

match state.is_focused() {
  true => Style::default()...
  false => ...
}

@AgentEnder AgentEnder changed the title feat(tui): add bold styling to terminal pane title when focused feat(core): add bold styling to terminal pane title when focused Aug 22, 2025
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Aug 22, 2025

@copilot combine the to ternaries, should be able to do something like

...

Done! Combined the two ternary expressions into a single match statement as suggested. This makes the code more idiomatic and eliminates the duplication of checking state.is_focused twice. See commit 9213a94.

@AgentEnder AgentEnder marked this pull request as ready for review August 22, 2025 02:01
@AgentEnder AgentEnder requested review from a team as code owners August 22, 2025 02:01
@FrozenPandaz FrozenPandaz force-pushed the copilot/fix-6677c723-45f5-4f2b-a717-aac7ef6a6867 branch from 9213a94 to 671b9a1 Compare August 27, 2025 18:59
fix(core): add bold stylng to terminal pane title when focused to emphasize it

Co-authored-by: AgentEnder <6933928+AgentEnder@users.noreply.github.com>

refactor(tui): combine ternary expressions into match statement for terminal pane styling

Co-authored-by: AgentEnder <6933928+AgentEnder@users.noreply.github.com>
@AgentEnder AgentEnder force-pushed the copilot/fix-6677c723-45f5-4f2b-a717-aac7ef6a6867 branch from 671b9a1 to f691453 Compare September 8, 2025 22:08
@FrozenPandaz FrozenPandaz enabled auto-merge (squash) September 9, 2025 18:41
@FrozenPandaz FrozenPandaz merged commit c586749 into master Sep 9, 2025
17 of 18 checks passed
@FrozenPandaz FrozenPandaz deleted the copilot/fix-6677c723-45f5-4f2b-a717-aac7ef6a6867 branch September 9, 2025 18:51
FrozenPandaz pushed a commit that referenced this pull request Sep 10, 2025
## Current Behavior

Terminal panes in the TUI show focus state through color changes only -
focused panes display the task name in primary foreground color while
unfocused panes use secondary foreground color.

## Expected Behavior

Terminal panes should provide stronger visual feedback when focused by
making the title bold in addition to the existing color change,
consistent with other TUI components like the dependency view.

## Related Issue(s)

This enhancement improves the visual hierarchy and makes it easier for
users to identify which terminal pane currently has focus, especially in
multi-pane layouts.

## Changes Made

- Modified the title styling logic in `TerminalPane::render()` to
conditionally apply `Modifier::BOLD` when the pane is focused
- Added a test to verify the focus state behavior is correctly
implemented
- The change follows the existing pattern used in other components and
maintains backward compatibility

The implementation uses a conditional modifier that applies bold styling
only when `state.is_focused` is true, leaving unfocused panes unchanged.
This provides consistent visual feedback across the TUI while preserving
existing functionality.

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: AgentEnder <6933928+AgentEnder@users.noreply.github.com>
(cherry picked from commit c586749)
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants